Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

JSON:API Page Limit

Security covered Maintenance fixes only 209 sites

This module allows you to increase the default page limit for JSON API collection responses beyond the core limit of 50 items. You can configure specific paths to return more results, but be mindful of potential performance impacts.

Introduction

Customize the page limit for JSON API collection responses for specific paths.

Drupal has a maximum limit of 50 items returned per JSON:API collection page.

I.e. if you were to use the following url:
http://www.example.com/jsonapi/node/article?page[limit]=51
The amount of content you would get back would still be 50.

This module allows you to increase that limit.

Note that by doing so, you should be aware of the potential performance implications (as this is the reason behind the enforced limit of 50 in Drupal core).

Alternative module: jsonapi_defaults

Similar functionality is provided by the jsonapi_defaults module (part of jsonapi_extras).
Users should consider using jsonapi_defaults first, as it is much more actively maintained.

The key differences between the two modules, is that with jsonapi_defaults, the increased limit becomes the default.

This means the new amount will be returned unless something else is specified as part of the jsonapi url.

Whereas with jsonapi_page_limit, after increasing the limit for a resource, the default will still be 50 unless you specifically request more in the url.

Requirements

Only the jsonapi module (part of Drupal core) is required.

Installation

Install as you would normally install a contributed Drupal module. For further
information, see Installing Drupal Modules.

Note that this module will not do anything by itself until the configuration has been added.

Configuration

Define a set of paths and values as a service parameter in a custom services.yml file.
E.g.

parameters:
  jsonapi_page_limit.size_max:
    /jsonapi/node/page: 100
    /jsonapi/taxonomy/tags: 75
Drupal 10–11

Ask your assistant about JSON:API Page Limit

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • jsonapi Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Jul 2023
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Release Timeline

Releases

Version Type Core PHP Release date
8.x-1.3 Stable 10–11 Nov 14, 2024
8.x-1.2 Stable 10–11 Sep 15, 2024
8.x-1.1 Stable 9–10 Jul 13, 2023
8.x-1.0 Stable 8–10 Jul 13, 2023