Quick start
Get up and running with OrbitScraper in minutes. This walkthrough guides you through generating credentials, dispatching an asynchronous SERP query, and consuming normalized results.
Workflow Steps
- 1Create an API key:
Navigate to your Dashboard Workspace and copy your active workspace key.
- 2Send a POST request:
Target
/v1/searchwith your queryq, desiredengine, andx-api-key. - 3Read the job receipt:
Fast queries resolve synchronously. Otherwise, read the returned
job_idfrom the JSON receipt. - 4Poll the status endpoint:
Check
GET /v1/search/:jobIdevery 1–2 seconds until the job status becomes completed.
Complete Python Example
Run this script to test your API key against live Google search results.
import requests
import time
API_BASE = "https://api.orbitscraper.com"
API_KEY = "ORS_live_1234567890"
# 1. Enqueue an asynchronous search job
enqueue = requests.post(
f"{API_BASE}/v1/search",
headers={
"x-api-key": API_KEY,
"Content-Type": "application/json",
},
json={
"q": "best ai chips 2026",
"engine": "google",
"search_mode": "standard",
"location": "New York",
"gl": "us",
"hl": "en",
"device": "desktop",
"num": 10,
"page": 1,
"safe": "active",
"async": True,
},
timeout=30,
)
enqueue.raise_for_status()
payload = enqueue.json()
# 2. Check if the result was returned immediately or queued
if "organic_results" in payload:
print("Direct results received:")
print(payload["organic_results"][:3])
else:
job_id = payload.get("error", {}).get("details", {}).get("job_id") or payload.get("job_id")
if not job_id:
raise RuntimeError(f"No job_id returned: {payload}")
print(f"Job queued with ID: {job_id}. Polling for completion...")
# 3. Poll GET /v1/search/:jobId until completed
while True:
status = requests.get(
f"{API_BASE}/v1/search/{job_id}",
headers={"x-api-key": API_KEY},
timeout=30,
)
status.raise_for_status()
poll_payload = status.json()
# When completed, the root object contains search_metadata and organic_results
if "organic_results" in poll_payload:
print("Completed search results:")
for item in poll_payload["organic_results"][:3]:
print(f"- {item.get('title')}: {item.get('link')}")
break
# If still processing in queue
if poll_payload.get("status") in ("queued", "running"):
time.sleep(1.5)
continue
raise RuntimeError(f"Search job failed: {poll_payload}")Key Implementation Notes
Header Requirements
Always provide Content-Type: application/json and your key under x-api-key.
Polling Frequency
Poll at 1 to 2-second intervals. Excessive sub-second polling triggers rate_limit_exceeded (HTTP 429).
Credit Billing
Credits are only billed once a search job reaches a terminal successful outcome. Polling requests do not consume credits.