API Objects

Pagination

Handling multiple pages of results.

The Paging Info object

Since there are many connections between objects in The Entertainment Graph, all methods that return lists of MediaHound Objects take advantage of paging. That means you will get only a subset of results. If you need more, you can fetch more, one page at a time. A pagingInfo object is provided in each response and contains all the needed query parameters for the next page.

The next provides you the endpoint (e.g. "/graph/relate"), the HTTP method, and the JSON body to get the next page. The only thing that needs to be done is appending the currently used access token to the URL or setting an appropriate Authorization Header.

If next is NULL there are no more pages.

"pagingInfo": {
"next": {
"endpoint": String;
"method": String;
"body": Object;
} | null;
};

Configuring PageSize

For most queries, the param pageSize and page can be included within the HQL JSON request objects. Below is an example of the request structure for a Relate call to show how pageSize fits into the picture:

{
"pageSize": Integer,
"page": Integer,
"factors": FACTORS_ARRAY,
"filters": FILTERS_OBJECT,
"components": COMPONENTS_ARRAY
}

Parameters

PropertyDescription
pageOptional Integer. Indicates the page number when paginating (0-indexed). Default is 0.
pageSizeOptional Integer. Indicates the number of results to return per Page. Default is 20.
factorsRequired array. Please see Factors.
filtersOptional object. Please see Filters.
componentsOptional array. Please see Components.