{"id":15611468,"url":"https://github.com/mfogel/get-overpass","last_synced_at":"2026-04-29T15:07:33.338Z","repository":{"id":57250338,"uuid":"107984200","full_name":"mfogel/get-overpass","owner":"mfogel","description":"Get OpenStreetMap objects via the Overpass API as GeoJSON","archived":false,"fork":false,"pushed_at":"2017-12-12T16:44:35.000Z","size":66,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T11:01:45.008Z","etag":null,"topics":["geojson","openstreetmap","osm","overpass-api"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mfogel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-23T13:13:49.000Z","updated_at":"2023-12-18T14:54:28.000Z","dependencies_parsed_at":"2022-08-24T16:22:28.424Z","dependency_job_id":null,"html_url":"https://github.com/mfogel/get-overpass","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfogel%2Fget-overpass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfogel%2Fget-overpass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfogel%2Fget-overpass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfogel%2Fget-overpass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mfogel","download_url":"https://codeload.github.com/mfogel/get-overpass/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246200296,"owners_count":20739563,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geojson","openstreetmap","osm","overpass-api"],"created_at":"2024-10-03T06:04:37.420Z","updated_at":"2026-04-29T15:07:28.319Z","avatar_url":"https://github.com/mfogel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# get-overpass [![npm version](https://badge.fury.io/js/get-overpass.svg)](https://badge.fury.io/js/get-overpass)\nGet OpenStreetMap objects via the Overpass API as GeoJSON\n\n## Quickstart\n\n```sh\n$ npm install -g get-overpass\n$ get-overpass relation/3082668 \u003e buenos-aires.geojson\n```\n\n## CMD\n\n```sh\n$ get-overpass [-a/--api-endpoint url] [-m/--mapbox-ids] \u003cOSM ID\u003e\n```\n\n\n## API\n\n`get-overpass` exports a single function which returns a promise.\n\n```js\nfunction getOverpass(osmId, mapboxIds = false, apiEndpoint = \"https://overpass-api.de/api/interpreter\") =\u003e new Promise()\n```\n\nExample:\n\n```js\nconst getOverpass = require('get-overpass')\ngetOverpass('relation/3082668')\n  .then(data =\u003e console.log(\"Buenos Aires:\", data)\n  .catch(error =\u003e console.log(\"DOH!\", error.message)\n```\n\n## OSM IDs\n\nThere are two valid formats for OSM identifiers:\n\n* The [OSMtoGeoJSON string format](https://github.com/tyrasd/osmtogeojson): `{OSM type}/{OSM ID of that type}`\n* The [Mapbox globally unique numeric format](https://www.mapbox.com/vector-tiles/mapbox-streets-v7/):\n    * nodes: `{OSM node ID} * 10`\n    * ways: `{OSM way ID} * 10 + 1`\n    * relations: `{OSM relation ID} * 10 + 4`\n\nExamples of valid and equivalent OSM IDs are (osmtogeojson format, mapbox format):\n\n* `relation/3082668`, `30826684`\n* `way/213576258`, `2135762581`\n* `node/4497495008`, `44974950080`\n\nOnly the primary OSM types `relation`, `way`, and `node` are supported, other types (ie `area`) are not supported.\n\n## Options\n\n### `-a`/`--api-endpoint`/`apiEndpoint`\n\nUse the given url as an Overpass API endpoint. If not set, the default public Overpass API instance `https://overpass-api.de/api/interpreter` will be used. Note that general 'be friendly' [data usage limits](http://wiki.openstreetmap.org/wiki/Overpass_API) apply to the default endpoint.\n\n### `-m`/`--mapbox-ids`/`mapboxIds`\n\nFormat IDs in the output in Mapbox format. If not set, ID's will be in the default OSMtoGeoJSON format.\n\n## FAQ\n\n### How can I find the OSM ID of the feature I want to download?\n\nOne way to do this is to use the 'query features' tool (the question mark on the right of the interface) at https://www.openstreetmap.org/.\n\n### I get an error \"Unable to covert geom to geojson?\". What's up?\n\nUnder the hood, this tool uses [osmtogeojson](https://github.com/tyrasd/osmtogeojson) to build geojson from result sets. There are some OSM structures, particularly some `relations`, that it appears that osmtogeojson is unable to convert to geojson.\n\n### Do I need to worry about data licenses?\n\nMaybe. OpenStreetMap data is licensed under the [ODbL](http://www.openstreetmap.org/copyright). Attribution is required, and derivative works must also be licensed under the ODbL.\n\n## Credits\n\nInspired by and makes heavy use of Per Liedman's [query-overpass](https://github.com/perliedman/query-overpass).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfogel%2Fget-overpass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmfogel%2Fget-overpass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfogel%2Fget-overpass/lists"}