Errors and error codes
How to read a response, and what each error means.
{ "message": "", "error": 0, "data": [], "count": 0, "credits_used": 0}| API | Body |
|---|---|
| List Events by City (Advanced), List Events by City, Events by Geo Coordinates, Events by Organizer | message, error, data (a list of events), count (events in data), credits_used |
| Events Search | message, error, data (a list of events), credits_used |
| Event Details | error, message, data (one event, or false), credits_used |
| Events in Batch | error, message, result_count, next_cursor, data, has_more, credits_used |
| Search Organizers | message, error, data (a list of organizers), credits_used |
| City Suggestions | data (a list of cities), credits_used |
credits_usedis what this call cost, the same as theX-Credits-Usedheader:0for a cached answer, an empty result or an error. See Credits.- Check
erroras well as the HTTP status. Some requests that find nothing return200witherrorabove0. Treaterror > 0as "no usable result". Exceptions: Search Organizers and City Suggestions return200with an emptydatalist. messageis for people and may change. Don't build logic on it, exceptEND_OF_RESULTSandNO_COVERED_EVENTS_YETin Events in Batch.- Ended events are never returned, nor hidden, draft or archived ones. So a page can be shorter than the page size, and Event Details answers
404for an ended event. - Links to AllEvents pages (
event_url,tickets.ticket_url,organizer.url, and theurlof organizers and cities) end withutm_source=ae_api&utm_medium=api&utm_campaign=<your code>, where the code is 6 characters that identify your account and key. Keep them when you show or store a link. Image links have none. The examples here use the codek7f2qa. - Text is plain UTF-8, emojis included; HTML entities are already decoded, so escape text yourself when you put it in HTML. A field an API doesn't send is left out, and a missing value is
null(never""or0). In descriptions, emails, phone numbers and links are partly masked (such as63511xxxxx), anddescription.htmlis sanitized: only common formatting tags, no scripts, event handlers or links to other sites.
HTTP status codes
| Status | Meaning |
|---|---|
200 | Processed. Check error for "no results" or "outside your coverage". |
400 | A parameter is missing, invalid or no longer supported (<param> is not supported in v1.), the page is too deep, or the city was not found. Fix the request using message. A bad parameter name gets invalid_param. |
401 | Key problem: invalid_key, key_expired |
402 | No credits to pay for the call: credits_exhausted, trial_ended, plan_expired |
403 | Not allowed: account_inactive, endpoint_not_allowed, ip_not_allowed, api_not_allowed_for_key, origin_not_allowed |
404 | The API, event or organizer was not found. Check the URL or ID. An unknown API path gets unknown_api. |
415 | The request body isn't JSON or a form: unsupported_media_type |
429 | rate_limited |
5xx | Temporary failure on our side: service_unavailable, upstream_unavailable, or a 503 without a code ({"error":1,"message":"Something went wrong. Try again shortly.","credits_used":0}) from the data source. Nothing is charged. Retry with backoff, after Retry-After seconds when it's sent. |
{ "error": 1, "code": "credits_exhausted", "message": "You've used all your credits for this period. Cached answers stay free; fresh calls need credits. Upgrade to Growth for more: https://…/billing", "upgrade": { "plan": "GROWTH", "name": "Growth", "url": "https://…/billing", "action": "upgrade" }, "credits_used": 0}codeis sent only for the errors below. Every error with acodealso has"credits_used": 0(last) andX-Credits-Used: 0.402errors also haveupgrade: the plan that lifts the limit and where to get it.actionisupgrade,reneworbook_a_call(Enterprise).- A
429body has onlyerror,code,messageandcredits_used. - Other errors have no
code:{"error": 1, "message": "…", "credits_used": 0}, sometimes with the API's normal fields, such asdata. Validation errors are400, such as<param> is required.,page cannot be negative.or<param> is not supported in v1.
Error codes
Every error with a code costs 0 credits.
invalid_key
401. The key is missing, invalid or revoked. Send it in the X-API-Key header (not the query string) and check it's active on the API keys page. A revoked key can't be restored: create a new one. An expired key gets key_expired.
key_expired
401. The key's expiry date passed, or it was rotated and the overlap ended. Use its replacement or create a new key. It works again only if you change its expiry. Message: "This API key has expired. Create a new key on the Keys page."
invalid_param
400. A parameter name has brackets (city[]=x), starts with a space, or is route. Use plain names and single values, such as category=music,workshops.
missing_param
400. A required parameter is missing or empty; message names it ("country is required."). Each API's parameter table marks the required ones.
unknown_api
404. No API at this path or version. Check the path against the API reference and the version (/v1/).
unsupported_media_type
415. The POST body has a Content-Type the API doesn't read (for example text/plain), or none. Send the parameters in the query string, or as an application/json or application/x-www-form-urlencoded body.
credits_exhausted
402. No credits left for this billing period. Cached answers still work. Upgrade, buy extra credits or wait for renewal; upgrade names the plan that lifts the limit.
trial_ended
402. Your free trial's credits are used, or you haven't claimed them yet (a new account has 0 credits until you claim them on the Billing page). Every call stops, cached ones too. Claim your free credits or pick a plan.
plan_expired
402. Your paid plan expired and nothing is left to pay for the call: top-up credits are used, and either today's 100 grace credits are used or the 3 grace days are over. Renew your plan. Until then responses carry X-Plan-Status: expired (see Credits).
account_inactive
403. The account is not active. Check your account and billing, or contact support with the call's X-Request-Id.
endpoint_not_allowed
403. Your plan doesn't include this API. Upgrade, or use an API your plan includes. See Plans and APIs.
ip_not_allowed
403. The call came from an IP the key doesn't allow; message names the IP we saw. Add the IP or its CIDR range (203.0.113.0/24, 2001:db8::/32) to the key. Behind a proxy or NAT we see the last hop's public address.
api_not_allowed_for_key
403. The key is limited to other APIs. Add this API to the key or use another key. (Your plan may include it; endpoint_not_allowed is the plan-level error.)
origin_not_allowed
403. The key has allowed websites, and the call came from another site or had no Origin or Referer (for example from a server or curl). Add the site to the key. For server calls, use a key without website restrictions.
rate_limited
429. Too many requests in this window. Wait Retry-After seconds, then retry, or upgrade for higher limits. See Rate limits. Many calls with invalid keys from one IP also get 429 ("Too many requests with invalid API keys. Try again after ~45s.") with Retry-After; fix the key. These don't count against your limits.
service_unavailable
503. The API is briefly unavailable on our side (for example while the store that counts credits and limits can't be reached). Nothing is charged and nothing is counted. Retry after Retry-After seconds, with backoff.
upstream_unavailable
503. The data source didn't answer in time or failed. Nothing is charged. Retry with backoff; send the X-Request-Id to support if it keeps happening.
Errors by API
Each API also lists the messages it can send and what causes them.
- List Events by City (Advanced)
/v1/events/list_es - List Events by City
/v1/events/list - Events by Geo Coordinates
/v1/events/geo - Events Search
/v1/events/search - Event Details
/v1/get_event - Events in Batch
/v1/events/batch - Events by Organizer
/v1/organizer/events - Search Organizers
/v1/organizers/search - City Suggestions
/v1/geo/city_suggestion
Still stuck? See Troubleshooting or Support.