Developer API Reference

Generate mock phone numbers programmatically with our simple GET API.

HTTP Endpoint

Send HTTP GET requests to the following URL:

GEThttps://phone-number.317713.xyz/api/generate

Query Parameters

ParameterTypeRequiredDescription
countrystringNoCountry code. Supports 'US', 'CN', 'CA', 'GB', 'AU', 'DE', 'FR', 'JP', 'KR', 'IN', 'SG'. Defaults to 'US'.
regionstringNoRegion/State/Operator name (e.g. 'California', 'Ontario', 'China Mobile'). Case-insensitive.
citystringNoCity name or specific prefix/area code (e.g. 'Los Angeles', '138'). Case-insensitive.
quantityintegerNoNumber of records to generate. Range: 1 - 1000. Default: 10.
customPrefixstringNoCustom specific prefix digits. Optional.

Integration Examples

Choose your language or tool to integrate the phone generator API:

curl -X GET "https://phone-number.317713.xyz/api/generate?country=US&quantity=5"

Response Format

Returns a JSON array of phone record objects. Each record contains localized fields, display format, and standardized E.164 strings.

[
  {
    "id": "c852d129-4112-4981-8ddb",
    "country": "US",
    "region": "California",
    "regionCode": "CA",
    "city": "Los Angeles",
    "areaCode": "213",
    "display": "+1 (213) 932-8419",
    "e164": "+12139328419"
  }
]