The JSON:API Links module makes it possible to remove the "links" attributes from Drupal's JSON:API responses. This saves bandwidth by making responses more compact.

There is one exception: if you request `/jsonapi` (or the path you set as the root path), nothing will be removed.

You can toggle this behavior via a UI setting.

The approach this module takes was originally suggested by Wim Leers.

Requirements

This module requires no modules outside of Drupal core.

Installation

Install as you would normally install a contributed Drupal module.

Configuration

  1. Enable the module at Administration > Extend.
  2. Configure the module at `/admin/config/services/jsonapi/links`. To remove links, check "Remove all links attributes".
Supporting organizations:

Project information

Releases

1.1.0 Stable release covered by the Drupal Security Team released 24 July 2025
Works with Drupal: ^10.3 || ^11

drops legacy code

Install:

Development version: 1.1.x-dev updated 24 Jul 2025 at 05:29 UTC

1.0.9 Stable release covered by the Drupal Security Team released 7 January 2025
Works with Drupal: ^8 || ^9 || ^10 || ^11

fixes critical regression

Install:

Development version: 1.0.x-dev updated 7 Jan 2025 at 07:06 UTC