curl --request POST \
--url https://api.aisa.one/apis/v1/google-maps/geocoding-api \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"key": "YOUR_API_KEY",
"bounds": "34.172684,-118.604794|34.236144,-118.500938",
"latlng": "40.714224,-73.961452",
"region": "US",
"address": "1600 Amphitheatre Parkway, Mountain View, CA",
"language": "en",
"place_id": "ChIJd8BlQ2BZwokRAFUEcm_qrcA",
"components": "postal_code:94043|country:US",
"result_type": "street_address|locality",
"location_type": "ROOFTOP|RANGE_INTERPOLATED",
"extra_computations": [
"ADDRESS_DESCRIPTORS"
]
}
'import requests
url = "https://api.aisa.one/apis/v1/google-maps/geocoding-api"
payload = {
"key": "YOUR_API_KEY",
"bounds": "34.172684,-118.604794|34.236144,-118.500938",
"latlng": "40.714224,-73.961452",
"region": "US",
"address": "1600 Amphitheatre Parkway, Mountain View, CA",
"language": "en",
"place_id": "ChIJd8BlQ2BZwokRAFUEcm_qrcA",
"components": "postal_code:94043|country:US",
"result_type": "street_address|locality",
"location_type": "ROOFTOP|RANGE_INTERPOLATED",
"extra_computations": ["ADDRESS_DESCRIPTORS"]
}
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({
key: 'YOUR_API_KEY',
bounds: '34.172684,-118.604794|34.236144,-118.500938',
latlng: '40.714224,-73.961452',
region: 'US',
address: '1600 Amphitheatre Parkway, Mountain View, CA',
language: 'en',
place_id: 'ChIJd8BlQ2BZwokRAFUEcm_qrcA',
components: 'postal_code:94043|country:US',
result_type: 'street_address|locality',
location_type: 'ROOFTOP|RANGE_INTERPOLATED',
extra_computations: ['ADDRESS_DESCRIPTORS']
})
};
fetch('https://api.aisa.one/apis/v1/google-maps/geocoding-api', 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/google-maps/geocoding-api",
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([
'key' => 'YOUR_API_KEY',
'bounds' => '34.172684,-118.604794|34.236144,-118.500938',
'latlng' => '40.714224,-73.961452',
'region' => 'US',
'address' => '1600 Amphitheatre Parkway, Mountain View, CA',
'language' => 'en',
'place_id' => 'ChIJd8BlQ2BZwokRAFUEcm_qrcA',
'components' => 'postal_code:94043|country:US',
'result_type' => 'street_address|locality',
'location_type' => 'ROOFTOP|RANGE_INTERPOLATED',
'extra_computations' => [
'ADDRESS_DESCRIPTORS'
]
]),
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/google-maps/geocoding-api"
payload := strings.NewReader("{\n \"key\": \"YOUR_API_KEY\",\n \"bounds\": \"34.172684,-118.604794|34.236144,-118.500938\",\n \"latlng\": \"40.714224,-73.961452\",\n \"region\": \"US\",\n \"address\": \"1600 Amphitheatre Parkway, Mountain View, CA\",\n \"language\": \"en\",\n \"place_id\": \"ChIJd8BlQ2BZwokRAFUEcm_qrcA\",\n \"components\": \"postal_code:94043|country:US\",\n \"result_type\": \"street_address|locality\",\n \"location_type\": \"ROOFTOP|RANGE_INTERPOLATED\",\n \"extra_computations\": [\n \"ADDRESS_DESCRIPTORS\"\n ]\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/google-maps/geocoding-api")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"YOUR_API_KEY\",\n \"bounds\": \"34.172684,-118.604794|34.236144,-118.500938\",\n \"latlng\": \"40.714224,-73.961452\",\n \"region\": \"US\",\n \"address\": \"1600 Amphitheatre Parkway, Mountain View, CA\",\n \"language\": \"en\",\n \"place_id\": \"ChIJd8BlQ2BZwokRAFUEcm_qrcA\",\n \"components\": \"postal_code:94043|country:US\",\n \"result_type\": \"street_address|locality\",\n \"location_type\": \"ROOFTOP|RANGE_INTERPOLATED\",\n \"extra_computations\": [\n \"ADDRESS_DESCRIPTORS\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/google-maps/geocoding-api")
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 \"key\": \"YOUR_API_KEY\",\n \"bounds\": \"34.172684,-118.604794|34.236144,-118.500938\",\n \"latlng\": \"40.714224,-73.961452\",\n \"region\": \"US\",\n \"address\": \"1600 Amphitheatre Parkway, Mountain View, CA\",\n \"language\": \"en\",\n \"place_id\": \"ChIJd8BlQ2BZwokRAFUEcm_qrcA\",\n \"components\": \"postal_code:94043|country:US\",\n \"result_type\": \"street_address|locality\",\n \"location_type\": \"ROOFTOP|RANGE_INTERPOLATED\",\n \"extra_computations\": [\n \"ADDRESS_DESCRIPTORS\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"results": [
{
"types": [
"<string>"
],
"geometry": {
"location": {
"lat": 123,
"lng": 123
},
"viewport": {
"northeast": {
"lat": 123,
"lng": 123
},
"southwest": {
"lat": 123,
"lng": 123
}
},
"location_type": "<string>",
"bounds": {
"northeast": {
"lat": 123,
"lng": 123
},
"southwest": {
"lat": 123,
"lng": 123
}
}
},
"place_id": "<string>",
"formatted_address": "<string>",
"address_components": [
{
"types": [
"<string>"
],
"long_name": "<string>",
"short_name": "<string>"
}
],
"plus_code": {
"global_code": "<string>",
"compound_code": "<string>"
},
"partial_match": true,
"postcode_localities": [
"<string>"
]
}
],
"plus_code": {
"global_code": "<string>",
"compound_code": "<string>"
},
"error_message": "<string>"
}Geocoding API
curl --request POST \
--url https://api.aisa.one/apis/v1/google-maps/geocoding-api \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"key": "YOUR_API_KEY",
"bounds": "34.172684,-118.604794|34.236144,-118.500938",
"latlng": "40.714224,-73.961452",
"region": "US",
"address": "1600 Amphitheatre Parkway, Mountain View, CA",
"language": "en",
"place_id": "ChIJd8BlQ2BZwokRAFUEcm_qrcA",
"components": "postal_code:94043|country:US",
"result_type": "street_address|locality",
"location_type": "ROOFTOP|RANGE_INTERPOLATED",
"extra_computations": [
"ADDRESS_DESCRIPTORS"
]
}
'import requests
url = "https://api.aisa.one/apis/v1/google-maps/geocoding-api"
payload = {
"key": "YOUR_API_KEY",
"bounds": "34.172684,-118.604794|34.236144,-118.500938",
"latlng": "40.714224,-73.961452",
"region": "US",
"address": "1600 Amphitheatre Parkway, Mountain View, CA",
"language": "en",
"place_id": "ChIJd8BlQ2BZwokRAFUEcm_qrcA",
"components": "postal_code:94043|country:US",
"result_type": "street_address|locality",
"location_type": "ROOFTOP|RANGE_INTERPOLATED",
"extra_computations": ["ADDRESS_DESCRIPTORS"]
}
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({
key: 'YOUR_API_KEY',
bounds: '34.172684,-118.604794|34.236144,-118.500938',
latlng: '40.714224,-73.961452',
region: 'US',
address: '1600 Amphitheatre Parkway, Mountain View, CA',
language: 'en',
place_id: 'ChIJd8BlQ2BZwokRAFUEcm_qrcA',
components: 'postal_code:94043|country:US',
result_type: 'street_address|locality',
location_type: 'ROOFTOP|RANGE_INTERPOLATED',
extra_computations: ['ADDRESS_DESCRIPTORS']
})
};
fetch('https://api.aisa.one/apis/v1/google-maps/geocoding-api', 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/google-maps/geocoding-api",
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([
'key' => 'YOUR_API_KEY',
'bounds' => '34.172684,-118.604794|34.236144,-118.500938',
'latlng' => '40.714224,-73.961452',
'region' => 'US',
'address' => '1600 Amphitheatre Parkway, Mountain View, CA',
'language' => 'en',
'place_id' => 'ChIJd8BlQ2BZwokRAFUEcm_qrcA',
'components' => 'postal_code:94043|country:US',
'result_type' => 'street_address|locality',
'location_type' => 'ROOFTOP|RANGE_INTERPOLATED',
'extra_computations' => [
'ADDRESS_DESCRIPTORS'
]
]),
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/google-maps/geocoding-api"
payload := strings.NewReader("{\n \"key\": \"YOUR_API_KEY\",\n \"bounds\": \"34.172684,-118.604794|34.236144,-118.500938\",\n \"latlng\": \"40.714224,-73.961452\",\n \"region\": \"US\",\n \"address\": \"1600 Amphitheatre Parkway, Mountain View, CA\",\n \"language\": \"en\",\n \"place_id\": \"ChIJd8BlQ2BZwokRAFUEcm_qrcA\",\n \"components\": \"postal_code:94043|country:US\",\n \"result_type\": \"street_address|locality\",\n \"location_type\": \"ROOFTOP|RANGE_INTERPOLATED\",\n \"extra_computations\": [\n \"ADDRESS_DESCRIPTORS\"\n ]\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/google-maps/geocoding-api")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"YOUR_API_KEY\",\n \"bounds\": \"34.172684,-118.604794|34.236144,-118.500938\",\n \"latlng\": \"40.714224,-73.961452\",\n \"region\": \"US\",\n \"address\": \"1600 Amphitheatre Parkway, Mountain View, CA\",\n \"language\": \"en\",\n \"place_id\": \"ChIJd8BlQ2BZwokRAFUEcm_qrcA\",\n \"components\": \"postal_code:94043|country:US\",\n \"result_type\": \"street_address|locality\",\n \"location_type\": \"ROOFTOP|RANGE_INTERPOLATED\",\n \"extra_computations\": [\n \"ADDRESS_DESCRIPTORS\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/google-maps/geocoding-api")
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 \"key\": \"YOUR_API_KEY\",\n \"bounds\": \"34.172684,-118.604794|34.236144,-118.500938\",\n \"latlng\": \"40.714224,-73.961452\",\n \"region\": \"US\",\n \"address\": \"1600 Amphitheatre Parkway, Mountain View, CA\",\n \"language\": \"en\",\n \"place_id\": \"ChIJd8BlQ2BZwokRAFUEcm_qrcA\",\n \"components\": \"postal_code:94043|country:US\",\n \"result_type\": \"street_address|locality\",\n \"location_type\": \"ROOFTOP|RANGE_INTERPOLATED\",\n \"extra_computations\": [\n \"ADDRESS_DESCRIPTORS\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>",
"results": [
{
"types": [
"<string>"
],
"geometry": {
"location": {
"lat": 123,
"lng": 123
},
"viewport": {
"northeast": {
"lat": 123,
"lng": 123
},
"southwest": {
"lat": 123,
"lng": 123
}
},
"location_type": "<string>",
"bounds": {
"northeast": {
"lat": 123,
"lng": 123
},
"southwest": {
"lat": 123,
"lng": 123
}
}
},
"place_id": "<string>",
"formatted_address": "<string>",
"address_components": [
{
"types": [
"<string>"
],
"long_name": "<string>",
"short_name": "<string>"
}
],
"plus_code": {
"global_code": "<string>",
"compound_code": "<string>"
},
"partial_match": true,
"postcode_localities": [
"<string>"
]
}
],
"plus_code": {
"global_code": "<string>",
"compound_code": "<string>"
},
"error_message": "<string>"
}请求规范
- 方法与路径: POST /apis/v1/google-maps/geocoding-api
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/google-maps/geocoding-api - Runtime 事实版本: 3b5a2acec503471a11eb19f2556b4dd51989d71bc63d22f67f55218e55b002ef
{
"operationId": "google-maps.geocoding-api",
"method": "POST",
"path": "/apis/v1/google-maps/geocoding-api",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"required": false,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"key": {
"type": "string",
"examples": [
"YOUR_API_KEY"
],
"description": "Your application's API key. If not provided, will be extracted from connection metadata."
},
"bounds": {
"type": "string",
"examples": [
"34.172684,-118.604794|34.236144,-118.500938"
],
"description": "The bounding box of the viewport within which to bias geocode results more prominently (e.g., '34.172684,-118.604794|34.236144,-118.500938'). This parameter will only influence, not fully restrict, results."
},
"latlng": {
"type": "string",
"examples": [
"40.714224,-73.961452"
],
"description": "The latitude and longitude coordinates specifying the location for which you want the closest, human-readable address (e.g., '40.714224,-73.961452'). Provide for reverse geocoding."
},
"region": {
"type": "string",
"examples": [
"US",
"ES"
],
"description": "The region code, specified as a ccTLD ('top-level domain') two-character value. This parameter will only influence, not fully restrict, results from the geocoder."
},
"address": {
"type": "string",
"examples": [
"1600 Amphitheatre Parkway, Mountain View, CA"
],
"description": "The street address or plus code that you want to geocode. Provide for geocoding (address to coordinates)."
},
"language": {
"type": "string",
"examples": [
"en",
"es"
],
"description": "The language in which to return results. If language is not supplied, the geocoder attempts to use the preferred language as specified in the Accept-Language header, or the native language of the domain from which the request is sent."
},
"place_id": {
"type": "string",
"examples": [
"ChIJd8BlQ2BZwokRAFUEcm_qrcA"
],
"description": "The place ID of the place for which you wish to obtain the human-readable address. Provide for place ID geocoding."
},
"components": {
"type": "string",
"examples": [
"postal_code:94043|country:US"
],
"description": "A components filter with elements separated by a pipe (|). E.g., 'postal_code:94043|country:US'. Used for geocoding, can be restrictive or biasing. Supplying only `components` without `address` may return ZERO_RESULTS for some queries."
},
"result_type": {
"type": "string",
"examples": [
"street_address|locality"
],
"description": "A filter of one or more address types, separated by a pipe (|) (e.g., 'street_address|locality'). Used for reverse geocoding and place ID geocoding."
},
"location_type": {
"type": "string",
"examples": [
"ROOFTOP|RANGE_INTERPOLATED"
],
"description": "A filter of one or more location types, separated by a pipe (|) (e.g., 'ROOFTOP|RANGE_INTERPOLATED'). Used for reverse geocoding and place ID geocoding."
},
"extra_computations": {
"type": "array",
"items": {
"enum": [
"ADDRESS_DESCRIPTORS",
"BUILDING_AND_ENTRANCES"
],
"type": "string"
},
"examples": [
[
"ADDRESS_DESCRIPTORS"
]
],
"description": "Use this parameter to specify additional features in the response. Can select multiple values."
}
}
}
}
}
},
"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.0053,
"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"
}
}
}
}
费用与请求规则
按用量计费;默认请求预估费用:$0.0053 USD(不是固定价格)。 声明的单位费率:每 provider_credit $0.000001 USD。 最终费用以账户适用价格及实际结算为准。 公开参考值不是你的账户报价或最终扣费。对于支持 X-AISA-Cost-Mode: quote 的接口,执行前请针对完整请求获取免费报价;执行后通过响应费用元数据和 Usage Logs 核对结算费用。1 USD 等于 1,000,000 个整数 micro-USD。- 默认请求参考估价(USD): 0.0053
- 声明的单位费率(USD): 1e-06
- 计费单位: provider_credit
- 计费依据: response_units
- 公开参考倍率: 1.0
- 声明的最大计数或单位数: 10000000
- 结算证据来源: response_body
授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
Your application's API key. If not provided, will be extracted from connection metadata.
"YOUR_API_KEY"
The bounding box of the viewport within which to bias geocode results more prominently (e.g., '34.172684,-118.604794|34.236144,-118.500938'). This parameter will only influence, not fully restrict, results.
"34.172684,-118.604794|34.236144,-118.500938"
The latitude and longitude coordinates specifying the location for which you want the closest, human-readable address (e.g., '40.714224,-73.961452'). Provide for reverse geocoding.
"40.714224,-73.961452"
The region code, specified as a ccTLD ('top-level domain') two-character value. This parameter will only influence, not fully restrict, results from the geocoder.
"US"
"ES"
The street address or plus code that you want to geocode. Provide for geocoding (address to coordinates).
"1600 Amphitheatre Parkway, Mountain View, CA"
The language in which to return results. If language is not supplied, the geocoder attempts to use the preferred language as specified in the Accept-Language header, or the native language of the domain from which the request is sent.
"en"
"es"
The place ID of the place for which you wish to obtain the human-readable address. Provide for place ID geocoding.
"ChIJd8BlQ2BZwokRAFUEcm_qrcA"
A components filter with elements separated by a pipe (|). E.g., 'postal_code:94043|country:US'. Used for geocoding, can be restrictive or biasing. Supplying only components without address may return ZERO_RESULTS for some queries.
"postal_code:94043|country:US"
A filter of one or more address types, separated by a pipe (|) (e.g., 'street_address|locality'). Used for reverse geocoding and place ID geocoding.
"street_address|locality"
A filter of one or more location types, separated by a pipe (|) (e.g., 'ROOFTOP|RANGE_INTERPOLATED'). Used for reverse geocoding and place ID geocoding.
"ROOFTOP|RANGE_INTERPOLATED"
Use this parameter to specify additional features in the response. Can select multiple values.
ADDRESS_DESCRIPTORS, BUILDING_AND_ENTRANCES ["ADDRESS_DESCRIPTORS"]