---
title: "Validate and format a phone number using query parameters"
method: GET
path: "/api/phone"
tags: ["Phone"]
---

# Validate and format a phone number using query parameters

`GET /api/phone`

## Request

- Base URL: `https://api.genderapi.io`
- URL: `https://api.genderapi.io/api/phone`
- Auth: API key in query parameter `key`

POST with Bearer authentication is preferred for secret handling.

## Query parameters

- `number` string, required
- `address` string

## Response `200`

Application response. Inspect status before reading result fields; live verification observed validation and authentication errors inside HTTP 200 responses.

- union
  - PhoneResponse
    - `status` true, required
    - `remaining_credits` integer
    - `expires` integer
    - `duration` string
    - `regionCode` string: ISO 3166-1 alpha-2 country code used as regional context.
    - `countryCode` integer
    - `country` string
    - `national` string
    - `international` string
    - `e164` string
    - `isValid` boolean
    - `isPossible` boolean
    - `numberType` 'FIXED_LINE' | 'MOBILE' | 'FIXED_LINE_OR_MOBILE' | 'TOLL_FREE' | 'PREMIUM_RATE' | 'SHARED_COST' | 'VOIP' | 'PERSONAL_NUMBER' | 'PAGER' | 'UAN' | 'VOICEMAIL' | 'UNKNOWN'
    - `nationalSignificantNumber` string
    - `rawInput` string
    - `isGeographical` boolean
    - `areaCode` string
    - `location` string
  - Error
    - `status` false, required
    - `errno` 50 | 90 | 91 | 92 | 93 | 94 | 99, required
    - `errmsg` string, required

## Other responses

- `400`: Request rejected. Branch on errno rather than errmsg text.
- `401`: Request rejected. Branch on errno rather than errmsg text.
- `403`: Request rejected. Branch on errno rather than errmsg text.
- `429`: Request rejected. Branch on errno rather than errmsg text.

---

[API](https://skmtc.dev/genderapi/apis/genderapi-public-api.md) · [All operations](https://skmtc.dev/genderapi/apis/genderapi-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/genderapi/apis/genderapi-public-api/revisions/800e7a9d2a0e?raw)
