The PredictHQ API will respond to successful requests with either a collection of records or a single record. This section describes the standard format for each record type. Refer to the Resources section for a description of the results for each endpoint.
The PredictHQ API will always respond with the
Content-Type header set to the format requested via the
Accept header. Requests for a format not supported by the API will be rejected with the
406 Not Acceptable status code.
When requesting a collection of records, the JSON object will always contain the following properties:
|count||The total number of results.|
|previous||A URL to the previous page, or
|next||A URL to the next page, or
|results||An array of records.|
Additionally, the following field will be provided by the Events endpoint if your subscription has a result limit:
|overflow||Boolean flag that indicates if the search has more results than your subscription allows you to view.|
When requesting a single record, it will be returned as a JSON object. Refer to the Resources section for a description of possible records.