Async jobs

Embed
Preview of the card
<a href="https://scrapely.15.204.158.166.sslip.io/docs/ref-async-jobs"><img src="https://scrapely.15.204.158.166.sslip.io/docs/_api/public/orgs/affc5b0f-d3c2-423a-8143-9d10db5736ae/spaces/981e6275-da3f-446c-82de-889f59c83b6f/pages/ecc75cf4-d7f9-465e-bc6f-842397b8151c/social-card.svg?v=3e7ae33eec8b" alt="Async jobs" width="600" height="315"></a>
GEThttps://scrapely.15.204.158.166.sslip.io/api/v1/jobs
List jobs
Parameters
statusstringquery
queued | running | finished | failed | cancelled
batch_idstringquery
limitintegerquery
= 50
Code samples
cURL
curl -X GET "https://scrapely.15.204.158.166.sslip.io/api/v1/jobs?status=&batch_id=&limit="
TypeScript
const res = await fetch('https://scrapely.15.204.158.166.sslip.io/api/v1/jobs?status=&batch_id=&limit=', {
  method: 'GET',
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://scrapely.15.204.158.166.sslip.io/api/v1/jobs?status=&batch_id=&limit=",
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://scrapely.15.204.158.166.sslip.io/api/v1/jobs?status=&batch_id=&limit=", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://scrapely.15.204.158.166.sslip.io/api/v1/jobs?status=&batch_id=&limit=');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://scrapely.15.204.158.166.sslip.io/api/v1/jobs?status=&batch_id=&limit=')
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://scrapely.15.204.158.166.sslip.io/api/v1/jobs?status=&batch_id=&limit="))
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 Newest first. Results are not included; fetch a job for its content.
Example
{
  "object": {},
  "data": [
    {
      "id": "job_5f0c8a1b2d3e4f56",
      "object": {},
      "status": "queued",
      "url": "string",
      "batch_id": "string",
      "options": {
        "render": false,
        "premium": false,
        "ultra_premium": false,
        "country_code": "us",
        "device_type": "desktop",
        "session_number": 0,
        "keep_headers": false,
        "output_format": "html",
        "autoparse": false,
        "wait_for_selector": "string"
      },
      "credits": 0,
      "status_code": 0,
      "duration_ms": 0,
      "error": "string",
      "callback_url": "string",
      "created_at": "2024-01-01T00:00:00Z",
      "finished_at": "2024-01-01T00:00:00Z",
      "status_url": "string",
      "response": {
        "status_code": 0,
        "content_type": "string",
        "final_url": "string",
        "headers": {},
        "content": null,
        "expires_at": "2024-01-01T00:00:00Z"
      }
    }
  ],
  "has_more": true
}
Schema
object
dataJob[]
Show child parameters
idstring
object
statusstring
queued | running | finished | failed | cancelled
urlstring
batch_idstring
optionsobject
Options shared by sync scrapes, jobs and batches.
Show child parameters
renderboolean
Load the page in a headless browser and execute its JavaScript before returning the DOM. Cost: 10 credits.
= false
premiumboolean
Route through the residential proxy pool. Use for sites that block datacenter IPs. Cost: 10 credits (25 with render).
= false
ultra_premiumboolean
Our hardest-target pipeline: premium residential IPs, browser fingerprinting and CAPTCHA handling. Includes rendering. Cannot be combined with premium. Cost: 30 credits.
= false
country_codestring
Geotarget the request from this country (lowercase ISO 3166-1 alpha-2, e.g. us, de, jp).
us | ca | mx | br | ar | cl | co | pe | gb | ie | fr | de | nl | be | lu | ch | at | es | pt | it | gr | se | no | dk | fi | is | pl | cz | sk | hu | ro | bg | hr | si | ee | lv | lt | ua | tr | il | ae | sa | eg | za | ng | ke | ma | in | pk | bd
device_typestring
Send a desktop or mobile user agent and viewport.
desktop | mobile = desktop
session_numberinteger
Reuse the same proxy IP across requests that share this number (sticky session, ~15 minutes idle timeout).
keep_headersboolean
Forward the headers you send us (Cookie, Accept-Language, User-Agent, …) to the target instead of ours. Your API key, Host and proxy headers are never forwarded. Sync endpoint only.
= false
output_formatstring
Return the page as raw HTML, cleaned Markdown, plain text, or JSON (title, meta, links, text).
html | json | markdown | text = html
autoparseboolean
For supported domains, return structured JSON parsed from the page instead of HTML.
= false
wait_for_selectorstring
With render=true: wait until this CSS selector appears before capturing the page.
creditsinteger
Reserved while queued/running; charged when finished; 0 when failed or cancelled.
status_codeinteger
duration_msinteger
errorstring
callback_urlstring
created_atstring
finished_atstring
status_urlstring
Poll this.
responseobject
Present once the job is finished (or failed with a target answer). Kept for 72 hours.
Show child parameters
status_codeinteger
content_typestring
final_urlstring
headersobject
contentstring | object
expires_atstring
has_moreboolean
400 MISSING_PARAM or INVALID_PARAM; param names the culprit.
Example
{
  "error": {
    "code": "MISSING_PARAM",
    "message": "string",
    "param": "string",
    "docs": "/docs/errors#insufficient_credits"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
Stable, machine-readable. Branch on this, never on message.
MISSING_PARAM | INVALID_PARAM | UNAUTHORIZED | DEMO_READ_ONLY | INSUFFICIENT_CREDITS | NOT_FOUND | CONFLICT | CONCURRENCY_LIMIT | RATE_LIMITED | TARGET_FAILED | UNAVAILABLE | NOT_IMPLEMENTED | INTERNAL
messagestringrequired
Human-readable; may change.
paramstring
The parameter at fault, when there is one.
docsstring
Link to this code on /docs/errors.
401 UNAUTHORIZED: missing, unknown or revoked key.
Example
{
  "error": {
    "code": "MISSING_PARAM",
    "message": "string",
    "param": "string",
    "docs": "/docs/errors#insufficient_credits"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
Stable, machine-readable. Branch on this, never on message.
MISSING_PARAM | INVALID_PARAM | UNAUTHORIZED | DEMO_READ_ONLY | INSUFFICIENT_CREDITS | NOT_FOUND | CONFLICT | CONCURRENCY_LIMIT | RATE_LIMITED | TARGET_FAILED | UNAVAILABLE | NOT_IMPLEMENTED | INTERNAL
messagestringrequired
Human-readable; may change.
paramstring
The parameter at fault, when there is one.
docsstring
Link to this code on /docs/errors.
429 RATE_LIMITED or CONCURRENCY_LIMIT. Honour Retry-After.
Example
{
  "error": {
    "code": "MISSING_PARAM",
    "message": "string",
    "param": "string",
    "docs": "/docs/errors#insufficient_credits"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
Stable, machine-readable. Branch on this, never on message.
MISSING_PARAM | INVALID_PARAM | UNAUTHORIZED | DEMO_READ_ONLY | INSUFFICIENT_CREDITS | NOT_FOUND | CONFLICT | CONCURRENCY_LIMIT | RATE_LIMITED | TARGET_FAILED | UNAVAILABLE | NOT_IMPLEMENTED | INTERNAL
messagestringrequired
Human-readable; may change.
paramstring
The parameter at fault, when there is one.
docsstring
Link to this code on /docs/errors.
500 INTERNAL: our fault, not charged. Quote X-Request-Id.
Example
{
  "error": {
    "code": "MISSING_PARAM",
    "message": "string",
    "param": "string",
    "docs": "/docs/errors#insufficient_credits"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
Stable, machine-readable. Branch on this, never on message.
MISSING_PARAM | INVALID_PARAM | UNAUTHORIZED | DEMO_READ_ONLY | INSUFFICIENT_CREDITS | NOT_FOUND | CONFLICT | CONCURRENCY_LIMIT | RATE_LIMITED | TARGET_FAILED | UNAVAILABLE | NOT_IMPLEMENTED | INTERNAL
messagestringrequired
Human-readable; may change.
paramstring
The parameter at fault, when there is one.
docsstring
Link to this code on /docs/errors.
POSThttps://scrapely.15.204.158.166.sslip.io/api/v1/jobs
Create an async job

Queue a scrape and return immediately (202). Credits are reserved now and refunded if the job fails or is cancelled before it starts. Jobs never fail for concurrency: they wait for a free slot. Poll status_url, or pass callback_url to receive a signed webhook.

Parameters
Idempotency-Keystringheader
Any unique string up to 255 printable characters (a UUID is ideal). Retrying with the same key returns the original response with Idempotent-Replayed: true and charges nothing. A retry while the first is in flight is a 409; the same key with a different body is a 422. Remembered for 24 hours. Also accepted as the idempotency_key parameter.
Request body application/json
urlstringrequired
The page to scrape: an absolute http(s) URL, URL-encoded when sent in a query string. Private, loopback and link-local hosts are refused.
renderboolean
Load the page in a headless browser and execute its JavaScript before returning the DOM. Cost: 10 credits.
= false
premiumboolean
Route through the residential proxy pool. Use for sites that block datacenter IPs. Cost: 10 credits (25 with render).
= false
ultra_premiumboolean
Our hardest-target pipeline: premium residential IPs, browser fingerprinting and CAPTCHA handling. Includes rendering. Cannot be combined with premium. Cost: 30 credits.
= false
country_codestring
Geotarget the request from this country (lowercase ISO 3166-1 alpha-2, e.g. us, de, jp).
us | ca | mx | br | ar | cl | co | pe | gb | ie | fr | de | nl | be | lu | ch | at | es | pt | it | gr | se | no | dk | fi | is | pl | cz | sk | hu | ro | bg | hr | si | ee | lv | lt | ua | tr | il | ae | sa | eg | za | ng | ke | ma | in | pk | bd
device_typestring
Send a desktop or mobile user agent and viewport.
desktop | mobile = desktop
session_numberinteger
Reuse the same proxy IP across requests that share this number (sticky session, ~15 minutes idle timeout).
keep_headersboolean
Forward the headers you send us (Cookie, Accept-Language, User-Agent, …) to the target instead of ours. Your API key, Host and proxy headers are never forwarded. Sync endpoint only.
= false
output_formatstring
Return the page as raw HTML, cleaned Markdown, plain text, or JSON (title, meta, links, text).
html | json | markdown | text = html
autoparseboolean
For supported domains, return structured JSON parsed from the page instead of HTML.
= false
wait_for_selectorstring
With render=true: wait until this CSS selector appears before capturing the page.
callback_urlstring
HTTPS URL to POST the finished job to (signed). Falls back to the account webhook set in the dashboard.
{
  "url": "string",
  "render": false,
  "premium": false,
  "ultra_premium": false,
  "country_code": "us",
  "device_type": "desktop",
  "session_number": 0,
  "keep_headers": false,
  "output_format": "html",
  "autoparse": false,
  "wait_for_selector": "string",
  "callback_url": "string"
}
Code samples
cURL
curl -X POST "https://scrapely.15.204.158.166.sslip.io/api/v1/jobs" \
  -H "Idempotency-Key: <value>" \
  -H "Content-Type: application/json" \
  -d '{"url":"string","render":false,"premium":false,"ultra_premium":false,"country_code":"us","device_type":"desktop","session_number":0,"keep_headers":false,"output_format":"html","autoparse":false,"wait_for_selector":"string","callback_url":"string"}'
TypeScript
const res = await fetch('https://scrapely.15.204.158.166.sslip.io/api/v1/jobs', {
  method: 'POST',
  headers: {
    'Idempotency-Key': '<value>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"url":"string","render":false,"premium":false,"ultra_premium":false,"country_code":"us","device_type":"desktop","session_number":0,"keep_headers":false,"output_format":"html","autoparse":false,"wait_for_selector":"string","callback_url":"string"}),
});
const data = await res.json();
Python
import requests

res = requests.request(
    "POST",
    "https://scrapely.15.204.158.166.sslip.io/api/v1/jobs",
    headers={
    "Idempotency-Key": "<value>",
    "Content-Type": "application/json",
    },
    json={"url": "string", "render": False, "premium": False, "ultra_premium": False, "country_code": "us", "device_type": "desktop", "session_number": 0, "keep_headers": False, "output_format": "html", "autoparse": False, "wait_for_selector": "string", "callback_url": "string"},
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	req, _ := http.NewRequest("POST", "https://scrapely.15.204.158.166.sslip.io/api/v1/jobs", strings.NewReader(`{"url":"string","render":false,"premium":false,"ultra_premium":false,"country_code":"us","device_type":"desktop","session_number":0,"keep_headers":false,"output_format":"html","autoparse":false,"wait_for_selector":"string","callback_url":"string"}`))
	req.Header.Set("Idempotency-Key", "<value>")
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://scrapely.15.204.158.166.sslip.io/api/v1/jobs');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"url":"string","render":false,"premium":false,"ultra_premium":false,"country_code":"us","device_type":"desktop","session_number":0,"keep_headers":false,"output_format":"html","autoparse":false,"wait_for_selector":"string","callback_url":"string"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://scrapely.15.204.158.166.sslip.io/api/v1/jobs')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/json'
req.body = '{"url":"string","render":false,"premium":false,"ultra_premium":false,"country_code":"us","device_type":"desktop","session_number":0,"keep_headers":false,"output_format":"html","autoparse":false,"wait_for_selector":"string","callback_url":"string"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://scrapely.15.204.158.166.sslip.io/api/v1/jobs"))
    .header("Idempotency-Key", "<value>")
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"url\":\"string\",\"render\":false,\"premium\":false,\"ultra_premium\":false,\"country_code\":\"us\",\"device_type\":\"desktop\",\"session_number\":0,\"keep_headers\":false,\"output_format\":\"html\",\"autoparse\":false,\"wait_for_selector\":\"string\",\"callback_url\":\"string\"}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
202 Queued.
Example
{
  "id": "job_5f0c8a1b2d3e4f56",
  "object": {},
  "status": "queued",
  "url": "string",
  "batch_id": "string",
  "options": {
    "render": false,
    "premium": false,
    "ultra_premium": false,
    "country_code": "us",
    "device_type": "desktop",
    "session_number": 0,
    "keep_headers": false,
    "output_format": "html",
    "autoparse": false,
    "wait_for_selector": "string"
  },
  "credits": 0,
  "status_code": 0,
  "duration_ms": 0,
  "error": "string",
  "callback_url": "string",
  "created_at": "2024-01-01T00:00:00Z",
  "finished_at": "2024-01-01T00:00:00Z",
  "status_url": "string",
  "response": {
    "status_code": 0,
    "content_type": "string",
    "final_url": "string",
    "headers": {},
    "content": "string",
    "expires_at": "2024-01-01T00:00:00Z"
  }
}
Schema
idstring
object
statusstring
queued | running | finished | failed | cancelled
urlstring
batch_idstring
optionsobject
Options shared by sync scrapes, jobs and batches.
Show child parameters
renderboolean
Load the page in a headless browser and execute its JavaScript before returning the DOM. Cost: 10 credits.
= false
premiumboolean
Route through the residential proxy pool. Use for sites that block datacenter IPs. Cost: 10 credits (25 with render).
= false
ultra_premiumboolean
Our hardest-target pipeline: premium residential IPs, browser fingerprinting and CAPTCHA handling. Includes rendering. Cannot be combined with premium. Cost: 30 credits.
= false
country_codestring
Geotarget the request from this country (lowercase ISO 3166-1 alpha-2, e.g. us, de, jp).
us | ca | mx | br | ar | cl | co | pe | gb | ie | fr | de | nl | be | lu | ch | at | es | pt | it | gr | se | no | dk | fi | is | pl | cz | sk | hu | ro | bg | hr | si | ee | lv | lt | ua | tr | il | ae | sa | eg | za | ng | ke | ma | in | pk | bd
device_typestring
Send a desktop or mobile user agent and viewport.
desktop | mobile = desktop
session_numberinteger
Reuse the same proxy IP across requests that share this number (sticky session, ~15 minutes idle timeout).
keep_headersboolean
Forward the headers you send us (Cookie, Accept-Language, User-Agent, …) to the target instead of ours. Your API key, Host and proxy headers are never forwarded. Sync endpoint only.
= false
output_formatstring
Return the page as raw HTML, cleaned Markdown, plain text, or JSON (title, meta, links, text).
html | json | markdown | text = html
autoparseboolean
For supported domains, return structured JSON parsed from the page instead of HTML.
= false
wait_for_selectorstring
With render=true: wait until this CSS selector appears before capturing the page.
creditsinteger
Reserved while queued/running; charged when finished; 0 when failed or cancelled.
status_codeinteger
duration_msinteger
errorstring
callback_urlstring
created_atstring
finished_atstring
status_urlstring
Poll this.
responseobject
Present once the job is finished (or failed with a target answer). Kept for 72 hours.
Show child parameters
status_codeinteger
content_typestring
final_urlstring
headersobject
contentstring | object
expires_atstring
400 MISSING_PARAM or INVALID_PARAM; param names the culprit.
Example
{
  "error": {
    "code": "MISSING_PARAM",
    "message": "string",
    "param": "string",
    "docs": "/docs/errors#insufficient_credits"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
Stable, machine-readable. Branch on this, never on message.
MISSING_PARAM | INVALID_PARAM | UNAUTHORIZED | DEMO_READ_ONLY | INSUFFICIENT_CREDITS | NOT_FOUND | CONFLICT | CONCURRENCY_LIMIT | RATE_LIMITED | TARGET_FAILED | UNAVAILABLE | NOT_IMPLEMENTED | INTERNAL
messagestringrequired
Human-readable; may change.
paramstring
The parameter at fault, when there is one.
docsstring
Link to this code on /docs/errors.
401 UNAUTHORIZED: missing, unknown or revoked key.
Example
{
  "error": {
    "code": "MISSING_PARAM",
    "message": "string",
    "param": "string",
    "docs": "/docs/errors#insufficient_credits"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
Stable, machine-readable. Branch on this, never on message.
MISSING_PARAM | INVALID_PARAM | UNAUTHORIZED | DEMO_READ_ONLY | INSUFFICIENT_CREDITS | NOT_FOUND | CONFLICT | CONCURRENCY_LIMIT | RATE_LIMITED | TARGET_FAILED | UNAVAILABLE | NOT_IMPLEMENTED | INTERNAL
messagestringrequired
Human-readable; may change.
paramstring
The parameter at fault, when there is one.
docsstring
Link to this code on /docs/errors.
402 INSUFFICIENT_CREDITS: nothing was charged.
Example
{
  "error": {
    "code": "MISSING_PARAM",
    "message": "string",
    "param": "string",
    "docs": "/docs/errors#insufficient_credits"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
Stable, machine-readable. Branch on this, never on message.
MISSING_PARAM | INVALID_PARAM | UNAUTHORIZED | DEMO_READ_ONLY | INSUFFICIENT_CREDITS | NOT_FOUND | CONFLICT | CONCURRENCY_LIMIT | RATE_LIMITED | TARGET_FAILED | UNAVAILABLE | NOT_IMPLEMENTED | INTERNAL
messagestringrequired
Human-readable; may change.
paramstring
The parameter at fault, when there is one.
docsstring
Link to this code on /docs/errors.
409 CONFLICT: idempotent request in flight, or the job is already running/done.
Example
{
  "error": {
    "code": "MISSING_PARAM",
    "message": "string",
    "param": "string",
    "docs": "/docs/errors#insufficient_credits"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
Stable, machine-readable. Branch on this, never on message.
MISSING_PARAM | INVALID_PARAM | UNAUTHORIZED | DEMO_READ_ONLY | INSUFFICIENT_CREDITS | NOT_FOUND | CONFLICT | CONCURRENCY_LIMIT | RATE_LIMITED | TARGET_FAILED | UNAVAILABLE | NOT_IMPLEMENTED | INTERNAL
messagestringrequired
Human-readable; may change.
paramstring
The parameter at fault, when there is one.
docsstring
Link to this code on /docs/errors.
422 INVALID_PARAM with param: idempotency_key: the key was used for a different request.
Example
{
  "error": {
    "code": "MISSING_PARAM",
    "message": "string",
    "param": "string",
    "docs": "/docs/errors#insufficient_credits"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
Stable, machine-readable. Branch on this, never on message.
MISSING_PARAM | INVALID_PARAM | UNAUTHORIZED | DEMO_READ_ONLY | INSUFFICIENT_CREDITS | NOT_FOUND | CONFLICT | CONCURRENCY_LIMIT | RATE_LIMITED | TARGET_FAILED | UNAVAILABLE | NOT_IMPLEMENTED | INTERNAL
messagestringrequired
Human-readable; may change.
paramstring
The parameter at fault, when there is one.
docsstring
Link to this code on /docs/errors.
429 RATE_LIMITED or CONCURRENCY_LIMIT. Honour Retry-After.
Example
{
  "error": {
    "code": "MISSING_PARAM",
    "message": "string",
    "param": "string",
    "docs": "/docs/errors#insufficient_credits"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
Stable, machine-readable. Branch on this, never on message.
MISSING_PARAM | INVALID_PARAM | UNAUTHORIZED | DEMO_READ_ONLY | INSUFFICIENT_CREDITS | NOT_FOUND | CONFLICT | CONCURRENCY_LIMIT | RATE_LIMITED | TARGET_FAILED | UNAVAILABLE | NOT_IMPLEMENTED | INTERNAL
messagestringrequired
Human-readable; may change.
paramstring
The parameter at fault, when there is one.
docsstring
Link to this code on /docs/errors.
500 INTERNAL: our fault, not charged. Quote X-Request-Id.
Example
{
  "error": {
    "code": "MISSING_PARAM",
    "message": "string",
    "param": "string",
    "docs": "/docs/errors#insufficient_credits"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
Stable, machine-readable. Branch on this, never on message.
MISSING_PARAM | INVALID_PARAM | UNAUTHORIZED | DEMO_READ_ONLY | INSUFFICIENT_CREDITS | NOT_FOUND | CONFLICT | CONCURRENCY_LIMIT | RATE_LIMITED | TARGET_FAILED | UNAVAILABLE | NOT_IMPLEMENTED | INTERNAL
messagestringrequired
Human-readable; may change.
paramstring
The parameter at fault, when there is one.
docsstring
Link to this code on /docs/errors.
GEThttps://scrapely.15.204.158.166.sslip.io/api/v1/jobs/{id}
Get a job

Status, and response (the page) once finished. Results are kept for 72 hours.

Parameters
idstringpathrequired
The job id.
Code samples
cURL
curl -X GET "https://scrapely.15.204.158.166.sslip.io/api/v1/jobs/{id}"
TypeScript
const res = await fetch('https://scrapely.15.204.158.166.sslip.io/api/v1/jobs/{id}', {
  method: 'GET',
});
const data = await res.json();
Python
import requests

res = requests.request(
    "GET",
    "https://scrapely.15.204.158.166.sslip.io/api/v1/jobs/{id}",
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://scrapely.15.204.158.166.sslip.io/api/v1/jobs/{id}", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://scrapely.15.204.158.166.sslip.io/api/v1/jobs/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://scrapely.15.204.158.166.sslip.io/api/v1/jobs/{id}')
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://scrapely.15.204.158.166.sslip.io/api/v1/jobs/{id}"))
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 The job.
Example
{
  "id": "job_5f0c8a1b2d3e4f56",
  "object": {},
  "status": "queued",
  "url": "string",
  "batch_id": "string",
  "options": {
    "render": false,
    "premium": false,
    "ultra_premium": false,
    "country_code": "us",
    "device_type": "desktop",
    "session_number": 0,
    "keep_headers": false,
    "output_format": "html",
    "autoparse": false,
    "wait_for_selector": "string"
  },
  "credits": 0,
  "status_code": 0,
  "duration_ms": 0,
  "error": "string",
  "callback_url": "string",
  "created_at": "2024-01-01T00:00:00Z",
  "finished_at": "2024-01-01T00:00:00Z",
  "status_url": "string",
  "response": {
    "status_code": 0,
    "content_type": "string",
    "final_url": "string",
    "headers": {},
    "content": "string",
    "expires_at": "2024-01-01T00:00:00Z"
  }
}
Schema
idstring
object
statusstring
queued | running | finished | failed | cancelled
urlstring
batch_idstring
optionsobject
Options shared by sync scrapes, jobs and batches.
Show child parameters
renderboolean
Load the page in a headless browser and execute its JavaScript before returning the DOM. Cost: 10 credits.
= false
premiumboolean
Route through the residential proxy pool. Use for sites that block datacenter IPs. Cost: 10 credits (25 with render).
= false
ultra_premiumboolean
Our hardest-target pipeline: premium residential IPs, browser fingerprinting and CAPTCHA handling. Includes rendering. Cannot be combined with premium. Cost: 30 credits.
= false
country_codestring
Geotarget the request from this country (lowercase ISO 3166-1 alpha-2, e.g. us, de, jp).
us | ca | mx | br | ar | cl | co | pe | gb | ie | fr | de | nl | be | lu | ch | at | es | pt | it | gr | se | no | dk | fi | is | pl | cz | sk | hu | ro | bg | hr | si | ee | lv | lt | ua | tr | il | ae | sa | eg | za | ng | ke | ma | in | pk | bd
device_typestring
Send a desktop or mobile user agent and viewport.
desktop | mobile = desktop
session_numberinteger
Reuse the same proxy IP across requests that share this number (sticky session, ~15 minutes idle timeout).
keep_headersboolean
Forward the headers you send us (Cookie, Accept-Language, User-Agent, …) to the target instead of ours. Your API key, Host and proxy headers are never forwarded. Sync endpoint only.
= false
output_formatstring
Return the page as raw HTML, cleaned Markdown, plain text, or JSON (title, meta, links, text).
html | json | markdown | text = html
autoparseboolean
For supported domains, return structured JSON parsed from the page instead of HTML.
= false
wait_for_selectorstring
With render=true: wait until this CSS selector appears before capturing the page.
creditsinteger
Reserved while queued/running; charged when finished; 0 when failed or cancelled.
status_codeinteger
duration_msinteger
errorstring
callback_urlstring
created_atstring
finished_atstring
status_urlstring
Poll this.
responseobject
Present once the job is finished (or failed with a target answer). Kept for 72 hours.
Show child parameters
status_codeinteger
content_typestring
final_urlstring
headersobject
contentstring | object
expires_atstring
401 UNAUTHORIZED: missing, unknown or revoked key.
Example
{
  "error": {
    "code": "MISSING_PARAM",
    "message": "string",
    "param": "string",
    "docs": "/docs/errors#insufficient_credits"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
Stable, machine-readable. Branch on this, never on message.
MISSING_PARAM | INVALID_PARAM | UNAUTHORIZED | DEMO_READ_ONLY | INSUFFICIENT_CREDITS | NOT_FOUND | CONFLICT | CONCURRENCY_LIMIT | RATE_LIMITED | TARGET_FAILED | UNAVAILABLE | NOT_IMPLEMENTED | INTERNAL
messagestringrequired
Human-readable; may change.
paramstring
The parameter at fault, when there is one.
docsstring
Link to this code on /docs/errors.
404 NOT_FOUND.
Example
{
  "error": {
    "code": "MISSING_PARAM",
    "message": "string",
    "param": "string",
    "docs": "/docs/errors#insufficient_credits"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
Stable, machine-readable. Branch on this, never on message.
MISSING_PARAM | INVALID_PARAM | UNAUTHORIZED | DEMO_READ_ONLY | INSUFFICIENT_CREDITS | NOT_FOUND | CONFLICT | CONCURRENCY_LIMIT | RATE_LIMITED | TARGET_FAILED | UNAVAILABLE | NOT_IMPLEMENTED | INTERNAL
messagestringrequired
Human-readable; may change.
paramstring
The parameter at fault, when there is one.
docsstring
Link to this code on /docs/errors.
429 RATE_LIMITED or CONCURRENCY_LIMIT. Honour Retry-After.
Example
{
  "error": {
    "code": "MISSING_PARAM",
    "message": "string",
    "param": "string",
    "docs": "/docs/errors#insufficient_credits"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
Stable, machine-readable. Branch on this, never on message.
MISSING_PARAM | INVALID_PARAM | UNAUTHORIZED | DEMO_READ_ONLY | INSUFFICIENT_CREDITS | NOT_FOUND | CONFLICT | CONCURRENCY_LIMIT | RATE_LIMITED | TARGET_FAILED | UNAVAILABLE | NOT_IMPLEMENTED | INTERNAL
messagestringrequired
Human-readable; may change.
paramstring
The parameter at fault, when there is one.
docsstring
Link to this code on /docs/errors.
500 INTERNAL: our fault, not charged. Quote X-Request-Id.
Example
{
  "error": {
    "code": "MISSING_PARAM",
    "message": "string",
    "param": "string",
    "docs": "/docs/errors#insufficient_credits"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
Stable, machine-readable. Branch on this, never on message.
MISSING_PARAM | INVALID_PARAM | UNAUTHORIZED | DEMO_READ_ONLY | INSUFFICIENT_CREDITS | NOT_FOUND | CONFLICT | CONCURRENCY_LIMIT | RATE_LIMITED | TARGET_FAILED | UNAVAILABLE | NOT_IMPLEMENTED | INTERNAL
messagestringrequired
Human-readable; may change.
paramstring
The parameter at fault, when there is one.
docsstring
Link to this code on /docs/errors.
DELETEhttps://scrapely.15.204.158.166.sslip.io/api/v1/jobs/{id}
Cancel a job

Cancels a job that has not started and refunds its credits. A running job cannot be cancelled (409); if it fails, it is free anyway.

Parameters
idstringpathrequired
The job id.
Code samples
cURL
curl -X DELETE "https://scrapely.15.204.158.166.sslip.io/api/v1/jobs/{id}"
TypeScript
const res = await fetch('https://scrapely.15.204.158.166.sslip.io/api/v1/jobs/{id}', {
  method: 'DELETE',
});
const data = await res.json();
Python
import requests

res = requests.request(
    "DELETE",
    "https://scrapely.15.204.158.166.sslip.io/api/v1/jobs/{id}",
)
data = res.json()
Go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("DELETE", "https://scrapely.15.204.158.166.sslip.io/api/v1/jobs/{id}", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://scrapely.15.204.158.166.sslip.io/api/v1/jobs/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Ruby
require 'net/http'
require 'uri'

uri = URI('https://scrapely.15.204.158.166.sslip.io/api/v1/jobs/{id}')
req = Net::HTTP::Delete.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
Java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://scrapely.15.204.158.166.sslip.io/api/v1/jobs/{id}"))
    .method("DELETE", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Responses
200 Cancelled and refunded.
Example
{
  "id": "job_5f0c8a1b2d3e4f56",
  "object": {},
  "status": "queued",
  "url": "string",
  "batch_id": "string",
  "options": {
    "render": false,
    "premium": false,
    "ultra_premium": false,
    "country_code": "us",
    "device_type": "desktop",
    "session_number": 0,
    "keep_headers": false,
    "output_format": "html",
    "autoparse": false,
    "wait_for_selector": "string"
  },
  "credits": 0,
  "status_code": 0,
  "duration_ms": 0,
  "error": "string",
  "callback_url": "string",
  "created_at": "2024-01-01T00:00:00Z",
  "finished_at": "2024-01-01T00:00:00Z",
  "status_url": "string",
  "response": {
    "status_code": 0,
    "content_type": "string",
    "final_url": "string",
    "headers": {},
    "content": "string",
    "expires_at": "2024-01-01T00:00:00Z"
  },
  "refunded_credits": 0
}
Schema
idstring
object
statusstring
queued | running | finished | failed | cancelled
urlstring
batch_idstring
optionsobject
Options shared by sync scrapes, jobs and batches.
Show child parameters
renderboolean
Load the page in a headless browser and execute its JavaScript before returning the DOM. Cost: 10 credits.
= false
premiumboolean
Route through the residential proxy pool. Use for sites that block datacenter IPs. Cost: 10 credits (25 with render).
= false
ultra_premiumboolean
Our hardest-target pipeline: premium residential IPs, browser fingerprinting and CAPTCHA handling. Includes rendering. Cannot be combined with premium. Cost: 30 credits.
= false
country_codestring
Geotarget the request from this country (lowercase ISO 3166-1 alpha-2, e.g. us, de, jp).
us | ca | mx | br | ar | cl | co | pe | gb | ie | fr | de | nl | be | lu | ch | at | es | pt | it | gr | se | no | dk | fi | is | pl | cz | sk | hu | ro | bg | hr | si | ee | lv | lt | ua | tr | il | ae | sa | eg | za | ng | ke | ma | in | pk | bd
device_typestring
Send a desktop or mobile user agent and viewport.
desktop | mobile = desktop
session_numberinteger
Reuse the same proxy IP across requests that share this number (sticky session, ~15 minutes idle timeout).
keep_headersboolean
Forward the headers you send us (Cookie, Accept-Language, User-Agent, …) to the target instead of ours. Your API key, Host and proxy headers are never forwarded. Sync endpoint only.
= false
output_formatstring
Return the page as raw HTML, cleaned Markdown, plain text, or JSON (title, meta, links, text).
html | json | markdown | text = html
autoparseboolean
For supported domains, return structured JSON parsed from the page instead of HTML.
= false
wait_for_selectorstring
With render=true: wait until this CSS selector appears before capturing the page.
creditsinteger
Reserved while queued/running; charged when finished; 0 when failed or cancelled.
status_codeinteger
duration_msinteger
errorstring
callback_urlstring
created_atstring
finished_atstring
status_urlstring
Poll this.
responseobject
Present once the job is finished (or failed with a target answer). Kept for 72 hours.
Show child parameters
status_codeinteger
content_typestring
final_urlstring
headersobject
contentstring | object
expires_atstring
refunded_creditsinteger
401 UNAUTHORIZED: missing, unknown or revoked key.
Example
{
  "error": {
    "code": "MISSING_PARAM",
    "message": "string",
    "param": "string",
    "docs": "/docs/errors#insufficient_credits"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
Stable, machine-readable. Branch on this, never on message.
MISSING_PARAM | INVALID_PARAM | UNAUTHORIZED | DEMO_READ_ONLY | INSUFFICIENT_CREDITS | NOT_FOUND | CONFLICT | CONCURRENCY_LIMIT | RATE_LIMITED | TARGET_FAILED | UNAVAILABLE | NOT_IMPLEMENTED | INTERNAL
messagestringrequired
Human-readable; may change.
paramstring
The parameter at fault, when there is one.
docsstring
Link to this code on /docs/errors.
404 NOT_FOUND.
Example
{
  "error": {
    "code": "MISSING_PARAM",
    "message": "string",
    "param": "string",
    "docs": "/docs/errors#insufficient_credits"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
Stable, machine-readable. Branch on this, never on message.
MISSING_PARAM | INVALID_PARAM | UNAUTHORIZED | DEMO_READ_ONLY | INSUFFICIENT_CREDITS | NOT_FOUND | CONFLICT | CONCURRENCY_LIMIT | RATE_LIMITED | TARGET_FAILED | UNAVAILABLE | NOT_IMPLEMENTED | INTERNAL
messagestringrequired
Human-readable; may change.
paramstring
The parameter at fault, when there is one.
docsstring
Link to this code on /docs/errors.
409 CONFLICT: idempotent request in flight, or the job is already running/done.
Example
{
  "error": {
    "code": "MISSING_PARAM",
    "message": "string",
    "param": "string",
    "docs": "/docs/errors#insufficient_credits"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
Stable, machine-readable. Branch on this, never on message.
MISSING_PARAM | INVALID_PARAM | UNAUTHORIZED | DEMO_READ_ONLY | INSUFFICIENT_CREDITS | NOT_FOUND | CONFLICT | CONCURRENCY_LIMIT | RATE_LIMITED | TARGET_FAILED | UNAVAILABLE | NOT_IMPLEMENTED | INTERNAL
messagestringrequired
Human-readable; may change.
paramstring
The parameter at fault, when there is one.
docsstring
Link to this code on /docs/errors.
429 RATE_LIMITED or CONCURRENCY_LIMIT. Honour Retry-After.
Example
{
  "error": {
    "code": "MISSING_PARAM",
    "message": "string",
    "param": "string",
    "docs": "/docs/errors#insufficient_credits"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
Stable, machine-readable. Branch on this, never on message.
MISSING_PARAM | INVALID_PARAM | UNAUTHORIZED | DEMO_READ_ONLY | INSUFFICIENT_CREDITS | NOT_FOUND | CONFLICT | CONCURRENCY_LIMIT | RATE_LIMITED | TARGET_FAILED | UNAVAILABLE | NOT_IMPLEMENTED | INTERNAL
messagestringrequired
Human-readable; may change.
paramstring
The parameter at fault, when there is one.
docsstring
Link to this code on /docs/errors.
500 INTERNAL: our fault, not charged. Quote X-Request-Id.
Example
{
  "error": {
    "code": "MISSING_PARAM",
    "message": "string",
    "param": "string",
    "docs": "/docs/errors#insufficient_credits"
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
Stable, machine-readable. Branch on this, never on message.
MISSING_PARAM | INVALID_PARAM | UNAUTHORIZED | DEMO_READ_ONLY | INSUFFICIENT_CREDITS | NOT_FOUND | CONFLICT | CONCURRENCY_LIMIT | RATE_LIMITED | TARGET_FAILED | UNAVAILABLE | NOT_IMPLEMENTED | INTERNAL
messagestringrequired
Human-readable; may change.
paramstring
The parameter at fault, when there is one.
docsstring
Link to this code on /docs/errors.
Updated