Job Handling
Submitting a Job
3
Sample Request
curl --request POST \
--url "https://async.scraperapi.com/jobs" \
--header "Content-Type: application/json" \
--data '{
"apiKey": "API_KEY",
"url": "https://example.com"
}'import requests
r = requests.post(url = 'https://async.scraperapi.com/jobs',
json={ 'apiKey': 'API_KEY', 'url': 'https://example.com' })
print(r.text)import axios from 'axios';
(async () => {
const { data } = await axios({
method: 'POST',
url: 'https://async.scraperapi.com/jobs',
headers: { 'Content-Type': 'application/json' },
data: {
apiKey: 'API_KEY',
url: 'https://example.com'
}
});
console.log(data);
})();}
"id":"0962a8e0-5f1a-4e14-bf8c-5efcc18f0953",
"status":"running",
"statusUrl":"https://async.scraperapi.com/jobs/0962a8e0-5f1a-4e14-bf8c-5efcc18f0953",
"url":"https://example.com"
}curl --request POST \
--url "https://async.scraperapi.com/jobs" \
--header "Content-Type: application/json" \
--data '{
"apiKey": "API_KEY",
"url": "https://postman-echo.com/post",
"method": "POST",
"headers": {
"content-type": "application/x-www-form-urlencoded"
},
"body": "foo=bar"
}'import requests
body = {'apiKey': 'API_KEY', 'url': 'https://postman-echo.com/post', 'method': 'POST', 'headers': {"content-type": "application/x-www-form-urlencoded"}, 'body': 'foo=bar'}
r = requests.post('https://async.scraperapi.com/jobs', headers={"Content-Type": "application/json"}, json=body)
print(r.text)const url = 'https://async.scraperapi.com/jobs';
const body = {
apiKey: 'API_KEY',
url: 'https://postman-echo.com/post',
method: 'POST',
headers: { "content-type": "application/x-www-form-urlencoded" },
body: "foo=bar"
};
(async () => {
try {
const res = await fetch(url, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(body)
});
const data = await res.json();
console.log(data);
} catch (err) {
console.error(err);
}
})();Job Status
Cancelling a Job
Last updated

