Skip to content
gist.link ↗

searchAvailableNumbers

Query Phone API — POST https://phone.api.gist.link/graphql

Search the carrier for purchasable numbers.

phone:query:searchAvailableNumbers

The calling IAM key must hold this permission (or a wildcard that covers it: phone:query:* or phone:*) and the access token must have been minted with audience=phone. See Permissions.

type Query {
searchAvailableNumbers(country: String, contains: String, type: NumberType, limit: Int): [AvailableNumber!]!
}
Argument Type Required Description
country String No —
contains String No —
type NumberType No —
limit Int No —

[AvailableNumber!]! — see the Phone types reference.

Terminal window
curl https://phone.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "query SearchAvailableNumbers($country: String, $contains: String, $type: NumberType, $limit: Int) { searchAvailableNumbers(country: $country, contains: $contains, type: $type, limit: $limit) { e164 friendlyName locality region country capabilities monthlyRentalMinor currency } }",
"variables": {
"country": "example",
"contains": "example",
"type": "LOCAL",
"limit": 10
}
}
JSON