Previous Page Arrow Next Page Arrow

3.5 Paging Information

The following elements return information about the current page when querying a collection of resources. They conform to the OpenSearch specification (


These values are now described:

OpenSearch Element Description
totalResults Total number of resources in the collection. The service consumer can use this value and itemsPerPage to calculate the number of pages for the collection and display a navigation bar with links to pages by number.
startIndex Index of the first resource returned in this feed. Index starts at 1, not 0.
itemsPerPage Number of resources that the service returns in a page. This number will usually be the value of the count parameter when this parameter is present in the URL but it MAY be different because the service provider is not required to cut pages exactly as requested by the consumer. For example, the provider could impose a page size that is a multiple of some internal page size. Or it may cap the page size to avoid excessive memory usage and timeouts. See query parameters section. If the count parameter is not specified, itemsPerPage SHOULD be set to the server's default page size. The response feed MUST contain _exactly _itemsPerPage entries, unless this is the last page of the feed, in which case it MUST contain _at most_ itemsPerPage entries.
RESTful Web Services book states that startIndex is 0-based but this seems to be incorrect. Examples found on the web and the latest opensearch draft indicate that startIndex is 1-based by default.

The Query Paging section gives details on the role that these elements play in the paging protocol.

SData providers that support the index paging protocol MUST include these elements in their feeds.

Previous Page Arrow Next Page Arrow