Reference example
# Fixed reference example. Playground inputs do not update this sample.
curl --request GET \
--url 'https://api.aisa.one/apis/v1/openmeteo/geocoding?name=Berlin' \
--header 'Authorization: Bearer <token>'curl --request GET \
--url https://api.aisa.one/apis/v1/openmeteo/geocoding \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/openmeteo/geocoding"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/openmeteo/geocoding', 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/openmeteo/geocoding",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/openmeteo/geocoding"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/openmeteo/geocoding")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/openmeteo/geocoding")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"generationtime_ms": 0.5,
"results": [
{
"admin1": "Land Berlin",
"country": "Germany",
"country_code": "DE",
"country_id": 2921044,
"elevation": 74,
"feature_code": "PPLC",
"id": 2950159,
"latitude": 52.52437,
"longitude": 13.41053,
"name": "Berlin",
"population": 3426354,
"postcodes": [
"10967",
"13347"
],
"timezone": "Europe/Berlin"
}
]
}Open-Meteo
Open-Meteo Geocoding
Search place names or postal codes and resolve them to coordinates, administrative regions, country, timezone and population. GET pass-through to https://geocoding-api.open-meteo.com/v1/search.
Open-Meteo Geocoding (Open-Meteo).
GET
https://api.aisa.one
/
apis
/
v1
/
openmeteo
/
geocoding
Reference example
# Fixed reference example. Playground inputs do not update this sample.
curl --request GET \
--url 'https://api.aisa.one/apis/v1/openmeteo/geocoding?name=Berlin' \
--header 'Authorization: Bearer <token>'curl --request GET \
--url https://api.aisa.one/apis/v1/openmeteo/geocoding \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/openmeteo/geocoding"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/openmeteo/geocoding', 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/openmeteo/geocoding",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/apis/v1/openmeteo/geocoding"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.aisa.one/apis/v1/openmeteo/geocoding")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/openmeteo/geocoding")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"generationtime_ms": 0.5,
"results": [
{
"admin1": "Land Berlin",
"country": "Germany",
"country_code": "DE",
"country_id": 2921044,
"elevation": 74,
"feature_code": "PPLC",
"id": 2950159,
"latitude": 52.52437,
"longitude": 13.41053,
"name": "Berlin",
"population": 3426354,
"postcodes": [
"10967",
"13347"
],
"timezone": "Europe/Berlin"
}
]
}请求规范
- 方法与路径: GET /apis/v1/openmeteo/geocoding
- 可用状态: enabled
- 请求 URL 模板:
https://api.aisa.one/apis/v1/openmeteo/geocoding - count: query; 可选
- countryCode: query; 可选
- format: query; 可选
- language: query; 可选
- name: query; 必填
{
"operationId": "get_openmeteo_geocoding",
"method": "GET",
"path": "/apis/v1/openmeteo/geocoding",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"description": "Maximum number of results (1-100). Default 10.",
"in": "query",
"name": "count",
"required": false,
"schema": {
"default": 10,
"example": 5,
"type": "integer"
}
},
{
"description": "ISO-3166-1 alpha-2 country code to filter results.",
"in": "query",
"name": "countryCode",
"required": false,
"schema": {
"example": "DE",
"type": "string"
}
},
{
"description": "Response format. Default `json`.",
"in": "query",
"name": "format",
"required": false,
"schema": {
"default": "json",
"enum": [
"json",
"protobuf"
],
"type": "string"
}
},
{
"description": "Two-letter language code for translated names. Default `en`.",
"in": "query",
"name": "language",
"required": false,
"schema": {
"default": "en",
"example": "en",
"type": "string"
}
},
{
"description": "Location name or postal code. Append `, <country>` or `, <admin1>` to narrow results.",
"in": "query",
"name": "name",
"required": true,
"schema": {
"example": "Berlin",
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
费用与请求规则
公开参考价格:每次成功请求 $0.0001 USD。 账户适用价格可能不同;支持报价的接口可按实际请求获取报价。授权
查询参数
响应
Matching locations.
The response is of type object.