Realtime
Realtime integration for the Web Scraper API by Oxylabs. Keep the HTTPS connection open from job submission until results or an error are returned, using JSON-formatted payloads.
Job Submission
Endpoint
POST https://realtime.oxylabs.io/v1/queriesInput
curl --user "USERNAME:PASSWORD" \
'https://realtime.oxylabs.io/v1/queries' \
-H "Content-Type: application/json" \
-d '{"source": "universal", "url": "https://example.com", "geo_location": "United States"}'import requests
from pprint import pprint
# Structure payload.
payload = {
"source": "universal", # Source you choose e.g. "universal"
"url": "https://example.com", # Check the docs of the specific source you're using to see if you should use "url" or "query"
"geo_location": "United States", # Some sources accept post codes and/or coordinates
#"render" : "html", # Uncomment if you want to render JavaScript on 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
}
# Get response.
response = requests.request(
'POST',
'https://realtime.oxylabs.io/v1/queries',
auth=('YOUR_USERNAME', 'YOUR_PASSWORD'), #Your credentials go here
json=payload,
)
# Instead of response with job status and results url, this will return the
# JSON response with results.
pprint(response.json())Output
Render parameter
Parse parameter
Default output
Available output
Output example:
Last updated
Was this helpful?

