Get started
Places

Search

Search

The search query of the Data API. Every request is a POST to https://data.mountaya.com/graphql with a publishable key and a session token: see Authentication.

POST
/graphql

Unified full-text search across geocoded places, POIs, ways, and Mountaya entities (itineraries, collections, zones).

Arguments

input

SearchInput!

required

The query text, the targets to search, and the filters applied to each of them.

Returns

search

SearchResult!

required

Result of the unified search query. Each target's section is non-null only when that target was enabled and its branch succeeded; failed branches leave their section null and surface an entry in errors[].

Errors A field the API refuses is answered 200, its entry in errors beside the data that resolved. See Errors.

curl https://data.mountaya.com/graphql \
  -H "X-API-Key: pk_your_publishable_key" \
  -H "X-Session-Token: sess_your_session_token" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "query Search($input: SearchInput!) { search(input: $input) { itineraries { count } places { count } query } }",
    "variables": {
      "input": {
        "focus": [6.8712, 45.9231],
        "limit": 2,
        "query": "Tour du Mont-Blanc",
        "targets": {"itineraries": true, "places": true}
      }
    }
  }'