Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent
with a free APIs.io key —
sign in with
GitHub,
Google or
LinkedIn.
No form to fill in; signing in shares your email address with us (Privacy).
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: HLR Lookup API v2 Account API
version: 2.0.0
summary: Real-time HLR, MNP, number validation and balance enquiry endpoints.
description: 'Machine-readable description of the HLR Lookup API v2.
All endpoints are `POST` with a JSON body. Every request must include an `api_key` and `api_secret` pair.
Lookup endpoints (`/apiv2/hlr`, `/apiv2/mnp`, `/apiv2/validate`) accept either:
- a **flat** body describing a single number (e.g. `{ "api_key": "…", "api_secret": "…", "telephone_number": "447790606023" }`), or
- a **nested** body with up to 80 items in a `requests` array.
The flat form is internally rewritten to a single-item nested request, so the response shape is always `{ "results": [ … ] }`.
See https://www.hlrlookup.com/knowledge for prose documentation.'
contact:
name: HLR Lookup support
url: https://www.hlrlookup.com/contact
license:
name: Proprietary
url: https://www.hlrlookup.com/terms
servers:
- url: https://api.hlrlookup.com
description: Production
security: []
tags:
- name: Account
description: Account-level queries that do not consume credits.
paths:
/apiv2/balance:
post:
tags:
- Account
summary: Account credit balance
description: Returns the account's remaining credit balance. Accepts credentials only (`api_key` + `api_secret`).
operationId: balance
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/BalanceRequest'
examples:
apiKey:
summary: API key credentials
value:
api_key: YOUR_API_KEY
api_secret: YOUR_API_SECRET
responses:
'200':
description: Current balance.
content:
application/json:
schema:
$ref: '#/components/schemas/BalanceResponse'
examples:
ok:
summary: Balance OK
value:
Status: OK
Credits: 1234.5
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'429':
$ref: '#/components/responses/TooManyRequests'
components:
schemas:
BalanceResponse:
title: BalanceResponse
type: object
required:
- Status
- Credits
properties:
Status:
type: string
const: OK
Credits:
type: number
description: Remaining credit balance.
BalanceRequest:
title: BalanceRequest
type: object
description: Credentials-only body. Both `api_key` and `api_secret` are required.
required:
- api_key
- api_secret
additionalProperties: false
properties:
api_key:
type: string
api_secret:
type: string
EndpointError:
title: EndpointError
type: object
required:
- error
- message
properties:
error:
type: string
enum:
- UNAUTHORIZED
- BAD_REQUEST
message:
type: string
responses:
TooManyRequests:
description: 'The API is busy and the request was rejected at the handler level. Clients should back off and retry. Note: this is distinct from a per-result `TOO_MANY_REQUESTS` entry inside a successful `200` response, which indicates that one item in a batch was throttled while the rest succeeded.'
content:
text/plain:
schema:
type: string
example: Too many requests
Unauthorized:
description: Invalid or missing credentials.
content:
application/json:
schema:
$ref: '#/components/schemas/EndpointError'
example:
error: UNAUTHORIZED
message: Invalid api_key or api_secret
BadRequest:
description: Request body failed validation.
content:
application/json:
schema:
$ref: '#/components/schemas/EndpointError'
example:
error: BAD_REQUEST
message: Invalid parameters