Drupal is a registered trademark of Dries Buytaert
Drupal 11.4.2 Update released for Drupal core (11.4.2)! Drupal 11.4.1 Update released for Drupal core (11.4.1)! Drupal 11.4.0 Update released for Drupal core (11.4.0)! Drupal 10.6.12 Update released for Drupal core (10.6.12)! Drupal 11.3.13 Update released for Drupal core (11.3.13)! Drupal 10.6.11 Update released for Drupal core (10.6.11)! Drupal 11.3.12 Update released for Drupal core (11.3.12)! Drupal 11.2.14 Update released for Drupal core (11.2.14)! Drupal 10.5.12 Update released for Drupal core (10.5.12)! Cms 2.1.3 Update released for Drupal core (2.1.3)! Drupal 10.5.11 Update released for Drupal core (10.5.11)! Drupal 11.3.11 Update released for Drupal core (11.3.11)! Drupal 11.2.13 Update released for Drupal core (11.2.13)! Drupal 10.6.10 Update released for Drupal core (10.6.10)! Cms 2.1.2 Update released for Drupal core (2.1.2)! Drupal 11.1.10 Update released for Drupal core (11.1.10)! Drupal 10.5.10 Update released for Drupal core (10.5.10)! Drupal 10.4.10 Update released for Drupal core (10.4.10)! Drupal 11.2.12 Update released for Drupal core (11.2.12)! Drupal 11.3.10 Update released for Drupal core (11.3.10)!

Overpass Api

No security coverage
View on drupal.org

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:

Activity

Total releases
1
First release
Jul 2026
Latest release
4 hours ago
Release cadence
Stability
0% stable

Releases

Version Type Release date
1.0.0-beta4 Pre-release Jul 13, 2026