# Pagination API Platform Core has native support for paged collections. Pagination is enabled by default for all collections. Each collections contains 30 items per page. The activation of the pagination and the number of elements per page can be configured from: * the server-side (globally or per resource) * the client-side, via a custom GET parameter (disabled by default) When issuing a `GET` request on a collection containing more than 1 page (here `/books`), a [Hydra collection](http://www.hydra-cg.com/spec/latest/core/#collections) is returned. It's a valid JSON(-LD) document containing items of the requested page and metadata. ```json { "@context": "/contexts/Book", "@id": "/books", "@type": "hydra:Collection", "hydra:member": [ { "@id": "/books/1", "@type": "http://schema.org/Book", "name": "My awesome book" }, { "_": "Other items in the collection..." }, ], "hydra:totalItems": 50, "hydra:view": { "@id": "/books?page=1", "@type": "hydra:PartialCollectionView", "hydra:first": "/books?page=1", "hydra:last": "/books?page=2", "hydra:next": "/books?page=2" } } ``` Hypermedia links to the first, the last, previous and the next page in the collection are displayed as well as the number of total items in the collection. The name of the page parameter can be changed with the following configuration: ```yaml # api/config/packages/api_platform.yaml api_platform: collection: pagination: page_parameter_name: _page ``` ## Disabling the Pagination Paginating collections is generally accepted as a good practice. It allows browsing large collections without too much overhead as well as preventing [DOS attacks](https://en.wikipedia.org/wiki/Denial-of-service_attack). However, for small collections, it can be convenient to fully disable the pagination. ### Globally The pagination can be disabled for all resources using this configuration: ```yaml # api/config/packages/api_platform.yaml api_platform: collection: pagination: enabled: false ``` ### For a Specific Resource It can also be disabled for specific resource: ```php