The PredictHQ API can be accessed from the
https://api.predicthq.com endpoint. With the exception of the authentication endpoint, which only accepts data in a form-encoded format, all data exchanges are performed using the JSON format.
https://- the API is only available over Secure HTTP.
api.predicthq.com- the API's domain.
api-version- the API version identifier, e.g.
resource- the resource endpoint, e.g.
Please note that all URLs end with a trailing slash (
The following table describes the different HTTP methods supported by the PredictHQ API and what they mean.
|HEAD||Query HTTP headers.|
|OPTIONS||Retrieve endpoint information.|
|POST||Create resources. All mandatory fields should be submitted.|
|PUT||Update resources. All mandatory fields should be submitted.|
|PATCH||Partially update resources. Similar to PUT, but you only need to submit the fields that need to be updated.|
All API calls should have an Authorization header with your Access Token. See the Authentication section for details on how to obtain an Access Token.
All API calls should specify the format that is expected in the response. At the moment, JSON is the only supported format.
When sending data, API calls should specify the content type that is being uploaded. Refer to the Resources section for supported formats.
Control the filters to customize your results. The following table describes the different parameter types supported by the API. For a list of parameters accepted by each endpoint, refer to the Resources section.
|String||A parameter that accepts text as input. Text data should be URL-encoded.
|Number||A parameter that accepts a numeric value as input.
|Date Range||A parameter that must have a suffix that specifies a date bound.
|Numeric Range||A parameter that must have a suffix that specifies a numeric bound.
|Area||A parameter that describes a circular area in the form
Note that results may contain entities for which the geolocation is not within the radius, but apply to a parent scope of the area specified.
E.g. National school holidays when requesting events affecting a local radius.
Possible radius units:
When parameters accept multiple values, the API will return the union of the results for each value.
String or numeric values should be separated with a comma (
Control the result records that are returned using the standard
limit query parameters.
If no limit is specified, then a default of
Control the ordering of records that are returned using the standard
sort query parameter.
Separate the field names with commas (
,) and prefix with minus (
-) for reverse ordering.