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.
/ api/ scraper-agents/ jobs/ {jobId}/ exportcurl "$NEXQDATA_API/api/scraper-agents/jobs/$JOB_ID/export" \
-H "X-Api-Key: $NEXQDATA_API_KEY" -o results.csvThe 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:
/ api/ scraper-agents/ jobs/ {jobId}/ datasetThe 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
/ api/ data-explorer/ datasets/ {datasetId}/ previewReturns columns, the first rows, and whether the preview was truncated.
Query
/ api/ data-explorer/ datasets/ {datasetId}/ querySearch, filter, sort, and page through a dataset without downloading it.
{
"search": "Doe",
"filters": [
{ "column": "status", "operator": "equals", "value": "Open" }
],
"sortColumn": "filed",
"sortDirection": "desc",
"page": 1,
"pageSize": 50
}operator | Matches when the value… |
|---|---|
contains (default) | contains the text |
equals, notequals | equals, or doesn't equal, the text |
startswith, endswith | starts or ends with the text |
isempty, isnotempty | is empty, or isn't |
gt, gte, lt, lte | is 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
/ api/ data-explorer/ datasets/ {datasetId}/ downloadWhen data isn't available
| Status | Code | Meaning |
|---|---|---|
400 | NO_FILE_EXPORT | The job or run produced no file to download. |
402 | PAYMENT_REQUIRED | The data exists, but the final payment hasn't settled. |
404 | JOB_NOT_FOUND, RUN_NOT_FOUND | The job or run doesn't exist, or you don't have access to it. |
410 | EXPORT_EXPIRED | The 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.