Parchment Docs

Search

Search endpoints

Search for places

GET
/search

Query Parameters

qstring
latstring
lngstring
radiusstring | number
maxResultsstring | number
autocompletestring | boolean

Response Body

curl -X GET "https://example.com/search/?q=string&lat=string&lng=string&radius=string&maxResults=string&autocomplete=string"
fetch("https://example.com/search/?q=string&lat=string&lng=string&radius=string&maxResults=string&autocomplete=string")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/search/?q=string&lat=string&lng=string&radius=string&maxResults=string&autocomplete=string"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/search/?q=string&lat=string&lng=string&radius=string&maxResults=string&autocomplete=string"

response = requests.request("GET", url)

print(response.text)
Empty

Execute advanced Overpass query

POST
/search/advanced

Request Body

application/jsonRequired
queryRequiredstring
Minimum length: 1
maxResultsnumber
Minimum: 1Maximum: 1000

Response Body

curl -X POST "https://example.com/search/advanced" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "string",
    "maxResults": 1
  }'
const body = JSON.stringify({
  "query": "string",
  "maxResults": 1
})

fetch("https://example.com/search/advanced", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://example.com/search/advanced"
  body := strings.NewReader(`{
    "query": "string",
    "maxResults": 1
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/search/advanced"
body = {
  "query": "string",
  "maxResults": 1
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
Empty

Search by category/preset

POST
/search/category

Request Body

application/jsonRequired
presetIdRequiredstring
Minimum length: 1
boundsRequiredobject
maxResultsnumber
Minimum: 1Maximum: 1000

Response Body

curl -X POST "https://example.com/search/category" \
  -H "Content-Type: application/json" \
  -d '{
    "presetId": "string",
    "bounds": {
      "north": 0,
      "south": 0,
      "east": 0,
      "west": 0
    },
    "maxResults": 1
  }'
const body = JSON.stringify({
  "presetId": "string",
  "bounds": {
    "north": 0,
    "south": 0,
    "east": 0,
    "west": 0
  },
  "maxResults": 1
})

fetch("https://example.com/search/category", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://example.com/search/category"
  body := strings.NewReader(`{
    "presetId": "string",
    "bounds": {
      "north": 0,
      "south": 0,
      "east": 0,
      "west": 0
    },
    "maxResults": 1
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/search/category"
body = {
  "presetId": "string",
  "bounds": {
    "north": 0,
    "south": 0,
    "east": 0,
    "west": 0
  },
  "maxResults": 1
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
Empty

Get all categories/presets

GET
/search/categories

Query Parameters

maxResultsstring | number

Response Body

curl -X GET "https://example.com/search/categories?maxResults=string"
fetch("https://example.com/search/categories?maxResults=string")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/search/categories?maxResults=string"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/search/categories?maxResults=string"

response = requests.request("GET", url)

print(response.text)
Empty

Get a specific category by ID

GET
/search/categories/{categoryId}

Path Parameters

categoryIdRequiredstring

Response Body

curl -X GET "https://example.com/search/categories/string"
fetch("https://example.com/search/categories/string")
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
)

func main() {
  url := "https://example.com/search/categories/string"

  req, _ := http.NewRequest("GET", url, nil)
  
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://example.com/search/categories/string"

response = requests.request("GET", url)

print(response.text)
Empty