Drupal is a registered trademark of Dries Buytaert
Release: Drupal 11.4.5 Update released for Drupal core (11.4.5)! Release: Drupal 10.6.15 Update released for Drupal core (10.6.15)! Release: Superfish Dropdown Menu 8.x-1.15 Minor update available for module superfish (8.x-1.15). Release: Leaflet 10.4.10 Minor update available for module leaflet (10.4.10). Release: Raven: Sentry Integration 7.5.1 Minor update available for module raven (7.5.1). Release: htmLawed 8.x-3.8 Minor update available for module htmlawed (8.x-3.8). Release: Raven: Sentry Integration 7.5.0 Minor update available for module raven (7.5.0). Module Revived: Media Library Form API Element 2.1.5 Module media_library_form_element updated after 10 months of inactivity (2.1.5). Release: Acquia Content Optimization 2.1.0-alpha1 First alpha version released for module conductor (2.1.0-alpha1). Usage Milestone: Manage display Module manage_display crossed 1,000 active installs.

API plugins

No security coverage
View on drupal.org

The api_plugins module provides a flexible foundation for building API integrations in Drupal. It offers plugin management, request execution, and authentication handling, allowing developers to create reusable connections to external services without extensive custom code for each integration.

Lightweight foundation for building API integrations in Drupal.

Core Philosophy

Don’t create a separate service for every third-party API. Define an API plugin with endpoint-specific configuration and use a single shared service for request execution, authentication, and error handling.

This module provides only the essentials for API integration:

  • Plugin discovery and management
  • HTTP request handling
  • Authentication management
  • Base classes for building custom API plugins

No UI. No forms. No fields. Just clean, reusable services for developers.

Installation

composer require drupal/api_plugins
drush en api_plugins

Basic Usage

Enable an integration module, for example:

drush en api_plugins_openai

Call an API endpoint via PHP:

$api_service = \Drupal::service('api_plugins.request');

// Call an API plugin
$result = $api_service->sendRequest('openai_chat_completions', [
  'prompt' => 'What is the capital city of Czechia?',
  'model' => 'gpt-4o-mini',
  'temperature' => 0.0,
]);

print_r($result);

Apify MCP Server Examples

The Apify MCP Server plugin provides access to major Apify tool categories:

  • actors – Actor discovery and management tools
  • docs – Documentation search tools
  • runs – Actor run information tools
  • storage – Dataset and key-value store tools
  • specific actors – e.g. apify/rag-web-browser, compass/crawler-google-places

List Available Tools

Enable the MCP plugin:

drush en api_plugins_mcp

Programmatically list tools:

$plugin_manager = \Drupal::service('plugin.manager.api_endpoint');
$plugin = $plugin_manager->createInstance('apify_mcp_server');

$response = $plugin->sendRequest([
  'method' => 'tools/list',
  'id' => 1,
]);

print_r($response);

Summary

API Plugins is designed for developers who want consistent, maintainable integrations with third-party APIs — without reinventing the wheel for every integration. Use it as a foundation for modules like api_plugins_openai, api_plugins_mcp, or your own custom API connectors.

Activity

Tracked releases
2
Tracked since
Oct 2025
Latest release
4 weeks ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.0.0 Stable Jul 9, 2026
1.0.x-dev Dev Oct 27, 2025