MENU
CallFire - Your Message Delivered
Call Us! (877) 897-3473
CLOSE
  • Products
  • Pricing
  • Developers
  • Help
  • Log In
  • Sign Up
Call Us! (877) 897-3473

SearchAvailableNumbers

CallFire has a new API!

We are proud to announce the launch of our API 2.0! Learn more about our streamlined, transactional and broadcast APIs. This version of the API documentation will remain available for reference only. There will be no new development, only bug fixes. We highly recommend upgrading to our newer and more sophisticated documentation.

CallFire-API-Documentation

  • ▶/BroadcastService
    • CreateBroadcast
    • QueryBroadcasts
    • GetBroadcast
    • UpdateBroadcast
    • GetBroadcastStats
    • ControlBroadcast
    • CreateContactBatch
    • QueryContactBatches
    • GetContactBatch
    • ControlContactBatch
    • CreateBroadcastSchedule
    • QueryBroadcastSchedule
    • GetBroadcastSchedule
    • DeleteBroadcastSchedule
  • ▶/SubscriptionService
    • CreateSubscription
    • QuerySubscriptions
    • GetSubscription
    • UpdateSubscription
    • DeleteSubscription
  • ▶/TextService
    • SendText
    • QueryTexts
    • GetText
    • CreateAutoReply
    • QueryAutoReplies
    • GetAutoReply
    • DeleteAutoReply
  • ▶/CallService
    • SendCall
    • QueryCalls
    • GetCall
    • CreateSound
    • QuerySoundMeta
    • GetSoundMeta
    • GetSoundData
    • GetRecordingData
    • SendVerificationCodeToCallerId
    • VerifyCallerId
    • GetCallerIds
  • ▶/CccService
    • GetCccCampaign
    • GetCccCampaignStats
    • CreateCccCampaign
    • QueryCccCampaigns
    • UpdateCccCampaign
    • DeleteCccCampaignTransferNumbers
    • DeleteCccCampaignQuestions
    • ControlCccCampaign
    • DeleteCccCampaign
    • GetAgent
    • QueryAgents
    • AddAgents
    • GetAgents
    • RemoveAgent
    • GetAgentGroup
    • QueryAgentGroups
    • CreateAgentGroup
    • UpdateAgentGroup
    • AddAgentGroups
    • GetAgentGroups
    • DeleteAgentGroup
    • RemoveAgentGroup
    • GetAgentSession
    • QueryAgentSessions
    • SendAgentInvites
    • GetAgentInviteUri
  • ▶/ContactService
    • QueryContacts
    • UpdateContacts
    • RemoveContacts
    • GetContact
    • GetContactHistory
    • CreateContactList
    • QueryContactLists
    • DeleteContactList
    • AddContactsToList
    • GetContactList
    • RemoveContactsFromList
    • QueryDncNumbers
    • UpdateDncNumber
    • QueryDncLists
    • CreateDncList
    • GetDncList
    • DeleteDncList
    • AddNumbersToDncList
    • RemoveNumbersFromDncList
  • ▶/NumberService
    • QueryRegions
    • QueryNumbers
    • GetNumber
    • ConfigureNumber
    • SearchAvailableNumbers
    • QueryKeywords
    • SearchAvailableKeywords
    • CreateNumberOrder
    • GetNumberOrder
    • Release
  • ▶/LabelService
    • DeleteLabel
    • QueryLabels
    • LabelBroadcast
    • UnlabelBroadcast
    • LabelNumber
    • UnlabelNumber
  • API    >  
  • NumberService  >  
  • SearchAvailableNumbers

SearchAvailableNumbers

Search for new numbers that are available for purchase

Find numbers available for purchase using either TollFree = true or by region info, such as prefix, city, zipcode, etc... The max count of numbers to return must also be specified.

Request Parameters

Parameter Demo Value Description Data Type
SearchAvailableNumbers object
Region Region of number represented by city, state, prefix, etc... object
Prefix 4-7 digit prefix string
City Name of a city string
State State abbreviation string
Zipcode 5 digit zipcode string
Country 2 digit country code string
Latitude Latitude float
Longitude Longitude float
TimeZone string
TollFree boolean
TollFreePattern Filter toll free numbers by prefix, pattern must be 3 char long and should end with '*'. Examples: 8**, 85*, 87* (but 855 will fail because pattern must end with '*'). string
Count Keywords request by query int

* indicates choice value, bolded parameters are required

Response Parameters

Parameter Description Data Type
NumberQueryResult List of Numbers returned from query
TotalResults Results count long
Number Info about Number like Region
Number 11 digit E.164 number PhoneNumber
NationalFormat Phone number formatted for local string
TollFree Is toll free number boolean
Region Region of number represented by city, state, prefix, etc...
Prefix 4-7 digit prefix string
City Name of a city string
State State abbreviation string
Zipcode 5 digit zipcode string
Country 2 digit country code string
Latitude Latitude float
Longitude Longitude float
TimeZone string
Status [PENDING, ACTIVE, RELEASED, UNAVAILABLE] NumberStatus
LeaseInfo Info about Lease
LeaseBegin Date lease began date
LeaseEnd Date lease ends date
AutoRenew Is lease set to renew each month boolean
NumberConfiguration Configure Call and Text features
CallFeature [UNSUPPORTED, PENDING, DISABLED, ENABLED] NumberFeature
TextFeature [UNSUPPORTED, PENDING, DISABLED, ENABLED] NumberFeature
InboundCallConfigurationType [TRACKING, IVR] InboundType
InboundCallConfiguration
CallTrackingConfig
id Unique ID of InboundConfig long
TransferNumber List[PhoneNumber]
Screen boolean
Record boolean
IntroSoundId long
WhisperSoundId long
IvrInboundConfig
id Unique ID of InboundConfig long
DialplanXml string

 

Example Code

	<?php
/**
 * You'll need your login/password pair when you create the SOAP client.
 * Don't use the fake login/password provided here; it's just for show and won't work.
 */
$wsdl = "http://callfire.com/api/1.1/wsdl/callfire-service-http-soap12.wsdl";
$client = new SoapClient($wsdl, array(
    'soap_version' => SOAP_1_2,
    'login'        => 'YourLoginId',    
    'password'     => 'YourPassword'));


/**
 * SearchAvailableNumbers
 */
$request = new stdclass();
$request->Count = 1; // required  
$request->Region = new stdclass();   
$request->Region->Prefix = '1201';     

$response = $client->SearchAvailableNumbers($request);
print_r($response);

// Sample $response:
// stdClass Object
// (
//     [TotalResults] => 1
//     [Number] => stdClass Object
//         (
//             [Number] => 12013834226
//             [NationalFormat] => (201) 383-4226
//             [TollFree] => 
//             [Region] => stdClass Object
//                 (
//                     [Prefix] => 1201383
//                     [City] => WESTWOOD
//                     [State] => NJ
//                     [Zipcode] => 07675
//                     [Country] => US
//                     [Latitude] => 40.9917
//                     [Longitude] => -74.0327
//                     [TimeZone] => America/New_York
//                 )
//         )
// )


// Or toll free
$request = new stdclass();
$request->Count = 1; // required
$request->TollFree = true;

$response = $client->SearchAvailableNumbers($request);
print_r($response);

// Sample $response:
// stdClass Object
// (
//     [TotalResults] => 1
// 	   [Number] => stdClass Object
// 	       (
// 		       [Number] => 18666177076
// 		       [NationalFormat] => (866) 617-7076
// 		       [TollFree] => 1
// 	       )
// )

?>

Company

  • Careers
  • Blog
  • Press

Products

  • Text Messaging
  • Call Tracking
  • Voice Broadcast
  • CallFire IVR
  • Developer API

Resources

  • Case Studies
  • Industries
  • Communications Glossary
  • Marketing Glossary
  • Area Codes
  • Labs

Help

  • FAQs
  • CallFire XML
  • Contact Us
  • Reviews
  • System Status

© Copyright 2021 CallFire Inc. All Rights Reserved

Privacy Policy / Terms / Service Policy / FTC/FCC/DNC Compliance / Sitemap

Contact Support
Contact Sales
Phone +1.877.897.3473
Fax +1.310.943.0415

Msg&data rates may apply in the US. Standard message and data rates apply in Canada. To unsubscribe from any CallFire ® list simply send 'STOP' to the originating short code or contact Support.