Skip to main content
Drupal is a registered trademark of Dries Buytaert
EOL Warning: Drupal 11.0 has reached end of life and no longer receives security updates. EOL Warning: Drupal 10.3 has reached end of life and no longer receives security updates. EOL Warning: Drupal 10.2 has reached end of life and no longer receives security updates. EOL Warning: Drupal 10.1 has reached end of life and no longer receives security updates. EOL Warning: Drupal 10.0 has reached end of life and no longer receives security updates. EOL Warning: Drupal 9.5 has reached end of life and no longer receives security updates. EOL Warning: Drupal 9.4 has reached end of life and no longer receives security updates. EOL Warning: Drupal 9.3 has reached end of life and no longer receives security updates. Release: Raven: Sentry Integration 7.5.2 Minor update available for module raven (7.5.2). Usage Milestone: jQuery UI Datepicker Module jquery_ui_datepicker crossed 1,000 active installs.

Overpass API

1 sites No security coverage
View on drupal.org

This module allows Drupal sites to query the Overpass API, which provides access to OpenStreetMap data. It includes error handling and retry mechanisms to ensure stable data retrieval, even from less reliable public API instances.

Provides API for querying Overpass API service, to use in other Drupal modules.

Module by default uses Overpass API public instance at url http://overpass-api.de/api/, which is slow and very unstable, so for active usage it is recommended to use other more robust and stable instance. Instruction how to launch your own Overpass Instance »

But this module tries to handle timeout problems and fatal errors on the endpoint side with multiple query repeats, to provide more stable work on Drupal API side.

Usage example:

$result = \Drupal::service('overpass_api')->query(<<<EOT
relation
  ["admin_level"="2"]
  ["type"="boundary"]
  ["boundary"="administrative"]
  ["ISO3166-1:alpha2"~"^..$"]
EOT);

It should return array of OSM elements like this:

array:216 [
  0 => {
    "type": "relation"
    "id": 60189
    "members": [...]
    "tags": {...}
  }
  ...
]

Requirements

  • Drupal 8 or higher.
  • PHP library spatie/data-transfer-object, should be installed automatically with Composer.

Configuration

Configuration form is located on /admin/config/system/overpass-api url, where you can configure Overpass API endpoint (default is pointing to public API http://overpass-api.de/api/), timeouts and other options.

Technical details

To prevent timeout errors and fatal problems on default Overpass API endpoint instance, in this module there are implemented correct handling of timeout problems, fatal errors like 429 Too Many Requests., 500 Gateway Timeout behind reverse proxy. and 504 Gateway Timeout., also memory overflow errors to provide more stable work.

Supporting this Module

You can convey gratitude to me for the development of the module and motivate me to do more through these services:

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Jul 2026
Latest release
1 month ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.0-beta4 Pre-release 10–11 Jul 13, 2026