Zum Inhalt springen
Search Box API

Search Box API

Suche mit Vorschlägen für Adressen und Orte. suggest beim Tippen aufrufen, danach retrieve für den gewählten Treffer.

Basis-URL: https://api.mapx.at · Rate-Limit-Zone: search (10/s) · Guide: Suche

Search Box: suggestions

GET /v1/searchbox/suggest

Like geocode, but a suggestion list without coordinates (mapbox_id for /retrieve), with category (poi_category, poi_category_ids, maki) and context. Official POIs, no OSM data.

Parameter

NameOrtTypPflichtStandardBeschreibung
qquerystringja–Search text
session_tokenquerystring–Arbitrary session id (up to 128 characters), no effect
proximityquerystring–lon,lat
typesquerystring–region, postcode, district, place, locality, street, address, poi, parcel, road_ref (country, neighborhood, category have no effect)
poi_categoryquerystring–Comma-separated category ids (English, e.g. pharmacy; old German ids deprecated until 2027-05-31), see /v1/searchbox/list/category
bboxquerystring–minlon,minlat,maxlon,maxlat
limitquerystring51 to 10, default 5

Beispiel

curl -s -H "Authorization: Bearer YOUR_TOKEN" "https://api.mapx.at/v1/searchbox/suggest?q=Stephansdom&proximity=16.3725,48.2085&limit=3" | jq

Beispielantwort

{
  "suggestions": [
    {
      "name": "Stephansdom",
      "mapbox_id": "poi-4711",
      "feature_type": "poi",
      "place_formatted": "Place of worship, Wien",
      "poi_category": [
        "place_of_worship"
      ]
    }
  ],
  "attribution": "..."
}

Fehler (Details: Fehlerkatalog)

StatusBedeutung
400Parameter fehlt oder ist ungültig
401Token fehlt oder ungültig (missing-token, invalid-token, token-expired)
403Token nicht erlaubt (origin-not-allowed, origin-missing, pk-not-allowed, app-not-allowed, token-blocked, ip-not-allowed)
429Rate-Limit überschritten, Retry-After abwarten
502Vorgelagerter Dienst nicht erreichbar

Search Box: resolve a suggestion

GET /v1/searchbox/retrieve/{id}

FeatureCollection with one feature (point, bbox, coordinates, context); 404 for an unknown id.

Parameter

NameOrtTypPflichtStandardBeschreibung
idpathstringja–mapbox_id from suggest
session_tokenquerystring–As in suggest
proximityquerystring–lon,lat, only for the distance

Beispiel

curl -s -H "Authorization: Bearer YOUR_TOKEN" "https://api.mapx.at/v1/searchbox/retrieve/place-6456531" | jq

Beispielantwort

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          16.3731,
          48.2085
        ]
      },
      "properties": {
        "name": "Stephansdom"
      }
    }
  ]
}

Fehler (Details: Fehlerkatalog)

StatusBedeutung
400Parameter fehlt oder ist ungültig
401Token fehlt oder ungültig (missing-token, invalid-token, token-expired)
403Token nicht erlaubt (origin-not-allowed, origin-missing, pk-not-allowed, app-not-allowed, token-blocked, ip-not-allowed)
404Nicht gefunden (Name, Pfad oder Position)
429Rate-Limit überschritten, Retry-After abwarten

Search Box: places of a category

GET /v1/searchbox/category/{category}

Places of the category (several comma-separated), nearest first with proximity. Ids are English (e.g. pharmacy, train_station); the old German ids (apotheke, bahnhof, …) work as aliases until 2027-05-31 (Deprecation, Sunset).

Parameter

NameOrtTypPflichtStandardBeschreibung
categorypathstringja–Category id(s)
proximityquerystring–lon,lat
bboxquerystring–minlon,minlat,maxlon,maxlat
limitquerystring101 to 25, default 10

Beispiel

curl -s -H "Authorization: Bearer YOUR_TOKEN" "https://api.mapx.at/v1/searchbox/category/pharmacy?proximity=16.3725,48.2085&limit=3" | jq

Beispielantwort

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Point",
        "coordinates": [
          16.37,
          48.21
        ]
      },
      "properties": {
        "name": "Apotheke Zum Hirschen"
      }
    }
  ]
}

Fehler (Details: Fehlerkatalog)

StatusBedeutung
400Parameter fehlt oder ist ungültig
401Token fehlt oder ungültig (missing-token, invalid-token, token-expired)
403Token nicht erlaubt (origin-not-allowed, origin-missing, pk-not-allowed, app-not-allowed, token-blocked, ip-not-allowed)
429Rate-Limit überschritten, Retry-After abwarten
502Vorgelagerter Dienst nicht erreichbar

Search Box: category list

GET /v1/searchbox/list/category

Stable category ids (canonical_id), name and Maki icon.

Parameter

NameOrtTypPflichtStandardBeschreibung
languagequerystring–de (default) or en

Beispiel

curl -s -H "Authorization: Bearer YOUR_TOKEN" "https://api.mapx.at/v1/searchbox/list/category?language=en" | jq

Beispielantwort

{
  "listItems": [
    {
      "canonical_id": "pharmacy",
      "icon": "pharmacy",
      "name": "Apotheke"
    }
  ]
}

Fehler (Details: Fehlerkatalog)

StatusBedeutung
400Parameter fehlt oder ist ungültig
401Token fehlt oder ungültig (missing-token, invalid-token, token-expired)
403Token nicht erlaubt (origin-not-allowed, origin-missing, pk-not-allowed, app-not-allowed, token-blocked, ip-not-allowed)
429Rate-Limit überschritten, Retry-After abwarten

Playground

Playground
curl
Antwort erscheint hier.