Get started
Onsite API
Read your Onsite numbers from your own scripts, dashboards and tools, and make everyday changes like tracking keywords or resolving alerts.
The Onsite API gives your code the same numbers you see in Onsite: Search Console clicks and searches, insights, rank tracking, indexing, alerts and Google Analytics. Ask for the same site, period and filters as in the app and you get the same answer.
It covers what you do in Onsite most days. You can read every report, track and untrack keywords, resolve or reopen alerts, add chart notes and start exports.
Before you start
Section titled “Before you start”- An Onsite account on a team with an active plan.
- An API key from Settings › API keys. Authentication shows how to make one.
Base URL
Section titled “Base URL”Every endpoint lives under one address. All requests use HTTPS and answer in JSON.
https://api.onsite.so/api/v1Make your first request
Section titled “Make your first request”Create a key
In Onsite, open Settings › API keys, select Create key, give it a name and copy it. Onsite shows the key once.
Save it where your code can read it
Keep the key out of your code and out of version control. An environment variable works well:
Terminal window export ONSITE_API_KEY="oapi_..."List your sites
Terminal window curl "https://api.onsite.so/api/v1/sites" \-H "Authorization: Bearer $ONSITE_API_KEY"Read a site's performance
Use any site from the list, by its domain or its ID:
Terminal window curl "https://api.onsite.so/api/v1/sites/example.com/performance?range=last_28d" \-H "Authorization: Bearer $ONSITE_API_KEY"
Check it worked
Section titled “Check it worked”The sites request answers with the sites your key can read, and where the page sits in the full list:
{ "sites": [ { "id": "0f8e6c2a-4a8f-4d7e-9b1e-5c3d2a1b0e9f", "site": "https://example.com/", "address": "example-com", "property": "sc-domain:example.com", "group": "owned", "status": "active", "connected": { "analytics": true, "bing": false } } ], "page": { "shown": 1, "total": 1, "nextCursor": null }}If you get an error instead, its message says what to change. Errors lists every kind.
How the API works
Section titled “How the API works”- Sites. Every endpoint that reads one site takes it in the path. Use its domain (
example.com), its address in Onsite (example-com), its Search Console property or its ID, as List sites shows them. - Periods. Reports take a
range, such aslast_28dor2026-08-01..2026-08-31, and most takecompare. They match the date picker in Onsite. - Lists. Long lists come a page at a time. Pagination shows how to get the rest.
- Changes. Requests that change something use
POST,PATCHorDELETE, and only work with a key that has Can make changes turned on. - Field names are the same in every response:
clicks,impressions,ctr(in percent) andposition.