Skip to content

Search available numbers

GET
/api/v2/numbers/search
curl --request GET \
--url 'https://api.sipstack.com/api/v2/numbers/search?type=tollfree&areaCode=416' \
--header 'x-api-key: <x-api-key>'

Searches carrier inventory for numbers you can buy. Search local numbers by areaCode (optionally contains / smsEnabled), or toll-free with type=tollfree (optionally tollFreePrefix / a vanity pattern). Read-only — no order is placed. The upstream carrier is never revealed. Requires numbers:read.

type
string
Allowed values: tollfree

tollfree for toll-free search; omit for local.

areaCode
string
Example
416

Local search — the NPA to search within.

contains
string

Local — digits/letters the number must contain (vanity).

endsIn
boolean

Match contains at the end of the number.

smsEnabled
boolean

Only return SMS-capable numbers.

tollFreePrefix
string

Toll-free — restrict to a prefix (e.g. 800, 888).

vanity
string

Toll-free — a vanity pattern (e.g. 1-800-FLOWERS).

limit
integer

Matching available numbers.

Media type application/json
object
success
boolean
data
Array<object>

An available number from carrier inventory (search result). The upstream carrier/provider is never included. Field set varies by number type.

object
number
string
rateCenter
string
nullable
city
string
nullable
state
string
nullable
smsEnabled
boolean
nullable
key
additional properties
any
Example
{
"data": [
{
"number": "+14165550100"
}
]
}

Invalid search parameters.

Media type application/json

Inline error shape used by the messaging API and management endpoints.

object
success
boolean
error
string
Example
{
"success": false,
"error": "Recipient phone number (to) is required"
}

Missing or invalid API key.

Media type application/json

Inline error shape used by the messaging API and management endpoints.

object
success
boolean
error
string
Example
{
"success": false,
"error": "Recipient phone number (to) is required"
}

The key is missing the numbers:read scope, or the account API tier is not on your plan.

Media type application/json

Inline error shape used by the messaging API and management endpoints.

object
success
boolean
error
string
Example
{
"success": false,
"error": "Recipient phone number (to) is required"
}