Travel
OpenStreetMap logo

OpenStreetMap API

openstreetmap.org

OpenStreetMap - map feature details, geocoding, and driving directions.

Actions
7
Category
Travel
Login
Not required
Output
JSON

Call the OpenStreetMap API

Submit a task, then poll the job until it settles. This example runs act_openstreetmap_route_directions.

curl -X POST https://api.anakin.io/v1/wire/task \
  -H "X-API-Key: $ANAKIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action_id": "act_openstreetmap_route_directions",
    "params": {
      "origin_lon": "-122.3514141",
      "origin_lat": "47.6208282",
      "dest_lon": "-122.3493136",
      "dest_lat": "47.6203364"
    }
  }'

7 actions on openstreetmap.org

Read

  • Driving Route Directions

    act_openstreetmap_route_directionsread2 credits / call

    Returns driving directions with turn-by-turn steps, distance, and duration between two points.

    origin_lon
    string · required
    origin_lat
    string · required
    dest_lon
    string · required
    dest_lat
    string · required
  • Full Relation Data

    act_openstreetmap_osm_api_feature_full_relationread1 credit / call

    Returns full relation data including all nodes, ways, tags, and metadata.

    osm_id
    string · required
  • Full Way Data

    act_openstreetmap_osm_api_feature_full_wayread1 credit / call

    Returns full way data including constituent nodes and tags.

    osm_id
    string · required
  • Geocode Route Destination

    act_openstreetmap_nominatim_geocode_destinationread2 credits / call

    Returns coordinates, display name, and entrances for a geocoded destination address.

    route_destination_text
    string · required
    map_viewbox
    string · required
  • Geocode Route Origin

    act_openstreetmap_nominatim_geocode_originread2 credits / call

    Returns coordinates, display name, and entrances for a geocoded origin address.

    route_origin_text
    string · required
    map_viewbox
    string · required
  • Relation Details

    act_openstreetmap_feature_detail_browse_relationread1 credit / call

    Returns relation details including name, tags, version, and edit history.

    osm_id
    string · required
  • Relation Members List

    act_openstreetmap_feature_members_listread1 credit / call

    Returns a relation's member nodes and ways with their roles.

    osm_id
    string · required

OpenStreetMap API questions

Is there an API for OpenStreetMap?
OpenStreetMap does not offer a public data API for this, but Anakin Wire provides 7 maintained endpoints for openstreetmap.org. You call Anakin's REST API with an action ID and parameters and get structured JSON back; Anakin handles the browser, proxies, anti-bot, and parsing.
How do I scrape OpenStreetMap data?
POST to https://api.anakin.io/v1/wire/task with your API key, the action ID, and its parameters, then poll GET /v1/wire/jobs/{id} until the job settles. There is nothing to install and no scraper to maintain — when openstreetmap.org changes its markup, Anakin updates the action.
Do I need a OpenStreetMap account?
No. Every OpenStreetMap action listed here runs anonymously — no account and no credentials required.
What does the OpenStreetMap API cost?
Usage-based credits, charged per call and refunded automatically when a job fails. New accounts start with 300 free credits and no card. See anakin.io/pricing for the current rates.

More Travel APIs

All Travel sites