> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Geoapify

> Geocoding, address autocomplete, points of interest by category, place details and turn-by-turn routing, built on OpenStreetMap data.

![](https://mintcdn.com/webrouter/gPu3tCeozwRcDBjt/logo/data-apis/geoapify.webp?fit=max\&auto=format\&n=gPu3tCeozwRcDBjt\&q=85\&s=7e5034e1db7ab5453fa2ef223bc7fa5d)

[Web Catalog · Maps](https://docs.webrouter.net/data-apis.md?category=maps)

Needs&#x20;

`GEOAPIFY_API_KEY`

Endpoints

6

Auth

Key in query

[Vendor docs](https://apidocs.geoapify.com/)

&#x20;·&#x20;

[Pricing](https://www.geoapify.com/pricing/)

## Setup

| Variable | | What it is |
| - | - | - |
| `GEOAPIFY_API_KEY` | required | A Geoapify API key (myprojects.geoapify.com > project > API keys), sent as the apiKey query parameter. |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* Billing is in credits; the free plan has 3,000 credits a day. A geocode is 1 credit, a places page 1 credit per 20 places returned, a route 1 credit per waypoint pair plus surcharges.
* Coordinate order differs by call: filter and bias strings are longitude first (circle:lon,lat,radius; rect:lon1,lat1,lon2,lat2; proximity:lon,lat), routing waypoints are latitude first unless prefixed lonlat:, and reverse geocoding takes separate lat and lon.
* Responses are GeoJSON by default; pass format=json for a flat results list where the call offers it.

## Endpoints

GET

Geocode an address

Coordinates and structured address for a free-text or structured address.

[Open](#geoapify-geocode-search)

GET

Reverse geocode a coordinate

The address or place at a latitude and longitude.

[Open](#geoapify-geocode-reverse)

GET

Autocomplete an address

Address and place suggestions for partly typed text.

[Open](#geoapify-geocode-autocomplete)

GET

Find places by category in an area

Points of interest of given categories (supermarkets, cafes, hospitals...) inside or near an area.

[Open](#geoapify-places-search)

GET

Get a place's details

Contact details, opening hours, names and geometry of one place, plus optional nearby places and isolines.

[Open](#geoapify-places-details)

GET

Get a route between waypoints

Distance, time, geometry and turn-by-turn steps for driving, trucks, walking, cycling or transit.

[Open](#geoapify-routing)

### Geocode an address

GET

`/v1/geocode/search`

`geoapify.geocode.search`

Coordinates and structured address for a free-text or structured address.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`text`</td><td>string</td><td>query</td><td>Free-form address; do not combine with the structured fields. Example `38 Upper Montagu Street, London W1H 1LJ`</td></tr>

    <tr>
      <td>
        `name`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Structured: place or amenity name.
      </td>
    </tr>

    <tr>
      <td>
        `housenumber`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Structured: house number.
      </td>
    </tr>

    <tr>
      <td>
        `street`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Structured: street.
      </td>
    </tr>

    <tr>
      <td>
        `postcode`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Structured: postcode.
      </td>
    </tr>

    <tr>
      <td>
        `city`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Structured: city.
      </td>
    </tr>

    <tr>
      <td>
        `state`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Structured: state or region.
      </td>
    </tr>

    <tr>
      <td>
        `country`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Structured: country.
      </td>
    </tr>

    <tr><td>`type`</td><td>string</td><td>query</td><td>Kind of location wanted. One of `country`, `state`, `city`, `postcode`, `street`, `amenity`, `locality`</td></tr>

    <tr>
      <td>
        `lang`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        ISO 639-1 language code.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Maximum results, default 5.
      </td>
    </tr>

    <tr><td>`filter`</td><td>string</td><td>query</td><td>Hard limits, joined with |: circle:lon,lat,radiusM, rect:lon1,lat1,lon2,lat2, countrycode:de,fr, place:placeId. Example `countrycode:gb`</td></tr>

    <tr>
      <td>
        `bias`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Ranking preference, joined with |: proximity:lon,lat, circle:..., rect:..., countrycode:...; default countrycode:auto (by caller IP).
      </td>
    </tr>

    <tr><td>`format`</td><td>string</td><td>query</td><td>Default geojson. One of `geojson`, `json`, `xml`</td></tr>
  </tbody>
</table>

[Vendor docs](https://apidocs.geoapify.com/docs/geocoding/forward-geocoding/) · Same job: [Amap (Gaode) Web Service](https://docs.webrouter.net/data-apis/amap.md#amap-geocode), [API Ninjas](https://docs.webrouter.net/data-apis/apininjas.md#apininjas-geocode), [Google Maps Platform](https://docs.webrouter.net/data-apis/google-maps.md#google-maps-geocode-forward), [GraphHopper Directions API](https://docs.webrouter.net/data-apis/graphhopper.md#graphhopper-geocode-forward), [HERE](https://docs.webrouter.net/data-apis/here-maps.md#here-maps-geocode), [OpenCage Geocoding](https://docs.webrouter.net/data-apis/opencage.md#opencage-geocode-forward)

```python Python theme={null}
router.call_data_api("geoapify.geocode.search", {'text': '38 Upper Montagu Street, London W1H 1LJ', 'filter': 'countrycode:gb'})
```

```text MCP theme={null}
call_data_api(endpoint="geoapify.geocode.search", params={"text": "38 Upper Montagu Street, London W1H 1LJ", "filter": "countrycode:gb"})
```

> [!NOTE]
>
> * The default bias favours the country of the caller's IP; pass bias=countrycode:none to turn it off.

### Reverse geocode a coordinate

GET

`/v1/geocode/reverse`

`geoapify.geocode.reverse`

The address or place at a latitude and longitude.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`lat` required</td><td>number</td><td>query</td><td>Latitude. Example `51.5214`</td></tr>
    <tr><td>`lon` required</td><td>number</td><td>query</td><td>Longitude. Example `-0.1595`</td></tr>
    <tr><td>`type`</td><td>string</td><td>query</td><td>Kind of location wanted. One of `country`, `state`, `city`, `postcode`, `street`, `amenity`, `locality`, `building`</td></tr>

    <tr>
      <td>
        `lang`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        ISO 639-1 language code.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Maximum results, default 1.
      </td>
    </tr>

    <tr><td>`format`</td><td>string</td><td>query</td><td>Default geojson. One of `geojson`, `json`, `xml`</td></tr>
  </tbody>
</table>

[Vendor docs](https://apidocs.geoapify.com/docs/geocoding/reverse-geocoding/) · Same job: [Google Maps Platform](https://docs.webrouter.net/data-apis/google-maps.md#google-maps-geocode-reverse), [GraphHopper Directions API](https://docs.webrouter.net/data-apis/graphhopper.md#graphhopper-geocode-reverse), [HERE](https://docs.webrouter.net/data-apis/here-maps.md#here-maps-revgeocode), [OpenCage Geocoding](https://docs.webrouter.net/data-apis/opencage.md#opencage-geocode-reverse), [TomTom](https://docs.webrouter.net/data-apis/tomtom.md#tomtom-geocode-reverse)

```python Python theme={null}
router.call_data_api("geoapify.geocode.reverse", {'lat': 51.5214, 'lon': -0.1595})
```

```text MCP theme={null}
call_data_api(endpoint="geoapify.geocode.reverse", params={"lat": 51.5214, "lon": -0.1595})
```

### Autocomplete an address

GET

`/v1/geocode/autocomplete`

`geoapify.geocode.autocomplete`

Address and place suggestions for partly typed text.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`text` required</td><td>string</td><td>query</td><td>Partial address or place name. Example `Mosco`</td></tr>
    <tr><td>`type`</td><td>string</td><td>query</td><td>Kind of location wanted. One of `country`, `state`, `city`, `postcode`, `street`, `amenity`, `locality`</td></tr>

    <tr>
      <td>
        `lang`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        ISO 639-1 language code.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Maximum suggestions.
      </td>
    </tr>

    <tr>
      <td>
        `filter`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Hard limits, e.g. countrycode:de or circle:lon,lat,radiusM.
      </td>
    </tr>

    <tr>
      <td>
        `bias`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Ranking preference, e.g. proximity:lon,lat.
      </td>
    </tr>

    <tr><td>`format`</td><td>string</td><td>query</td><td>Default geojson. One of `geojson`, `json`, `xml`</td></tr>
  </tbody>
</table>

[Vendor docs](https://apidocs.geoapify.com/docs/geocoding/address-autocomplete/) · Same job: [Foursquare Places API](https://docs.webrouter.net/data-apis/foursquare.md#foursquare-places-autocomplete), [Yelp Fusion](https://docs.webrouter.net/data-apis/yelp.md#yelp-autocomplete)

```python Python theme={null}
router.call_data_api("geoapify.geocode.autocomplete", {'text': 'Mosco'})
```

```text MCP theme={null}
call_data_api(endpoint="geoapify.geocode.autocomplete", params={"text": "Mosco"})
```

> [!NOTE]
>
> * 1 credit per request, so every keystroke costs; debounce.

### Find places by category in an area

GET

`/v2/places`

`geoapify.places.search`

Points of interest of given categories (supermarkets, cafes, hospitals...) inside or near an area.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`categories` required</td><td>string</td><td>query</td><td>Comma-separated category keys from Geoapify's category list, e.g. commercial.supermarket. Example `commercial.supermarket`</td></tr>

    <tr>
      <td>
        `conditions`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated condition keys, e.g. wheelchair.yes.
      </td>
    </tr>

    <tr><td>`filter`</td><td>string</td><td>query</td><td>Area, joined with |: circle:lon,lat,radiusM, rect:lon1,lat1,lon2,lat2, place:placeId, geometry:geometryId, countrycode:de. Example `circle:-0.1276,51.5072,1000`</td></tr>
    <tr><td>`bias`</td><td>string</td><td>query</td><td>Ranking: proximity:lon,lat, circle:..., or rect:... Example `proximity:-0.1276,51.5072`</td></tr>

    <tr>
      <td>
        `name`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Keep places whose name matches.
      </td>
    </tr>

    <tr>
      <td>
        `limit`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Results per page, default 20, max 500.
      </td>
    </tr>

    <tr>
      <td>
        `offset`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Zero-based start index for paging.
      </td>
    </tr>

    <tr>
      <td>
        `lang`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        ISO 639-1 language code.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://apidocs.geoapify.com/docs/places/) · Same job: [Amap (Gaode) Web Service](https://docs.webrouter.net/data-apis/amap.md#amap-places-search), [Atly](https://docs.webrouter.net/data-apis/atly.md#atly-places-search), [Best Buy](https://docs.webrouter.net/data-apis/bestbuy.md#bestbuy-stores-search), [FDIC BankFind Suite](https://docs.webrouter.net/data-apis/fdic.md#fdic-locations-search), [Foursquare Places API](https://docs.webrouter.net/data-apis/foursquare.md#foursquare-places-search), [Google Maps Platform](https://docs.webrouter.net/data-apis/google-maps.md#google-maps-places-text-search)

```python Python theme={null}
router.call_data_api("geoapify.places.search", {'categories': 'commercial.supermarket', 'filter': 'circle:-0.1276,51.5072,1000', 'bias': 'proximity:-0.1276,51.5072'})
```

```text MCP theme={null}
call_data_api(endpoint="geoapify.places.search", params={"categories": "commercial.supermarket", "filter": "circle:-0.1276,51.5072,1000", "bias": "proximity:-0.1276,51.5072"})
```

> [!NOTE]
>
> * Give filter or bias: one of them is required. 1 credit per 20 places returned, so a limit of 500 can cost 25 credits.

### Get a place's details

GET

`/v2/place-details`

`geoapify.places.details`

Contact details, opening hours, names and geometry of one place, plus optional nearby places and isolines.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `id`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        place\_id from places.search or a geocode; preferred over coordinates.
      </td>
    </tr>

    <tr>
      <td>
        `lat`
      </td>

      <td>
        number
      </td>

      <td>
        query
      </td>

      <td>
        Latitude, with lon, instead of id.
      </td>
    </tr>

    <tr>
      <td>
        `lon`
      </td>

      <td>
        number
      </td>

      <td>
        query
      </td>

      <td>
        Longitude, with lat, instead of id.
      </td>
    </tr>

    <tr>
      <td>
        `features`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Feature groups, default details: details, details.names, details.population, details.full\_geometry, building, radius\_500, walk\_10, drive\_5.hospital...
      </td>
    </tr>

    <tr>
      <td>
        `lang`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        ISO 639-1 language code.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://apidocs.geoapify.com/docs/place-details/) · Same job: [Atly](https://docs.webrouter.net/data-apis/atly.md#atly-places-get), [Foursquare Places API](https://docs.webrouter.net/data-apis/foursquare.md#foursquare-places-get), [Google Maps Platform](https://docs.webrouter.net/data-apis/google-maps.md#google-maps-places-details), [HERE](https://docs.webrouter.net/data-apis/here-maps.md#here-maps-lookup), [Whitepages Pro](https://docs.webrouter.net/data-apis/whitepages.md#whitepages-property-owners), [Yelp Fusion](https://docs.webrouter.net/data-apis/yelp.md#yelp-businesses-get)

```python Python theme={null}
router.call_data_api("geoapify.places.details")
```

```text MCP theme={null}
call_data_api(endpoint="geoapify.places.details")
```

> [!NOTE]
>
> * Each extra feature costs: details and building 1 credit each, an isoline 1 credit per 5 minutes, nearby places 1 credit per 20.

### Get a route between waypoints

GET

`/v1/routing`

`geoapify.routing`

Distance, time, geometry and turn-by-turn steps for driving, trucks, walking, cycling or transit.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`waypoints` required</td><td>string</td><td>query</td><td>Two or more points joined with |, each lat,lon (latitude first) or lonlat:lon,lat. Example `50.96209,4.83289|50.96226,4.83396`</td></tr>
    <tr><td>`mode` required</td><td>string</td><td>query</td><td>Travel mode; drive is a car. One of `walk`, `hike`, `scooter`, `motorcycle`, `drive`, `light_truck`, `medium_truck`, `truck`, `heavy_truck`, `truck_dangerous_goods`, `long_truck`, `bicycle`, `mountain_bike`, `road_bike`, `bus`, `transit`, `approximated_transit` Example `drive`</td></tr>
    <tr><td>`type`</td><td>string</td><td>query</td><td>Route preference, default balanced. One of `balanced`, `short`, `less_maneuvers`</td></tr>
    <tr><td>`units`</td><td>string</td><td>query</td><td>Default metric. One of `metric`, `imperial`</td></tr>

    <tr>
      <td>
        `lang`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Language of the instructions, e.g. en, de.
      </td>
    </tr>

    <tr>
      <td>
        `avoid`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Joined with |: tolls, ferries, highways (optionally :0-1 importance), location:lat,lon. Soft: kept if there is no alternative.
      </td>
    </tr>

    <tr>
      <td>
        `details`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated: instruction\_details, route\_details, elevation, admin\_areas, polyline5, polyline6.
      </td>
    </tr>

    <tr><td>`traffic`</td><td>string</td><td>query</td><td>Default free\_flow; motorized modes only. One of `free_flow`, `approximated`</td></tr>

    <tr>
      <td>
        `max_speed`
      </td>

      <td>
        number
      </td>

      <td>
        query
      </td>

      <td>
        Speed cap, 10-252 km/h (or mph with units=imperial).
      </td>
    </tr>

    <tr>
      <td>
        `optimize_stops`
      </td>

      <td>
        boolean
      </td>

      <td>
        query
      </td>

      <td>
        Reorder intermediate waypoints; first and last stay.
      </td>
    </tr>

    <tr><td>`format`</td><td>string</td><td>query</td><td>Default geojson. One of `geojson`, `json`, `xml`</td></tr>
  </tbody>
</table>

[Vendor docs](https://apidocs.geoapify.com/docs/routing/) · Same job: [Amap (Gaode) Web Service](https://docs.webrouter.net/data-apis/amap.md#amap-directions-driving), [HERE](https://docs.webrouter.net/data-apis/here-maps.md#here-maps-routes), [Mapbox](https://docs.webrouter.net/data-apis/mapbox.md#mapbox-directions-get), [TomTom](https://docs.webrouter.net/data-apis/tomtom.md#tomtom-routing-calculate)

```python Python theme={null}
router.call_data_api("geoapify.routing", {'waypoints': '50.96209,4.83289|50.96226,4.83396', 'mode': 'drive'})
```

```text MCP theme={null}
call_data_api(endpoint="geoapify.routing", params={"waypoints": "50.96209,4.83289|50.96226,4.83396", "mode": "drive"})
```

> [!NOTE]
>
> * Cost: 1 credit per consecutive waypoint pair, plus 1 per avoid rule, 1 per pair each for route\_details and elevation, 1 per 500 km, and a matrix charge when optimize\_stops reorders more than three waypoints.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.