> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# search_toll_free

> Search for available toll-free numbers in a country.

Search for available toll-free phone numbers in a specific country.

### Schema

```yaml
openapi: 3.1.0
info:
  title: API
  version: 1.0.0
paths:
  /Accounts/{AccountSid}/AvailablePhoneNumbers/{IsoCountry}/TollFree:
    get:
      operationId: search_toll_free_available_phone_numbers
      summary: Find toll-free numbers
      description: >-
        Search for toll-free AvailablePhoneNumbers.


        #### Permissions


        The API token used to authenticate must have the following scope(s)
        enabled to make a successful request: _Numbers_.


        [Learn more about API scopes](/docs/platform/your-signalwire-api-space).
      tags:
        - subpackage_availablePhoneNumbers
      parameters:
        - name: AccountSid
          in: path
          description: The Project ID that uniquely identifies the Account to retrieve.
          required: true
          schema:
            $ref: '#/components/schemas/uuid'
        - name: IsoCountry
          in: path
          description: The ISO country code of the number.
          required: true
          schema:
            type: string
        - name: AreaCode
          in: query
          description: >-
            Find numbers in the provided area code. Only available for numbers
            in US and Canada.
          required: false
          schema:
            type: string
        - name: Beta
          in: query
          description: New numbers on SignalWire are marked as `beta`.
          required: false
          schema:
            type: boolean
        - name: Contains
          in: query
          description: >-
            Find numbers based off of a pattern. Valid characters are
            `[0-9a-zA-Z]`.
          required: false
          schema:
            type: string
        - name: ExcludeAllAddressRequired
          in: query
          description: Accepted for Twilio compatibility but has no effect on the response.
          required: false
          schema:
            type: boolean
        - name: ExcludeForeignAddressRequired
          in: query
          description: Accepted for Twilio compatibility but has no effect on the response.
          required: false
          schema:
            type: boolean
        - name: ExcludeLocalAddressRequired
          in: query
          description: Accepted for Twilio compatibility but has no effect on the response.
          required: false
          schema:
            type: boolean
        - name: FaxEnabled
          in: query
          description: Not supported. Accepted for Twilio API compatibility.
          required: false
          schema:
            type: boolean
        - name: InLocality
          in: query
          description: Limits search to a city/locality. Requires InRegion to also be set.
          required: false
          schema:
            type: string
        - name: InRegion
          in: query
          description: >-
            Limits search to same region as number. Must be a two-letter
            state/province code.
          required: false
          schema:
            type: string
        - name: MmsEnabled
          in: query
          description: Not supported. Accepted for Twilio API compatibility.
          required: false
          schema:
            type: boolean
        - name: SmsEnabled
          in: query
          description: Not supported. Accepted for Twilio API compatibility.
          required: false
          schema:
            type: boolean
        - name: VoiceEnabled
          in: query
          description: Not supported. Accepted for Twilio API compatibility.
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AvailablePhoneNumberListResponse'
        '400':
          description: >-
            The request was invalid or cannot be processed. Check the error
            details for more information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompatibilityErrorResponse'
        '401':
          description: Authentication failed. Please verify your credentials and try again.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompatibilityErrorResponse'
        '422':
          description: >-
            The request could not be processed due to validation errors. Check
            the error details for more information.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompatibilityErrorResponse'
servers:
  - url: https://YOUR_SPACE.signalwire.com/api/laml/2010-04-01
    description: SignalWire Compatibility API
components:
  schemas:
    uuid:
      type: string
      format: uuid
      description: Universal Unique Identifier.
      title: uuid
    PhoneNumberCapabilities:
      type: object
      properties:
        voice:
          type: boolean
          description: Whether or not voice is enabled on the number.
        SMS:
          type: boolean
          description: Whether or not SMS is enabled on the number.
        MMS:
          type: boolean
          description: Whether or not MMS is enabled on the number.
      required:
        - voice
        - SMS
        - MMS
      description: Phone number capabilities.
      title: PhoneNumberCapabilities
    AvailablePhoneNumber:
      type: object
      properties:
        friendly_name:
          type: string
          description: A formatted version of the number.
        phone_number:
          type: string
          description: The number in E.164 format.
        lata:
          type:
            - string
            - 'null'
          description: The LATA of the number. Always null.
        locality:
          type:
            - string
            - 'null'
          description: The locality/city of the number. Always null.
        rate_center:
          type:
            - string
            - 'null'
          description: >-
            The rate center of the number. Only available for numbers in US and
            Canada.
        latitude:
          type:
            - string
            - 'null'
          description: The latitude of the number. Always null.
        longitude:
          type:
            - string
            - 'null'
          description: The longitude of the number. Always null.
        region:
          type:
            - string
            - 'null'
          description: >-
            The state or province abbreviation of the number. Only available for
            numbers in US and Canada.
        postal_code:
          type:
            - string
            - 'null'
          description: The postal/zip code of the number. Always null.
        iso_country:
          type: string
          description: The ISO country code of the number.
        capabilities:
          $ref: '#/components/schemas/PhoneNumberCapabilities'
          description: Whether or not a number can receive calls and messages.
        beta:
          type: boolean
          description: Always `false`. Included for Twilio API compatibility.
      required:
        - friendly_name
        - phone_number
        - lata
        - locality
        - rate_center
        - latitude
        - longitude
        - region
        - postal_code
        - iso_country
        - capabilities
        - beta
      description: Available phone number model.
      title: AvailablePhoneNumber
    AvailablePhoneNumberListResponse:
      type: object
      properties:
        uri:
          type: string
          description: The URI for the API call.
        available_phone_numbers:
          type: array
          items:
            $ref: '#/components/schemas/AvailablePhoneNumber'
          description: List of available phone numbers.
      required:
        - uri
        - available_phone_numbers
      description: Response containing a list of available phone numbers.
      title: AvailablePhoneNumberListResponse
    CompatibilityErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: Error code.
        message:
          type: string
          description: Error message.
        more_info:
          type: string
          description: URL for more information about the error.
        status:
          type: integer
          description: HTTP status code.
      required:
        - code
        - message
        - more_info
        - status
      description: Error response model.
      title: CompatibilityErrorResponse

```

## **Response Example**

### Response (200)

```json
{
  "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/AvailablePhoneNumbers/US/Local",
  "available_phone_numbers": [
    {
      "friendly_name": "(253) 218-6751",
      "phone_number": "+12532186751",
      "lata": null,
      "locality": null,
      "rate_center": "AUBURN",
      "latitude": null,
      "longitude": null,
      "region": "WA",
      "postal_code": null,
      "iso_country": "US",
      "capabilities": {
        "voice": true,
        "SMS": true,
        "MMS": true
      },
      "beta": false
    }
  ]
}
```

## **Example**

```python {9}
from signalwire.rest import RestClient

client = RestClient(
    project="your-project-id",
    token="your-api-token",
    host="your-space.signalwire.com",
)

numbers = client.compat.phone_numbers.search_toll_free("US", Contains="800")
```