TSGGLOBAL Support sign in
Skip to page content
Browse TSG Global API docs

TSG Global API documentation Phone Numbers Search For New Available Numbers

Search For New Available Numbers

On this page

GraphQL numbers query: find local numbers by state and rate center or by NPANXX prefix, up to 100 at a time.

Overview

Use this API to find a new local numbers that you can instantly use for messaging and voice. We allow users to search for numbers based on a contains field (NPANXX), or based on state + ratecenter. We allow you to search for consecutive numbers, and let you specify a quantity of numbers (up to 100 at a time).

These local numbers are instantly available for voice and SMS, or MMS (if you manually enable MMS on these numbers).

Note: this is for long-code numbers only, for toll-free numbers check this section:

Toll-free phone numbers - search & ordering.

Authentication

This function is available via our new GraphQL API. You can read more about how to authenticate to this API here.

Example Query Using State and Rate Center

query {
  numbers(state: "MA", rateCenter:"BOSTON", quantity: 5, consecutive:false) {
    numbers {
      city
      telephoneNumber
      province
      e911Allowed
      mmsAllowed
    }
  }
}

Example Response

{
  "data": {
    "numbers": {
      "numbers": [
        {
          "city": "Chelsea",
          "e911Allowed": "Y",
          "mmsAllowed": "Y",
          "province": "MA",
          "telephoneNumber": "8572391650"
        },
        {
          "city": "Chelsea",
          "e911Allowed": "Y",
          "mmsAllowed": "Y",
          "province": "MA",
          "telephoneNumber": "8572391651"
        },
        {
          "city": "Chelsea",
          "e911Allowed": "Y",
          "mmsAllowed": "Y",
          "province": "MA",
          "telephoneNumber": "8572391653"
        },
        {
          "city": "Chelsea",
          "e911Allowed": "Y",
          "mmsAllowed": "Y",
          "province": "MA",
          "telephoneNumber": "8572391654"
        },
        {
          "city": "Chelsea",
          "e911Allowed": "Y",
          "mmsAllowed": "Y",
          "province": "MA",
          "telephoneNumber": "8572391655"
        }
      ]
    }
  }
}

Example Query Using Contains

query {
  numbers(contains: "425", quantity: 5, consecutive:false) {
		numbers {
      city
      telephoneNumber
      province
      e911Allowed
      mmsAllowed
    }
  }
}

Example Response

{
  "data": {
    "numbers": {
      "numbers": [
        {
          "city": "Everett",
          "e911Allowed": "Y",
          "mmsAllowed": "Y",
          "province": "WA",
          "telephoneNumber": "4253864153"
        },
        {
          "city": "Everett",
          "e911Allowed": "Y",
          "mmsAllowed": "Y",
          "province": "WA",
          "telephoneNumber": "4253864154"
        },
        {
          "city": "Everett",
          "e911Allowed": "Y",
          "mmsAllowed": "Y",
          "province": "WA",
          "telephoneNumber": "4253864157"
        },
        {
          "city": "Everett",
          "e911Allowed": "Y",
          "mmsAllowed": "Y",
          "province": "WA",
          "telephoneNumber": "4253864159"
        },
        {
          "city": "Everett",
          "e911Allowed": "Y",
          "mmsAllowed": "Y",
          "province": "WA",
          "telephoneNumber": "4253864163"
        }
      ]
    }
  }
}