curl --request POST \
--url https://api.aisa.one/apis/v1/graphhopper/geocode-get \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"q": "Berlin",
"reverse": false,
"provider": "default"
}
'import requests
url = "https://api.aisa.one/apis/v1/graphhopper/geocode-get"
payload = {
"q": "Berlin",
"reverse": False,
"provider": "default"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({q: 'Berlin', reverse: false, provider: 'default'})
};
fetch('https://api.aisa.one/apis/v1/graphhopper/geocode-get', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/graphhopper/geocode-get",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'q' => 'Berlin',
'reverse' => false,
'provider' => 'default'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/graphhopper/geocode-get"
payload := strings.NewReader("{\n \"q\": \"Berlin\",\n \"reverse\": false,\n \"provider\": \"default\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/graphhopper/geocode-get")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"q\": \"Berlin\",\n \"reverse\": false,\n \"provider\": \"default\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/graphhopper/geocode-get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"q\": \"Berlin\",\n \"reverse\": false,\n \"provider\": \"default\"\n}"
response = http.request(request)
puts response.read_body{
"hits": [
{
"point": {
"lat": 123,
"lng": 123
},
"city": "<string>",
"name": "<string>",
"state": "<string>",
"extent": [
123
],
"osm_id": 123,
"street": "<string>",
"country": "<string>",
"osm_key": "<string>",
"osm_type": "<string>",
"postcode": "<string>",
"osm_value": "<string>",
"countrycode": "<string>",
"housenumber": "<string>"
}
],
"took": 123,
"locale": "<string>"
}GraphHopper Geocoding
curl --request POST \
--url https://api.aisa.one/apis/v1/graphhopper/geocode-get \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"q": "Berlin",
"reverse": false,
"provider": "default"
}
'import requests
url = "https://api.aisa.one/apis/v1/graphhopper/geocode-get"
payload = {
"q": "Berlin",
"reverse": False,
"provider": "default"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({q: 'Berlin', reverse: false, provider: 'default'})
};
fetch('https://api.aisa.one/apis/v1/graphhopper/geocode-get', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/apis/v1/graphhopper/geocode-get",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'q' => 'Berlin',
'reverse' => false,
'provider' => 'default'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/graphhopper/geocode-get"
payload := strings.NewReader("{\n \"q\": \"Berlin\",\n \"reverse\": false,\n \"provider\": \"default\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/apis/v1/graphhopper/geocode-get")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"q\": \"Berlin\",\n \"reverse\": false,\n \"provider\": \"default\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/graphhopper/geocode-get")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"q\": \"Berlin\",\n \"reverse\": false,\n \"provider\": \"default\"\n}"
response = http.request(request)
puts response.read_body{
"hits": [
{
"point": {
"lat": 123,
"lng": 123
},
"city": "<string>",
"name": "<string>",
"state": "<string>",
"extent": [
123
],
"osm_id": 123,
"street": "<string>",
"country": "<string>",
"osm_key": "<string>",
"osm_type": "<string>",
"postcode": "<string>",
"osm_value": "<string>",
"countrycode": "<string>",
"housenumber": "<string>"
}
],
"took": 123,
"locale": "<string>"
}Request contract
- Method and path: POST /apis/v1/graphhopper/geocode-get
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/graphhopper/geocode-get - Runtime facts: 6a72f8e2fa7fb1c29379e3b24b3a247c8428a3b6ed621b3f84f84e75cb0de2bc
{
"operationId": "graphhopper.geocode-get",
"method": "POST",
"path": "/apis/v1/graphhopper/geocode-get",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"q": {
"type": "string",
"description": "Text to geocode (forward geocoding). Required when reverse=false; must be omitted if reverse=true.",
"examples": [
"Berlin"
]
},
"key": {
"type": "string",
"examples": [
"your_api_key"
],
"description": "Your GraphHopper API key. If not provided, it will be automatically injected from the connection."
},
"bbox": {
"type": "string",
"description": "Bounding box 'minLon,minLat,maxLon,maxLat'. Requires reverse=false. Only provider=default."
},
"zoom": {
"type": "number",
"description": "Map-like zoom level controlling focus radius. Only provider=default."
},
"debug": {
"type": "boolean",
"default": false,
"description": "Pretty-print the output. Default false."
},
"limit": {
"type": "integer",
"default": 5,
"minimum": 1,
"examples": [
1,
10
],
"description": "Maximum number of results. Default 5."
},
"point": {
"type": "string",
"examples": [
"52.529407,13.397634"
],
"description": "Coordinate 'lat,lon'. Required when reverse=true; for forward geocoding, acts as location bias."
},
"bounds": {
"type": "string",
"description": "Bounds 'minLon,minLat,maxLon,maxLat'. For nominatim or opencagedata."
},
"locale": {
"enum": [
"en",
"de",
"fr"
],
"type": "string",
"default": "en",
"examples": [
"en"
],
"description": "Locale of results. Default 'en'."
},
"radius": {
"type": "number",
"description": "Search radius. Default: km for provider=default when reverse=true; meters for provider=gisgraphy."
},
"osm_tag": {
"type": "array",
"items": {
"type": "string"
},
"description": "OSM tags to filter/include or exclude, e.g., 'tourism:museum' or '!tourism:museum'. Only provider=default."
},
"reverse": {
"enum": [
false
],
"type": "boolean",
"description": "Set to true for reverse geocoding. Default false."
},
"provider": {
"enum": [
"default"
],
"type": "string",
"description": "Alternative geocoding provider."
},
"countrycode": {
"type": "string",
"description": "ISO 3166-1 alpha-2 country filter. For nominatim, gisgraphy, or opencagedata."
},
"autocomplete": {
"type": "boolean",
"description": "Enable autocomplete (only for provider=gisgraphy and reverse=false)."
},
"location_bias_scale": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "Location bias scale between 0.0 and 1.0. Only provider=default."
}
},
"required": [
"provider",
"q",
"reverse"
]
}
}
}
},
"x-aisa-status": "enabled",
"x-aisa-pricing": {
"cost_contract": "response_units",
"customer_multiplier": 1.0,
"customer_pricing": "provider_cost_multiplier",
"default_request_estimate_usd": 0.00042,
"estimate_source": "profile_seed",
"evidence_source": "response_body",
"maximum_units": 10000000,
"unit": "provider_credit",
"unit_rate_usd": 1e-06
},
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Usage-based billing; Default request estimate: $0.00042 USD (not a fixed price). Declared unit rate: $0.000001 USD per provider_credit. Account-specific pricing and final settlement may differ. Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.- Default request reference estimate (USD): 0.00042
- Declared unit rate (USD): 1e-06
- Billing unit: provider_credit
- Cost contract: response_units
- Published reference multiplier: 1.0
- Declared maximum count/units: 10000000
- Settlement evidence source: response_body
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Text to geocode (forward geocoding). Required when reverse=false; must be omitted if reverse=true.
"Berlin"
Set to true for reverse geocoding. Default false.
false Alternative geocoding provider.
default Your GraphHopper API key. If not provided, it will be automatically injected from the connection.
"your_api_key"
Bounding box 'minLon,minLat,maxLon,maxLat'. Requires reverse=false. Only provider=default.
Map-like zoom level controlling focus radius. Only provider=default.
Pretty-print the output. Default false.
Maximum number of results. Default 5.
x >= 11
10
Coordinate 'lat,lon'. Required when reverse=true; for forward geocoding, acts as location bias.
"52.529407,13.397634"
Bounds 'minLon,minLat,maxLon,maxLat'. For nominatim or opencagedata.
Locale of results. Default 'en'.
en, de, fr "en"
Search radius. Default: km for provider=default when reverse=true; meters for provider=gisgraphy.
OSM tags to filter/include or exclude, e.g., 'tourism:museum' or '!tourism:museum'. Only provider=default.
ISO 3166-1 alpha-2 country filter. For nominatim, gisgraphy, or opencagedata.
Enable autocomplete (only for provider=gisgraphy and reverse=false).
Location bias scale between 0.0 and 1.0. Only provider=default.
0 <= x <= 1