API reference / Events
List event cities
Written and maintained by The ProspectAPIs team
GET/v1/events/cities
GET /v1/events/cities is the ProspectAPIs operation listEventCities, in the Events group of the REST API. Every city GET /v1/events covers, with its slug, time zone and the platforms that cover it. Free. Launching soon: answers 503 until GET /pricing reports events available. Cost: Launching soon. Send your API key as a Bearer token in the Authorization header.
How this fits with the rest of the events API, with worked examples, is in the event discovery guide.
Parameters
This operation takes no path or query parameters.
Responses
| Status | Meaning |
|---|---|
| 200 | The city catalog. |
| 401 | The API key is missing or invalid. |
| 429 | Too many requests; retry after the window. |
| 503 | Events are not available yet. Nothing is charged. |
Every error answers with the same JSON body, an error string and sometimes a code; the errors page lists each status and when it happens. A per-key 429 carries Retry-After; see rate limits.
200 response fields
The city catalog.
| Field | Type | Description |
|---|---|---|
| data required | array of EventCity | |
| data[].slug required | string | |
| data[].name required | string | |
| data[].timezone required | string | |
| data[].platforms required | array of string: luma, partiful | |
| count required | integer |
| Header | Meaning |
|---|---|
| RateLimit-Limit | Requests this API key may make per minute. |
| RateLimit-Remaining | Requests left in the current one-minute window. |
| RateLimit-Reset | Seconds until the current window resets. |
Code samples
Each sample sends the same request. Set PROSPECTAPIS_KEY in your environment first. Values come from the spec's examples; replace them with your own.
curl https://api.prospectapis.com/v1/events/cities \
-H "Authorization: Bearer $PROSPECTAPIS_KEY"const res = await fetch("https://api.prospectapis.com/v1/events/cities", {
headers: { Authorization: `Bearer ${process.env.PROSPECTAPIS_KEY}` },
});
if (!res.ok) throw new Error(`${res.status}: ${(await res.json().catch(() => ({}))).error ?? res.statusText}`);
const data = await res.json();
console.log(data);import os, requests
res = requests.get(
"https://api.prospectapis.com/v1/events/cities",
headers={"Authorization": f"Bearer {os.environ['PROSPECTAPIS_KEY']}"},
timeout=30,
)
res.raise_for_status()
data = res.json()
print(data)Billing
Billing reserves before it serves: the call holds what it may cost, serves at most what that hold covers, and refunds the rest when the response closes. Any non-2xx answer refunds the whole hold, so a failed call costs nothing. The response reports your balance in X-Credits-Remaining.
Related
The event discovery guide covers this area end to end. Previous operation: Search events in a city. Next operation: Get one event. Every operation, grouped by area, is on the API reference index.
Create a free account to get a key, then run the samples above with your own values.
Was this page helpful?