Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu 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

Total releases
2
First release
Oct 2025
Latest release
1 week 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