跳转到主要内容
POST
GraphHopper Geocoding

请求规范

  • 方法与路径: POST /apis/v1/graphhopper/geocode-get
  • 可用状态: enabled
  • 请求 URL 模板: https://api.aisa.one/apis/v1/graphhopper/geocode-get
  • Runtime 事实版本: 6a72f8e2fa7fb1c29379e3b24b3a247c8428a3b6ed621b3f84f84e75cb0de2bc
完整 OpenAPI 定义 有效请求与价格声明(包括认证和引用的 schema):

费用与请求规则

按用量计费;默认请求预估费用:$0.00042 USD(不是固定价格)。 声明的单位费率:每 provider_credit $0.000001 USD。 最终费用以账户适用价格及实际结算为准。 公开参考值不是你的账户报价或最终扣费。对于支持 X-AISA-Cost-Mode: quote 的接口,执行前请针对完整请求获取免费报价;执行后通过响应费用元数据和 Usage Logs 核对结算费用。1 USD 等于 1,000,000 个整数 micro-USD。
  • 默认请求参考估价(USD): 0.00042
  • 声明的单位费率(USD): 1e-06
  • 计费单位: provider_credit
  • 计费依据: response_units
  • 公开参考倍率: 1.0
  • 声明的最大计数或单位数: 10000000
  • 结算证据来源: response_body

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
q
string
必填

Text to geocode (forward geocoding). Required when reverse=false; must be omitted if reverse=true.

示例:

"Berlin"

reverse
enum<boolean>
必填

Set to true for reverse geocoding. Default false.

可用选项:
false
provider
enum<string>
必填

Alternative geocoding provider.

可用选项:
default
key
string

Your GraphHopper API key. If not provided, it will be automatically injected from the connection.

示例:

"your_api_key"

bbox
string

Bounding box 'minLon,minLat,maxLon,maxLat'. Requires reverse=false. Only provider=default.

zoom
number

Map-like zoom level controlling focus radius. Only provider=default.

debug
boolean
默认值:false

Pretty-print the output. Default false.

limit
integer
默认值:5

Maximum number of results. Default 5.

必填范围: x >= 1
示例:

1

10

point
string

Coordinate 'lat,lon'. Required when reverse=true; for forward geocoding, acts as location bias.

示例:

"52.529407,13.397634"

bounds
string

Bounds 'minLon,minLat,maxLon,maxLat'. For nominatim or opencagedata.

locale
enum<string>
默认值:en

Locale of results. Default 'en'.

可用选项:
en,
de,
fr
示例:

"en"

radius
number

Search radius. Default: km for provider=default when reverse=true; meters for provider=gisgraphy.

osm_tag
string[]

OSM tags to filter/include or exclude, e.g., 'tourism:museum' or '!tourism:museum'. Only provider=default.

countrycode
string

ISO 3166-1 alpha-2 country filter. For nominatim, gisgraphy, or opencagedata.

autocomplete
boolean

Enable autocomplete (only for provider=gisgraphy and reverse=false).

location_bias_scale
number

Location bias scale between 0.0 and 1.0. Only provider=default.

必填范围: 0 <= x <= 1

响应

Tool result data

hits
object[]
必填
took
integer
locale
string