Skip to content
English

Limits, errors and versions

Each access key can make 60 calls a minute. Every answer says where you stand:

Header What it says
RateLimit-Limit The limit per minute: 60.
RateLimit-Remaining The calls you have left in this minute.
RateLimit-Reset In how many seconds the next minute starts.

Past the limit the API answers 429 with the code rate_limited and the Retry-After header: the seconds to wait before trying again. To know when a search finishes, use a webhook instead of asking often.

Apart from that, starting searches has the usual limits: your plan’s, your tokens and the key’s token cap per call.

An error answers with its HTTP status and this body:

{ "error": { "code": "not_ready", "message": "This search has no report yet (status: running)." } }

Branch on code: it is stable and does not change. message is for people, is in English and may change. invalid_request also carries issues, naming the field that failed.

CodeHTTPWhat it means
invalid_request400A parameter or a field is missing or not valid; issues names it.
unauthorized401No access key, or one that is unknown or revoked.
insufficient_tokens402The account does not have the tokens this needs.
plan_limit403The account's plan does not include this (the API itself is part of Agency and above).
forbidden403The access key may not do
this403it is read-only, or the amount is above its token cap per call.
not_found404No such thing in the access key's account.
not_ready409The search has not finished yet.
rate_limited429More than 60 requests in a minute with one access key; Retry-After says when to try again.
internal500Something went wrong on our side.
unavailable503Searches are closed, or a platform is paused by Sentir right now.

An id of another account answers not_found, the same as one that does not exist.

  • The version is in the address: /api/v1.
  • Inside a version things are only added: new routes, new fields in answers, new optional fields in what you send. Your code should ignore fields it does not know.
  • A breaking change comes only in a new version (/api/v2).
  • A version is announced as deprecated six months before it stops working, in the Changelog and by email to the accounts that use it.
  • Keep your keys secret and on the server side. Never in a web page or a mobile app: the API takes no calls from a browser.
  • If a key leaks, revoke it and make another.
  • The data you read through the API follows the same rules as the CSV download. They are in the Terms.

Accessibility