Skip to content
API console (try a request with your own key)Get early access

Exports

GET /v1/extractions/{jobId}/export?format=json|csv|xlsx downloads a finished job’s values as one file. format is json when left out.

export.sh
#!/usr/bin/env bash
set -euo pipefail
API=https://api.speccapture.com
AUTH="Authorization: Bearer $SPECCAPTURE_API_KEY"
JOB_ID=7c9e6679-7425-40de-944b-e07fc1f90ae7 # the jobId the submission answered with
curl -sS --fail-with-body "$API/v1/extractions/$JOB_ID/export?format=xlsx" \
-H "$AUTH" \
-o extraction.xlsx
curl -sS --fail-with-body "$API/v1/extractions/$JOB_ID/export?format=csv" \
-H "$AUTH" \
-o extraction-csv.zip
curl -sS --fail-with-body "$API/v1/extractions/$JOB_ID/export?format=json" \
-H "$AUTH" \
-o extraction.json
echo "Saved extraction.xlsx, extraction-csv.zip and extraction.json"

Save as export.sh, set SPECCAPTURE_API_KEY, and run: bash export.sh. Needs curl; scripts also use bash and jq.

format Content type Saved as What it holds
json application/json {upload name}-extraction.json When the job’s template lays its JSON out flat or nested: formatVersion (1), workspace, exportedAt, then exactly what GET /v1/extractions/{jobId}/values answers. When its JSON is complete - the standard template’s, and every template’s that never chose - formatVersion (1), workspace, exportedAt, job - exactly what GET /v1/extractions/{jobId} answers - and sheets, each exactly what GET .../sheets/{n} answers. Indented UTF-8; ± and ° are written as themselves.
csv application/zip {upload name}-extraction-csv.zip sheets.csv (one row per sheet) or values.csv (one row per value), as the template chooses, one file per table type named by its path (revisionHistory.csv, bom.csv, holeTable.csv, application.csv, dashNumbers.csv) and generalNotes.csv (empty for a job read with the standard template, which leaves the notes out: below).
xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet {upload name}-extraction.xlsx A Cover tab (workspace, job, file, template, status, engine version, export time, how to read it), Sheets or Values, a tab per table type (named by the template: Revision History, Bill of Materials, …) and the notes (empty for a job read with the standard template, as the CSV’s).

The template decides what the files hold (its output): plain values, or each value with the extras the template carries. Every template reads the drawing the same way; its output decides only how its values are delivered. A job keeps the template version it was uploaded with, so its files keep their layout.

A template says what its files hold; a download picks the file, and may ask for every detail instead:

Parameter Values What it chooses
format json (when left out), csv, xlsx Which file. Every finished job has all three.
content template (when left out), complete complete is every detail of what the job kept, whatever its template’s files hold: the JSON is the job and every sheet exactly as GET /v1/extractions/{jobId} and its sheets answer them, and the CSV and Excel files are laid out as the standard template’s are - each sheet’s status, engine version and completion time, and beside every value what was read, its review state and its confidence - over the job’s own fields, under its template’s names and in its order.
keys names, paths The keys of a JSON file in the template’s shape, as on /values; the template’s own when left out. The complete answer carries both each value’s path and its name, so keys changes nothing there, nor in the CSV and Excel files.
export_every_detail.sh
#!/usr/bin/env bash
set -euo pipefail
API=https://api.speccapture.com
AUTH="Authorization: Bearer $SPECCAPTURE_API_KEY"
JOB_ID=7c9e6679-7425-40de-944b-e07fc1f90ae7 # the jobId the submission answered with
curl -sS --fail-with-body "$API/v1/extractions/$JOB_ID/export?format=xlsx&content=complete" \
-H "$AUTH" \
-o extraction-complete.xlsx
curl -sS --fail-with-body "$API/v1/extractions/$JOB_ID/export?format=json&keys=paths" \
-H "$AUTH" \
-o extraction-by-paths.json
echo "Saved extraction-complete.xlsx (every detail) and extraction-by-paths.json (keyed by SpecCapture's paths)"

Save as export_every_detail.sh, set SPECCAPTURE_API_KEY, and run: bash export_every_detail.sh. Needs curl; scripts also use bash and jq.

  • Never a field the job did not keep. What a job keeps is decided when it is uploaded, by its template: a field the template leaves out is not stored, and no download brings it back. For every field, sizes and counts included, upload with a template that keeps them all; the standard template (templateId drawing) keeps every field but those.
  • Never a waiting value left blank. With every detail, a value still waiting for a person is there with needsReview beside it, so check those before you rely on them.
  • Made afresh, never stored. Every detail is made from the values as they stand when it is asked for, and saved as {upload name}-extraction-complete.json, -extraction-complete-csv.zip or -extraction-complete.xlsx. The files SpecCapture keeps for a finished job are always its template’s, so a download without content is the file it always was.
  • The links a webhook carries (data.exports) take the same parameters: add &content=complete or &keys=paths to the link you follow.
  • A content or keys the API does not know is 400 invalid_request.

The CSV is always a zip, even for a job whose drawings print no table: a program reading it finds the same files every time, and a table no sheet printed is a file with its heading row only. Each file is RFC 4180 (comma-separated, CRLF, a field quoted when it holds a comma, a quote or a line break) in UTF-8 with a byte-order mark, so Excel reads it as UTF-8. Times are ISO 8601 in UTC (2026-10-12T09:01:00Z).

Columns. The Sheets file and tab have Sheet, then - when the template carries each sheet’s details - Sheet status, then Sheet review, then with the details Engine version and Completed at, then every single-valued field the job’s template keeps, in its order, headed by its names (Part Number, Drawing Number, …, or the workspace’s own). A table or the notes a template of yours leaves out has no file or tab; the standard template keeps its notes file and tab, empty (below). A table’s file and tab have Sheet, Sheet review, Row (1 for the table’s first row: the API’s rowIndex + 1), then the template’s columns. Every column is there whether or not the job has a value for it, so the files’ shape depends on the template, never on what one drawing printed; a value at a path the template does not name gets a column of its own after the template’s, headed by its path, so nothing read is ever dropped.

Each value is its column, then the extras the template carries, in this order: the value as it stands (a reviewer’s correction when there is one); - as read, what the engine read, filled only beside a correction; - review (autoAccepted, needsReview, accepted, corrected); - confidence (0 to 1; empty for a general note, which is not scored, and beside a correction); - box (the box’s left, top, right and bottom as fractions of the page, 0.6367,0.8016,0.6698,0.8248), with - match on sheet beside it (the API’s matchOnSheet: exact, approximate, noMatch, tooShortToLookFor, nothingRead or workedOut; Where a value was found on the sheet); and - quote (the text it was read from). Without the review state, a value still waiting for a person is left blank (shaded amber in the workbook) and its heading is named in a last column, Waiting for review, so nothing unchecked is imported as final; with it, the value is there and its state beside it. Either way a value waiting for review is never exported as if it were final. The notes are generalNotes.csv and their tab: one row per note, sheet by sheet in printed order, under Note, the whole note as it stands. Before it, Note number is the number the note is printed with (a whole number in the workbook), read as a note’s number is in Tables and never counted: empty for a note printed with none, and for one left blank while it waits. A job read with the standard template keeps the file and the tab with no rows, since 2026-10-21: the standard template leaves the notes out until a workspace turns them on, and the file and tab stay so the files have the same shape when they are, and an import built on them keeps working. The workbook’s cover says why the tab is empty.

One row per value. A template whose spreadsheetRows is perValue has values.csv and a Values tab in place of the Sheets file: one row for each field it keeps on each sheet - Sheet, Sheet review, Field (its name), Key (its path), Value, the extras, and Waiting for review (Yes beside a value left blank) - given or not, so an import that takes one value a row sees every field. Tables and notes keep their own files.

The standard template, and every template made before these choices keep the layout they always had: the standard template’s files carry each sheet’s details, what was read, the review state and the confidence - four columns a value - and a template that chose values only has one column per field.

In the workbook, values are always text (1:2 stays a scale, 0012 keeps its zeros, nothing is run as a formula), confidences are numbers, every tab has a frozen, filterable heading row, a value waiting for review is shaded amber and a correction blue. In the CSV a value is written exactly as the API returns it, except one a spreadsheet would run as a formula - it starts with =, @, a tab, or a sign followed by more than a number, white space in front not counting - which gets a leading apostrophe; an amount such as -, -.005 or +.002/-.000 is left alone. A field holding a semicolon is quoted, as Excel separates fields with ; where the comma is the decimal mark.

Values only. A template that carries nothing beside a value - every template made in the dashboard starts so, for an ERP import - has one column per field: Sheet, Sheet review, then each field under its name, then Waiting for review. A corrected value is the correction. A table’s file is the same, row by row. No sheet is ever left out. The workbook’s cover names the template and its version, and says what each column holds.

Always current. The file says what the API says at the moment it is asked: a value a reviewer corrected after the job finished is exported corrected. Two downloads of the same values differ only in exportedAt (and the cover’s export time). Answers carry Cache-Control: no-store.

From the dashboard. A document’s Export menu offers the same three files, named for what arrives: Excel, CSV files (zip) and JSON, and Every detail…: a small dialog choosing the file, each with every detail, the same as content=complete. One difference: a JSON file downloaded there names each sheet’s resultUrl as a full address on the API (https://api.speccapture.com/v1/extractions/{jobId}/sheets/1), because a file kept away from the API has nothing to resolve a path against; the API’s own download keeps the paths its answers give. To download many documents as one file, tick them on the Documents page - one by one, a whole page with the box above the list, or, once a page is ticked, every finished document the search and filter match - and choose a format from the selection bar’s Export menu - or Every detail… there, as on a document’s menu: the same file POST /v1/exports makes, up to 100 sheets. A document still being read cannot be ticked. A larger selection, up to 5,000 sheets, is offered as “Prepare them as one file”: SpecCapture makes it in the background, and it appears under Exports on the Documents page with a Download button when it is ready, kept 7 days - the same export job POST /v1/exports answers 202 with.

Answer When
200 The job is completed or failed (a failed job exports its sheets with no values)
400 invalid_request format is not json, csv or xlsx, content is not template or complete, or keys is not names or paths
404 not_found No such job in the workspace - another workspace’s id answers the same
409 not_finished The job is queued, splitting or extracting; the problem’s jobStatus says which

POST /v1/exports makes one file of many finished extractions - a week’s drawings for an ERP import, a project’s for a drawing register. Send JSON naming the format and either the extractions or a filter:

{ "format": "xlsx", "extractionIds": ["6f1c2b3a-4d5e-4f60-8a71-92b3c4d5e6f7", "0b9e7f5d-3c2a-4e1b-9a8c-7d6e5f4a3b2c"] }
{ "format": "csv", "filter": { "status": "completed", "createdAfter": "2026-10-01T00:00:00Z", "fileName": "bracket" } }
  • extractionIds: 1 to 500 job ids, exported in the order named; an id named twice is exported once.
  • filter: the narrowing GET /v1/extractions takes - status (completed or failed; both when left out), fileName (part of the file name, in any case), createdAfter and createdBefore (read exactly as that list reads them, but written as JSON: an offset as it is, 2026-10-14T09:30:00+02:00, never %2B) - over the workspace’s finished extractions, newest first. {} is every finished extraction; a filter that matches none answers a file with headings and no rows.
  • format: json when left out, csv or xlsx. Send exactly one of extractionIds and filter.
  • content: template when left out, or complete for every detail - the CSV and Excel files in the full layout, what was read, the review state and the confidence beside every value and each sheet’s details, whatever the documents’ templates carry; never a field a document did not keep, and never a waiting value left blank. The JSON is the complete answer either way. Saved with -complete after the date: speccapture-export-{date}-complete.xlsx.
batch_export_every_detail.sh
#!/usr/bin/env bash
set -euo pipefail
API=https://api.speccapture.com
AUTH="Authorization: Bearer $SPECCAPTURE_API_KEY"
status=$(curl -sS --fail-with-body "$API/v1/exports" \
-H "$AUTH" \
-H "Content-Type: application/json" \
-d '{"format":"xlsx","content":"complete","filter":{"status":"completed","createdAfter":"2026-10-01T00:00:00Z"}}' \
-o extractions-complete.xlsx \
-w '%{http_code}')
if [[ $status == 202 ]]; then
exportJob=$(cat extractions-complete.xlsx) && rm extractions-complete.xlsx
jq -r '"Over 100 sheets: export \(.exportId) is \(.status). Follow it until it is ready, then download its file."' <<<"$exportJob"
else
echo "Saved extractions-complete.xlsx"
fi

Save as batch_export_every_detail.sh, set SPECCAPTURE_API_KEY, and run: bash batch_export_every_detail.sh. Needs curl; scripts also use bash and jq.

The answer is 200 with the file, saved as speccapture-export-{date}.json, speccapture-export-{date}-csv.zip or speccapture-export-{date}.xlsx:

  • JSON: formatVersion (1), workspace, exportedAt, extractions - each exactly what GET /v1/extractions/{jobId} answers - and sheets, each exactly what GET .../sheets/{n} answers and naming its jobId: extraction by extraction in the export’s order, each one’s sheets in page order.
  • CSV and XLSX: the files above, each row starting with its document: Document (the uploaded file’s name) and Extraction id on every file and tab, and Template - the template it was uploaded with, “ERP import, version 3”, or “Standard” for the standard one, as GET /v1/templates names it - on the sheets. The workbook’s cover counts the documents and sheets and names their templates.

Documents uploaded with different templates share one column per field. A field’s path, such as titleBlock.partNumber, is what a column is; a template decides only where it goes and what it is called. The first document’s template gives its fields in its order, and each later template adds the fields it keeps that no earlier one did, after them; tables and their columns combine the same way. A column is headed by every name its templates give it, joined with “ / “ - Item number / Part Number - and a field a document’s template does not keep is empty for that document, its review and confidence cells too. The CSV and Excel files carry what the documents’ templates carry when every one lays its files out alike - the same extras, the same rows - and the full layout, nothing hidden, otherwise, or when the request asks for content complete. With one template, the columns are exactly that template’s. A batch’s JSON is always the complete answer, every extraction and sheet exactly as the API answers them, whatever the templates’ JSON.

Up to 100 sheets, the file comes back at once, built while you wait. From 101 to 5,000 sheets, it is an export job: the answer is 202 with the export and Location: /v1/exports/{exportId}, and SpecCapture makes the file in the background - a minute or two for the largest. A selection holding more is refused with 422 export_too_large, whose sheetCount, extractionCount and maximumSheets say by how much: name fewer extractions in each request, or split the filter by createdAfter and createdBefore. Exporting reads values already read, and is never charged.

Answer When
200 The file: up to 100 sheets
202 An export job: 101 to 5,000 sheets. The body is the export (status queued); follow it as below
400 invalid_request The body is not what the endpoint takes: neither or both of extractionIds and filter, more ids than it takes, a format, content or status it does not know, a time it cannot read; detail names it
404 not_found A named extraction is not the workspace’s - another workspace’s id answers the same; extractionId names it
409 not_finished A named extraction is still being read; extractionId and jobStatus say which and how far
409 too_many_exports The workspace already has 5 exports waiting or being made; waitingCount and maximumWaiting say so. They are made one at a time: ask again once one is ready
422 export_too_large The extractions hold more than 5,000 sheets

Nothing is half-done: a request that cannot be answered in full is refused whole, before anything is read.

What an export holds is decided when you ask: the extractions named, or every one the filter matched at that moment, in that order. An extraction finished a moment later is not in it, and one deleted before the file is made is left out and named in extractionsLeftOut (and on the workbook’s cover).

{
"exportId": "2b1e7c55-0c1a-4d2e-9b1f-6a4e2d8c9f31",
"format": "xlsx",
"content": "template",
"status": "ready",
"extractionCount": 412,
"sheetCount": 1187,
"createdAt": "2026-10-14T15:30:00.118Z",
"createdBy": { "kind": "apiKey", "name": "ERP import" },
"completedAt": "2026-10-14T15:31:12.402Z",
"expiresAt": "2026-10-21T15:31:12.402Z",
"fileUrl": "/v1/exports/2b1e7c55-0c1a-4d2e-9b1f-6a4e2d8c9f31/file",
"fileName": "speccapture-export-2026-10-14.xlsx",
"fileSizeBytes": 2483301,
"extractionsLeftOut": [],
"problem": null
}
  • content: what the request asked the file to hold: template, or complete for every detail.
  • status: queued while it waits its turn - one export of a workspace is made at a time - then building, then ready. failed means it could not be made, and problem says why: ask for it again. expired means its file was kept its 7 days and is gone; ask again for a new one.
  • Ask GET /v1/exports/{exportId} until it is ready, a few seconds apart - or add a webhook and wait for the export.ready event, whose body carries the export exactly as that read answers it (see Webhooks).
  • Download GET /v1/exports/{exportId}/file - the same file a smaller export answers at once, saved as fileName - any time before expiresAt, as often as you like.
  • GET /v1/exports lists the workspace’s exports, newest first, whoever asked - through the API or in the dashboard - under the list convention (Lists and paging); an export stays listed 30 days.
GET /v1/exports/{exportId}/file When
200 The file, while the export is ready
404 not_found No such export in the workspace - another workspace’s id answers the same
409 export_not_ready It is still queued or building, or it failed; exportStatus says which
410 export_expired Its file was kept 7 days and has been deleted: ask for the export again