API reference
List alerts
curl "https://api.onsite.so/api/v1/alerts" \ -H "Authorization: Bearer $ONSITE_API_KEY"Lists alerts for every site your key can read, most recently changed first, with what each one found.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Only alerts with this status. all shows every one.
Only alerts of this type.
Only alerts of this severity.
How many of each alert’s pages or searches to include.
Rows per page.
The page to get: page.nextCursor from the previous response. Leave it out for the first page, and keep the other parameters the same.
Responses
Section titled “Responses”OK
object
The status the list shows.
object
The alert’s ID.
The site’s address, as Search Console names the property.
The site’s address in Onsite.
The alert type, such as clicks, impressions, pages_leaving, indexing_failing, top10_lost or pages_losing.
The alert type’s name.
What the alert found, in a sentence.
How urgent it is.
Open, resolved or dismissed.
The day Onsite first raised it.
When it last changed.
Examples of the pages or searches involved, up to the items parameter.
object
A page or search the alert is about.
What changed for it.
Examples left out of items.
Where this page sits in the full list.
object
Rows in this response.
Rows across all pages.
Pass as cursor to get the next page, with the same other parameters. Null on the last page.
Example
{ "site": "https://example.com/", "status": "open", "alerts": [ { "id": "a1b2c3d4", "site": "https://example.com/", "address": "example-com", "type": "clicks", "name": "Clicks drop", "headline": "Clicks fell 24% week on week", "severity": "high", "status": "open", "since": "2026-10-20", "firstSeen": "2026-10-22", "updated": "2026-10-27T05:12:00.000Z", "items": [ { "item": "https://example.com/pricing", "note": "-310 clicks" } ], "moreItems": 3 } ], "page": { "shown": 25, "total": 140, "nextCursor": "p.3k9x1z" }}A parameter or body field isn’t valid. error.param names it.
object
object
What went wrong, as a stable word your code can check.
What went wrong, in a sentence a person can act on.
The parameter or body field at fault, when there is one.
The values it accepts, when there is a fixed set.
The closest allowed value, when the one sent looks like a typo.
Quote it to support to find this request.
Example
{ "error": { "code": "invalid_input", "message": "range must be last_7d, last_14d, last_28d, last_3m, last_6m, last_12m, last_16m, this_month, last_month, last_quarter, year_to_date, or a window like 2026-08-01..2026-08-31.", "param": "range", "didYouMean": "last_28d", "requestId": "E-7K2Q-M4XD" }}The API key is missing, wrong, expired or revoked.
object
object
What went wrong, as a stable word your code can check.
What went wrong, in a sentence a person can act on.
The parameter or body field at fault, when there is one.
The values it accepts, when there is a fixed set.
The closest allowed value, when the one sent looks like a typo.
Quote it to support to find this request.
Example
{ "error": { "code": "invalid_input", "message": "range must be last_7d, last_14d, last_28d, last_3m, last_6m, last_12m, last_16m, this_month, last_month, last_quarter, year_to_date, or a window like 2026-08-01..2026-08-31.", "param": "range", "didYouMean": "last_28d", "requestId": "E-7K2Q-M4XD" }}Your team needs an Onsite plan, or has used this month’s credits (exports only).
object
object
What went wrong, as a stable word your code can check.
What went wrong, in a sentence a person can act on.
The parameter or body field at fault, when there is one.
The values it accepts, when there is a fixed set.
The closest allowed value, when the one sent looks like a typo.
Quote it to support to find this request.
Example
{ "error": { "code": "invalid_input", "message": "range must be last_7d, last_14d, last_28d, last_3m, last_6m, last_12m, last_16m, this_month, last_month, last_quarter, year_to_date, or a window like 2026-08-01..2026-08-31.", "param": "range", "didYouMean": "last_28d", "requestId": "E-7K2Q-M4XD" }}The key can’t do this: it is limited to other sites, it can only read, or its owner’s role doesn’t allow it.
object
object
What went wrong, as a stable word your code can check.
What went wrong, in a sentence a person can act on.
The parameter or body field at fault, when there is one.
The values it accepts, when there is a fixed set.
The closest allowed value, when the one sent looks like a typo.
Quote it to support to find this request.
Example
{ "error": { "code": "invalid_input", "message": "range must be last_7d, last_14d, last_28d, last_3m, last_6m, last_12m, last_16m, this_month, last_month, last_quarter, year_to_date, or a window like 2026-08-01..2026-08-31.", "param": "range", "didYouMean": "last_28d", "requestId": "E-7K2Q-M4XD" }}The site, or the thing asked for on it, doesn’t exist or this key can’t read it.
object
object
What went wrong, as a stable word your code can check.
What went wrong, in a sentence a person can act on.
The parameter or body field at fault, when there is one.
The values it accepts, when there is a fixed set.
The closest allowed value, when the one sent looks like a typo.
Quote it to support to find this request.
Example
{ "error": { "code": "invalid_input", "message": "range must be last_7d, last_14d, last_28d, last_3m, last_6m, last_12m, last_16m, this_month, last_month, last_quarter, year_to_date, or a window like 2026-08-01..2026-08-31.", "param": "range", "didYouMean": "last_28d", "requestId": "E-7K2Q-M4XD" }}Too many requests for this key. Wait for the Retry-After header’s seconds.
object
object
What went wrong, as a stable word your code can check.
What went wrong, in a sentence a person can act on.
The parameter or body field at fault, when there is one.
The values it accepts, when there is a fixed set.
The closest allowed value, when the one sent looks like a typo.
Quote it to support to find this request.
Example
{ "error": { "code": "invalid_input", "message": "range must be last_7d, last_14d, last_28d, last_3m, last_6m, last_12m, last_16m, this_month, last_month, last_quarter, year_to_date, or a window like 2026-08-01..2026-08-31.", "param": "range", "didYouMean": "last_28d", "requestId": "E-7K2Q-M4XD" }}Onsite is down for maintenance, or new data arrived while reading. Try again after the Retry-After header’s seconds.
object
object
What went wrong, as a stable word your code can check.
What went wrong, in a sentence a person can act on.
The parameter or body field at fault, when there is one.
The values it accepts, when there is a fixed set.
The closest allowed value, when the one sent looks like a typo.
Quote it to support to find this request.
Example
{ "error": { "code": "invalid_input", "message": "range must be last_7d, last_14d, last_28d, last_3m, last_6m, last_12m, last_16m, this_month, last_month, last_quarter, year_to_date, or a window like 2026-08-01..2026-08-31.", "param": "range", "didYouMean": "last_28d", "requestId": "E-7K2Q-M4XD" }}