---
title: "Telephone number search"
method: GET
path: "/v2/partition/{partitionId}/telephonenumber/search"
tags: ["Telephone Number"]
---

# Telephone number search

`GET /v2/partition/{partitionId}/telephonenumber/search`

## Request

- Base URL: `https://api.alianza.com`
- URL: `https://api.alianza.com/v2/partition/{partitionId}/telephonenumber/search`
- Auth: API key in header `X-AUTH-TOKEN`
- TypeScript: <https://skmtc.dev/alianza/apis/alianza-public-api/docs/v2/partition/:partitionId/telephonenumber/search/get.ts> (a function with typed inputs; its response is checked against the schema)

Use to search for a telephone number. <span hidden>Refer to <a href="tnInventory.html#search-tn">Search Partition for Telephone Number</a> for more information.</span>

## Path parameters

- `partitionId` string, required

## Query parameters

- `carrierId` string
- `functiontype` 'ELS' | 'TollFree' | 'TemporaryNumber' | 'SPTN'
- `lat` number, double
- `long` number, double
- `maxResults` integer
- `q` string
- `type` 'POSTALCODE_OR_TN' | 'TN' | 'POSTALCODE' | 'LAT_LONG' | 'RATECENTER' | 'RATECENTER_CARRIER'

## Response `200`

Successful operation

- TelephoneNumberViewX[]
  - `partitionId` string
  - `phoneNumber` string
  - `rateCenter` string
  - `rateCenterReorderName` string
  - `state` string
  - `country` string
  - `prefix` string
  - `accountId` string
  - `carrierId` string: The <a href="#/~schema/InboundCarrierX">inboundCarrierX.id</a> that services the telephone number.
  - `cooldownExpireDate` string, date-time
  - `cooldownRecoveredDate` string, date-time
  - `functionType` 'ELS' | 'TollFree' | 'TemporaryNumber' | 'SPTN'
  - `claimTicketId` string
  - `matchesZip` boolean: When this object is returned as part of a <a href="#/~operation/Telephone%20Number/tnSearch">search</a> that uses a zip code, results for nearby zip codes are also returned. This field indicates if the returned data matches the queried zip code.
  - `distance` number, float: When this object is returned as part of a <a href="#/~operation/Telephone%20Number/tnSearch">search</a> that uses a zip code, results for nearby zip codes are also returned. This field represents the distance (in miles) from the specified zip code.
  - `byotn` boolean: Bring Your Own Telephone Number (byotn) is a feature that allows the service provider to manage the rate center footprint coverage for a number.
  - `activationDate` integer
  - `isInInventory` boolean
  - `operationalStatus` 'ACTIVE' | 'STAGED'
  - `id` string
  - `port` boolean
  - `tags` string[]: Optional tags for categorizing the telephone number (e.g., location, service type). Tags are stored as attributes in the Attribute Service. Format is lowercase with hyphens replacing spaces. Maximum 10 tags per number.

## Other responses

- `400`: Invalid search type supplied or invalid search term
- `401`: Unauthorized
- `404`: PartitionId not found
- `422`: Invalid search term supplied

---

[API](https://skmtc.dev/alianza/apis/alianza-public-api.md) - [All operations](https://skmtc.dev/alianza/apis/alianza-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/alianza/apis/alianza-public-api/revisions/7223246c352c?raw)
