:doc:`ChimeSDKVoice <../../chime-sdk-voice>` / Client / search_available_phone_numbers

******************************
search_available_phone_numbers
******************************



.. py:method:: ChimeSDKVoice.Client.search_available_phone_numbers(**kwargs)

  

  Searches the provisioned phone numbers in an organization.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-voice-2022-08-03/SearchAvailablePhoneNumbers>`_  


  **Request Syntax**
  ::

    response = client.search_available_phone_numbers(
        AreaCode='string',
        City='string',
        Country='string',
        State='string',
        TollFreePrefix='string',
        PhoneNumberType='Local'|'TollFree',
        MaxResults=123,
        NextToken='string'
    )
    
  :type AreaCode: string
  :param AreaCode: 

    Confines a search to just the phone numbers associated with the specified area code.

    

  
  :type City: string
  :param City: 

    Confines a search to just the phone numbers associated with the specified city.

    

  
  :type Country: string
  :param Country: 

    Confines a search to just the phone numbers associated with the specified country.

    

  
  :type State: string
  :param State: 

    Confines a search to just the phone numbers associated with the specified state.

    

  
  :type TollFreePrefix: string
  :param TollFreePrefix: 

    Confines a search to just the phone numbers associated with the specified toll-free prefix.

    

  
  :type PhoneNumberType: string
  :param PhoneNumberType: 

    Confines a search to just the phone numbers associated with the specified phone number type, either **local** or **toll-free**.

    

  
  :type MaxResults: integer
  :param MaxResults: 

    The maximum number of results to return.

    

  
  :type NextToken: string
  :param NextToken: 

    The token used to return the next page of results.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'E164PhoneNumbers': [
              'string',
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **E164PhoneNumbers** *(list) --* 

        Confines a search to just the phone numbers in the E.164 format.

        
        

        - *(string) --* 
    
      

      - **NextToken** *(string) --* 

        The token used to return the next page of results.

        
  
  **Exceptions**
  
  *   :py:class:`ChimeSDKVoice.Client.exceptions.BadRequestException`

  
  *   :py:class:`ChimeSDKVoice.Client.exceptions.ForbiddenException`

  
  *   :py:class:`ChimeSDKVoice.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`ChimeSDKVoice.Client.exceptions.UnauthorizedClientException`

  
  *   :py:class:`ChimeSDKVoice.Client.exceptions.ThrottledClientException`

  
  *   :py:class:`ChimeSDKVoice.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`ChimeSDKVoice.Client.exceptions.ServiceFailureException`

  