weather

Find places by name for weather lookups. Returns a normalized GeoLocation page.

Resolves a city / district name to the provider's location id and coordinates, which weather.forecast accepts (location_id, or lat / lon). Optional country narrows the match.

Fixed price: 0.1 credits per successful call, whichever provider serves it.

post/v2/ops/weather.location.search

Request

  • Base URL
    https://api.agentkey.app
  • URL
    https://api.agentkey.app/v2/ops/weather.location.search
  • Auth
    HTTP bearer

Request body

countrystring

ISO 3166-1 alpha-2 country code to narrow the match, e.g. CN, GB.

fieldsstring[]

Projection: keep only these dotted paths of data, e.g. ["items.id", "items.text"].

include_rawboolean

Attach the raw upstream payload as raw (not a stable contract; truncated above 256 KB).

langstring

Language of the returned names (BCP 47), e.g. en, zh.

limitinteger

Maximum number of places to return.

providerstring

Shorthand for routing.only = [provider].

querystring required

Place name, e.g. 北京, London, Shanghai Pudong.

Response

Success envelope

credits_chargednumber required

Credits charged for this call (the method's fixed price).

opstring required

Method name.

op_versioninteger required

Method version that served the call.

providerstring required

Provider that actually served the call.

rawunknown
raw_truncatedboolean
request_idstring required

Correlation id; quote it in support requests.

took_msinteger required
unsupported_fieldsstring[] required

Output paths this provider structurally does not supply; such fields are null for a different reason than 'missing on this record'.

Changes

No recorded changes to this operation across all 1 revision of this API.