Search Events for a Saved Location
Search for events happening in an existing Saved Location.
Authorizations
AuthorizationstringRequired
Enter your PredictHQ API key. The Bearer prefix is added automatically.
When calling the API directly, send: Authorization: Bearer <YOUR_API_KEY> as documented at https://docs.predicthq.com/api/overview/authenticating
Path parameters
location_idstringRequired
An existing Saved Location ID.
Query parameters
date_range_typeconst: next_90dOptional
Date range to fetch events for.
Currently the only supported date ranges are:
next_90d
offsetintegerOptionalDefault:
Offset the results.
0limitintegerOptionalDefault:
Limit the number of results.
10Responses
200
Successful Response
application/json
422
Validation Error
application/json
get
/v1/saved-locations/{location_id}/insights/eventsExamples
curl --location 'https://api.predicthq.com/v1/saved-locations/0b6ZrOnTdB2Y7k4zC_9qBg/insights/events?date_range_type=next_90d&category=public-holidays%2Csports&sort=start' \
--header 'Authorization: Bearer TOKEN'import requests
url = "https://api.predicthq.com/v1/saved-locations/0b6ZrOnTdB2Y7k4zC_9qBg/insights/events?date_range_type=next_90d&category=public-holidays,sports&sort=start"
payload={}
headers = {
'Authorization': 'Bearer TOKEN'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)OpenAPI Spec
Guides
Last updated
Was this helpful?