Scrapeman
Docs: Import & Export

Import and Export

Scrapeman reads collections from five external formats and exports history as HAR. Two more export targets are planned.

Import Formats

OpenAPI 3.0.x / 3.1.x and Swagger 2.0

Parse OpenAPI 3.0.x / 3.1.x and Swagger 2.0 from a URL or pasted text (importOpenApiSpec). Format is auto-detected (JSON or YAML).

  • Each paths[*][method] operation becomes one request.
  • Operation name is operationId, then summary, then METHOD /path.
  • Operations group by tags[0] into folders. Untagged operations go to the workspace root.
  • Server URL is written to a base_url environment variable; request URLs become {{base_url}}/path.
  • Parameters: in: query to params, in: header to headers, in: path substituted as {{paramName}} in the URL.
  • Body: prefers application/json, falls back through application/xml, text/plain, application/x-www-form-urlencoded, multipart/form-data. Uses example / examples when present, otherwise generates a minimal example from the schema (max depth 5).
  • Local $ref resolved one hop. Remote URL refs are skipped with a warning.
  • Auth schemes (http:bearer, http:basic, apiKey, oauth2) map to request auth; secrets are written as {{VAR_NAME}} placeholders in a generated environment.
  • The Import OpenAPI / Swagger dialog shows endpoint count, tag list, and detected auth types in a preview before import.

Postman Collection v2.1

Reads the standard Postman JSON export format (importPostmanCollection).

  • Preserves folder hierarchy
  • Auth: basic, bearer, API key, OAuth 2.0, AWS Signature v4
  • Headers and all body modes: raw, JSON, XML, URL-encoded, form-data, binary, GraphQL
  • Collection and folder variables
  • Unsupported features (pre-request scripts, test scripts, unknown auth types) generate import warnings — the request is still imported without them

Bruno .bru Folders

Reads a directory of .bru files, Bruno's INI-like plain-text format (importBrunoFolder).

  • Parses method blocks, headers, and auth (bearer, basic)
  • Body modes: JSON, XML, text, URL-encoded, multipart
  • Query params and path params
  • Folder hierarchy mirrors the directory structure on disk

Insomnia v4 JSON

Reads Insomnia v4 export files (importInsomniaExport). The file must have _type: "export" and __export_format: 4.

  • Walks the resource list by type: request, request_group, environment, cookie_jar
  • Rebuilds folder tree from _id / parentId relationships
  • Maps all five Insomnia auth types
  • Cookie jars and workspace resources generate import warnings

HAR 1.2

Reads Chrome DevTools HAR exports (importHar).

  • Each log.entries[].request becomes one Scrapeman request
  • Handles JSON, XML, form, HTML, and plain-text body types
  • HTTP/2 pseudo-headers (:method, :path, etc.) are automatically skipped

curl

Paste a curl command directly into the import dialog, or import from a .sh file. Built on top of @scrape-do/curl-parser for the standard surface (URL, method, basic auth, user-agent, cookies, boolean flags, multipart, urlencoded body). Scrapeman extracts -d / -H / -F values, proxy / referer flags, and ANSI-C $'...' quoting before handing off, so escaped sequences inside Chrome's Copy as cURL (bash) output round-trip cleanly.

Parsed flags include:

  • -X / --request — HTTP method
  • -H / --header — request headers
  • -d / --data / --data-raw / --data-binary — request body, with ANSI-C escape expansion (\n, \t, \xHH, \NNN, \\, \', \")
  • -u / --user — basic auth
  • --cookie — cookie header
  • -F / --form — multipart form fields
  • --proxy, --referer, -A / --user-agent

Export Formats

HAR 1.2

Exports history entries as a standard HAR file (exportHar).

  • Maps request, response, timings, and query parameters to the HAR schema
  • Round-trip tested: import then export then re-import produces an equivalent collection

Postman v2.1 (planned)

Export the active collection as a Postman v2.1 JSON file. Tracked as T093.

.sman Bundle (planned)

A ZIP-based portable bundle containing .sman files, environments, and body sidecars. Designed for sharing a workspace as a single file without requiring a git repository. Tracked as T097/T098.