Search Events for a Saved Location
Search for events happening in an existing Saved Location.
Please refer to the Events API docs for the available query parameters in addition to those listed below.
Authorizations
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.
0
limitintegerOptionalDefault:
Limit the number of results.
10
Responses
200
Successful Response
application/json
422
Validation Error
application/json
get
GET /v1/saved-locations/{location_id}/insights/events HTTP/1.1
Host: api.predicthq.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"count": 1,
"results": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
}
Examples
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'
OpenAPI Spec
The OpenAPI spec for Saved Locations API can be found here.
Guides
Below are some guides relevant to this API:
Last updated
Was this helpful?