nexqdata/ docs

Quickstart

Run an agent from your code and download its dataset — in about five minutes.

By the end of this page you'll have started a NexqData agent with your own inputs, followed the job until it finished, and downloaded the structured data it collected.

Before you start

You need a NexqData workspace with at least one agent assigned to you, and your API base URL — it's set up with your workspace. The examples read it from NEXQDATA_API.

Create an API key

In the dashboard, open your account menu → API keysGenerate key. Copy the key when it's shown — it's stored as a hash and can't be shown again.

Keep it in an environment variable, never in source code:

.env
NEXQDATA_API=<your API base URL>
NEXQDATA_API_KEY=nxd_live_••••••••••••••••

See Authentication for scopes, rotation, and storage.

Find your agent

List the agents assigned to you:

curl "$NEXQDATA_API/api/scraper-agents" \
  -H "X-Api-Key: $NEXQDATA_API_KEY"

From your agent's entry, keep two things:

  • its externalAgentId — you start the agent with it;
  • its inputParameters — the keys the agent accepts, such as FirstName and LastName.

Shortcut: in the dashboard, open Agents → Repository, open the row menu on your agent, and choose Copy as cURL. You get the start-job request below, with the agent's id and input keys already filled in.

Agents have two ids

Starting an agent uses its externalAgentId (a string). Reading an agent and its history uses its id (a GUID). See Agents.

Start a job

Start the agent as a job — the way the NexqData platform itself starts agents. Send its inputs as inputParameters, a JSON-encoded string, not an object.

curl -X POST "$NEXQDATA_API/api/scraper-agents/$EXTERNAL_AGENT_ID/start-job" \
  -H "X-Api-Key: $NEXQDATA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inputParameters": "{\"FirstName\":\"John\",\"LastName\":\"Doe\"}"}'

The job starts immediately and completes in the background. The response gives you its id:

200 OK
{
  "success": true,
  "message": "Job started.",
  "data": {
    "agentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "externalAgentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "agentJobHistoryId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "jobRunId": 48213,
    "sessionId": "",
    "startedAt": "2026-09-23T02:00:04Z"
  }
}

Keep agentJobHistoryId — it's the job id you'll use below.

Check on the job

Look the job up by its id:

curl "$NEXQDATA_API/api/scraper-agents/jobs?jobId=$JOB_ID" \
  -H "X-Api-Key: $NEXQDATA_API_KEY"

Check every few seconds until the job's isTerminal is true. Then its status tells you how it went: 3 means it succeeded and its data is ready; 4 or 5 means it failed, and errorMessage says why. See Jobs.

Download the data

Download everything the job collected:

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 exports — and for a job that ran in several sessions, it's one combined zip. Or open it as a dataset to preview and query it first.

Next steps

On this page