Agents
List the agents you can run, and read their inputs.
An agent is NexqData's collection for one source. You can see and run the agents assigned to you or your company.
List your agents
/ api/ scraper-agentscurl "$NEXQDATA_API/api/scraper-agents" \
-H "X-Api-Key: $NEXQDATA_API_KEY"{
"success": true,
"data": [
{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"externalAgentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "Court records · TX",
"version": "3.2.0",
"inputParameters": [
{ "key": "FirstName", "defaultValue": "" },
{ "key": "LastName", "defaultValue": "" }
]
}
]
}Read one agent
/ api/ scraper-agents/ {id}Uses the agent's id (GUID).
Agent ids
Every agent has two ids, and they're used in different places:
| Field | Type | Used by |
|---|---|---|
id | GUID | GET /api/scraper-agents/{id}, /{id}/runs, /{id}/jobs |
externalAgentId | string | POST /api/scraper-agents/{externalAgentId}/start-job and /run |
Passing an id where an externalAgentId is expected (or the reverse) returns 404 or 400. Read both from the list above and keep them together.
Inputs
inputParameters lists the keys an agent accepts, with any default values. When you start a job, you send values for those keys as a JSON-encoded string:
{ "inputParameters": "{\"FirstName\":\"John\",\"LastName\":\"Doe\"}" }Each agent is engineered for its source, so the keys differ from agent to agent. The list above shows each agent's keys, with their default values.
Sample output
/ api/ scraper-agents/ {id}/ sample-outputA representative example of what the agent returns — useful for building your parser before you've run the agent. It's sample data, never the result of a live run.
The response describes the sample: recordCount, fieldCount, recordPath (where the records sit in the JSON), a field-by-field schema, and the rawJson itself. data is null when the agent has no sample.
/ api/ scraper-agents/ {id}/ sample-output/ downloadDownloads the sample as a JSON file. Returns 404 SAMPLE_OUTPUT_NOT_FOUND when there's no sample.