---
title: "Availability"
method: GET
path: "/keys/{key}"
tags: ["Keys"]
---

# Availability

`GET /keys/{key}`

## Request

- Base URL: `https://api.addresszen.com/v1`
- URL: `https://api.addresszen.com/v1/keys/{key}`
- Auth: none declared

Returns public information on an API Key: whether it can be used right now (`available`), the search contexts the key is licensed for (`contexts`) and the context that best matches the caller's IP address (`context`).

The endpoint accepts API Keys (beginning `ak_`) and sub-licensed keys (beginning `sl_`), and needs no Management Key.

A key that exists but cannot be used, because it has no lookups left or has breached a limit, returns `200` with `"available": false`. An unknown or malformed key returns an error.

Supply a valid Management Key and the endpoint returns the key's private details instead, as `GET /keys/{key}/details` does. A Management Key that does not own the key is rejected.

## Path parameters

- `key` string, required

## Response `200`

Success

- ApiKeyResponse
  - `result` ApiKey, required
    - `contexts` object[], required: A list of available contexts for a key
      - `iso_3` string, required: 3 letter ISO code
      - `iso_2` string, required: 2 letter ISO code
      - `description` string, required: Country descriptor to show in Address Finder
      - `emoji` string, required: Emoji text icon
      - `rgeo` boolean, required: Indicates availability of reverse geolocation search
    - `context` union, required: Returns current context if it is in the list of available contexts for this key.
      - string: Limits search results within a geographical boundary or country.
      - '': Empty string if no context is provided or key check has failed
    - `available` boolean, required: Determines whether the key can be used by the requesting agent. Returns false if one of the following conditions is met: - Key has no lookups remaining - Daily limit has been reached on the key - Daily individual limit has been reached - Key is not being used via an authorised URL - (Sublicensed key only) Key has a valid licensee attached - (Sublicensed key only) Key is not being used via an authorised URL specified by licensee
  - `message` 'Success', required
  - `code` 2000, required

## Other responses

- `404`: Invalid Key
- `default`: Error

---

[API](https://skmtc.dev/addresszen/apis/api-reference.md) · [All operations](https://skmtc.dev/addresszen/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc.dev/addresszen/apis/api-reference/revisions/cac119db15c0?raw)
