nexqdata/ docs

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

GET/api/scraper-agents
curl "$NEXQDATA_API/api/scraper-agents" \
  -H "X-Api-Key: $NEXQDATA_API_KEY"
200 OK — abridged
{
  "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

GET/api/scraper-agents/{id}

Uses the agent's id (GUID).

Agent ids

Every agent has two ids, and they're used in different places:

FieldTypeUsed by
idGUIDGET /api/scraper-agents/{id}, /{id}/runs, /{id}/jobs
externalAgentIdstringPOST /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

GET/api/scraper-agents/{id}/sample-output

A 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.

GET/api/scraper-agents/{id}/sample-output/download

Downloads the sample as a JSON file. Returns 404 SAMPLE_OUTPUT_NOT_FOUND when there's no sample.

On this page