Push-Pull
Discover the Push-Pull integration method for the Oxylabs Web Scraper API. Submit a job, then poll the results endpoint later using JSON-formatted data.
Single Job
Endpoint
POST https://data.oxylabs.io/v1/queriesInput
curl --user "user:pass1" \
'https://data.oxylabs.io/v1/queries' \
-H "Content-Type: application/json" \
-d '{"source": "ENTER_SOURCE_HERE", "url": "https://www.example.com", "geo_location": "United States", "callback_url": "https://your.callback.url", "storage_type": "s3", "storage_url": "s3://your.storage.bucket.url"}'import requests
from pprint import pprint
# Structure payload.
payload = {
"source": "ENTER_SOURCE_HERE", # Source you choose e.g. "universal"
"url": "https://www.example.com", # Check speficic source if you should use "url" or "query"
"geo_location": "United States", # Some sources accept zip-code or cooprdinates
#"render" : "html", # Uncomment you want to render JavaScript within the page
#"render" : "png", # Uncomment if you want to take a screenshot of a scraped web page
#"parse" : true, # Check what sources support parsed data
#"callback_url": "https://your.callback.url", #required if using callback listener
"callback_url": "https://your.callback.url",
"storage_type": "s3",
"storage_url": "s3://your.storage.bucket.url"
}
# Get response.
response = requests.request(
'POST',
'https://data.oxylabs.io/v1/queries',
auth=('YOUR_USERNAME', 'YOUR_PASSWORD'), #Your credentials go here
json=payload,
)
# Print prettified response to stdout.
pprint(response.json())Output
Data dictionary
Key
Description
Type
Callback
Input
Output
Check Job Status
Endpoint
Input
Output
Status values
Parameter
Description
Retrieve Job Content
Endpoints
Input
Output
Render parameter
Parse parameter
XHR parameter
Default output
Available output
Batch Query
Endpoint
Input
Output
Get Notifier IP Address List
Endpoint
Input
Output
Scheduler
SchedulerLast updated
Was this helpful?

