Quickstart
Your first batch, submitted and read, in two calls.
On this page
Two calls. One submits a batch, the other reads it. That is the whole shape of this API, and it does not change as your job grows from one row to fifty thousand.
1. Submit #
curl -X POST "https://api.easydata.win/v1/profiles/enrich" \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{"targets": ["https://linkedin.com/in/satyanadella"]}'You get a 202 and a batch id - the same 202 whether you sent one target or fifty thousand, so your client never has to branch on which shape came back. If something is waiting on the answer, the same path with /sync on the end takes a single target and returns the record in the response instead, for twice the credits.
{
"data": {
"batch_id": "afec9131-080b-4b96-b3bb-726249e4bbf8",
"operation": "profiles.enrich",
"status": "queued",
"total": 1,
"recommended_poll_ms": 2000
},
"meta": { "requestId": "req_8f2ka91x", "recommendedPollMs": 2000 }
}2. Read #
Read the results as often as you like while it fills in. You do not have to wait for the batch to finish - entries are readable the moment they land.
curl "https://api.easydata.win/v1/batches/afec9131-080b-4b96-b3bb-726249e4bbf8/results" \
-H "X-API-Key: $API_KEY"{
"data": {
"batch_id": "afec9131-080b-4b96-b3bb-726249e4bbf8",
"status": "completed",
"entries": [
{
"item_index": 0,
"input": "https://linkedin.com/in/satyanadella",
"status": "succeeded",
"credits_used": 1,
"data": { "full_name": "Satya Nadella", "headline": "Chairman and CEO at Microsoft", "...": "Profile" }
}
]
},
"meta": { "requestId": "req_8f2kb02y", "nextCursor": "eyJzZXEiOjF9", "hasMore": false }
}That is the loop #
For a bigger batch, keep passing meta.nextCursor back as ?cursor= until meta.hasMore is false. The cursor is monotonic and stable, so walking it to exhaustion gives you every entry exactly once even while the batch is still filling in behind you.
If you would rather be told than ask, set callback_url on the submission and we will POST you a signed batch.completed when it is done. Polling stays a first-class path either way.
Next #
- The batch model, in full: streaming, cancellation, idempotency.
- What a credit is, and why every price is derived rather than picked.
- The reference page for the operation you actually want.