nexqdata/ docs

Datasets

Preview, query, and download a job's structured output.

Every successful job stores its output as a dataset. Datasets are private to the user who collected them by default, and can be shared with the rest of the user's company.

Download a job's output directly

The fastest path: download the job's export file.

GET/api/scraper-agents/jobs/{jobId}/export
curl "$NEXQDATA_API/api/scraper-agents/jobs/$JOB_ID/export" \
  -H "X-Api-Key: $NEXQDATA_API_KEY" -o results.csv

The file comes in the format the agent is set up to export — for example CSV, JSON, or Excel. A job that ran in several sessions downloads as one combined zip.

For one run's data only, use GET /api/scraper-agents/runs/{runId}/export.

Open a job as a dataset

To preview or query the data before downloading it, get the job's dataset id:

GET/api/scraper-agents/jobs/{jobId}/dataset

The response's data.datasetId is what the endpoints below take. For one run, use GET /api/scraper-agents/runs/{runId}/dataset. To find datasets you already have, list them.

Preview

GET/api/data-explorer/datasets/{datasetId}/preview

Returns columns, the first rows, and whether the preview was truncated.

Query

POST/api/data-explorer/datasets/{datasetId}/query

Search, filter, sort, and page through a dataset without downloading it.

Request body
{
  "search": "Doe",
  "filters": [
    { "column": "status", "operator": "equals", "value": "Open" }
  ],
  "sortColumn": "filed",
  "sortDirection": "desc",
  "page": 1,
  "pageSize": 50
}
operatorMatches when the value…
contains (default)contains the text
equals, notequalsequals, or doesn't equal, the text
startswith, endswithstarts or ends with the text
isempty, isnotemptyis empty, or isn't
gt, gte, lt, lteis greater than, at least, less than, or at most the value

Text comparisons ignore case. pageSize defaults to 50, up to 200. The response adds totalMatches, page, and pageSize.

Download

GET/api/data-explorer/datasets/{datasetId}/download

When data isn't available

StatusCodeMeaning
400NO_FILE_EXPORTThe job or run produced no file to download.
402PAYMENT_REQUIREDThe data exists, but the final payment hasn't settled.
404JOB_NOT_FOUND, RUN_NOT_FOUNDThe job or run doesn't exist, or you don't have access to it.
410EXPORT_EXPIREDThe file was removed by your retention period.

Retention is set per company or per user; when it lapses, the file is removed but the record that the job produced data is kept.

On this page