Job result API
  1. Docs
  2. Jobs
  3. Job result API

Job result API

Poll a job that answered 202.

GET /v1/jobs/{job_id}

GET /v1/jobs/{job_id}

Poll a job that answered 202. Free while pending; when done this returns the job's final envelope (and charges then, once).

  • Cost: Free
  • Cache: Not cached.

Parameters#

NameTypeRequiredDescriptionIn
job_idstringyesJob id from the 202 answer.path

Example request#

Set your key in the environment first (see Authentication).

1curl "https://api.socialscrape.dev/v1/jobs/job_0123456789abcdef01234567" \2  -H "x-api-key: $SOCIALSCRAPE_API_KEY"

Example response#

This is a sample with illustrative values. Status 202.

200 OKSample response
1{2  "ok": true,3  "credits_charged": 0,4  "credits_remaining": 5000,5  "cached": false,6  "cached_at": null,7  "request_id": "req_880140c567a69012f7f36cb1",8  "data": {9    "object": "job",10    "job_id": "job_0123456789abcdef01234567",11    "status": "running",12    "poll_url": "https://api.socialscrape.dev/v1/jobs/job_0123456789abcdef01234567"13  },14  "cursor": null,15  "has_more": null16}

Response#

A JobAccepted object in data.

See Data models for every field. The envelope around data is described in Responses.

Errors#

Failures are free: credits_charged is 0. Branch on error.code, never on the message.

CodeHTTPRetryMeaning
invalid_params400noA parameter is missing, unknown or has the wrong type.

Every request can also fail with the account and platform errors listed on the Errors page.