Phone Number Validation by IP Address API
Introduction
This API provides a similar validation check as the Phone Number Validation API by using the user’s IP address.
This API can be useful when you want to avoid asking for too many input parameters from a user during form submission.
Get Started
This API is part of the Phone number and Email verification and is available in free and paid plans. Please visit the Phone number and Email verification package page for limits and pricing information.
Endpoint
GET
https://api-bdc.net/data/phone-number-validate-by-ip
Request
Parameter
Type
Required
Description
Parameter
numberType
stringRequired
YesDescription
Phone number to validateParameter
ipType
stringRequired
Optional, default value: [Caller's IP]Description
IPv4 IP address in a string or numeric format or IPv6 IP address in a string format. If omitted, the caller’s IP address is assumedParameter
localityLanguageType
stringRequired
Optional, default value: enDescription
Preferred language for locality names in ISO 639-1 format, such as 'en' for English, 'es' for Spanish etc. If the requested language is not available for a requested location, it will default to English. If no English variant is known, will provide the native, local namesParameter
keyType
stringRequired
YesDescription
Your API keyResponses
200OK
200
OK
Sample Query
GET
https://api-bdc.net/data/phone-number-validate-by-ip?number=884633490&ip=193.114.112.1&localityLanguage=en&key=[YOUR API KEY]
Schema
application/json
isValidbooleanIndicates whether the number is valid
isValidboolean
Indicates whether the number is valid
e164FormatstringThe number formatted in E164 standard format
e164Formatstring
The number formatted in E164 standard format
internationalFormatstringThe number formatted in International dial format
internationalFormatstring
The number formatted in International dial format
nationalFormatstringThe number formatted in local dial format
nationalFormatstring
The number formatted in local dial format
locationstringEstimated location localised to the language as defined by 'localityLanguage' request parameter
locationstring
Estimated location localised to the language as defined by 'localityLanguage' request parameter
lineTypestringLine type detected. Possible values are: 'FIXED_LINE', 'MOBILE', 'FIXED_LINE_OR_MOBILE', 'TOLL_FREE', 'PREMIUM_RATE', 'SHARED_COST', 'VOIP', 'PERSONAL_NUMBER', 'PAGER', 'UAN', 'VOICEMAIL', 'UNKNOWN'
lineTypestring
Line type detected. Possible values are: 'FIXED_LINE', 'MOBILE', 'FIXED_LINE_OR_MOBILE', 'TOLL_FREE', 'PREMIUM_RATE', 'SHARED_COST', 'VOIP', 'PERSONAL_NUMBER', 'PAGER', 'UAN', 'VOICEMAIL', 'UNKNOWN'
countrycountry object
country
country object
isoAlpha2stringISO 3166-1 Alpha-2 code
isoAlpha2string
ISO 3166-1 Alpha-2 code
isoAlpha3stringISO 3166-1 Alpha-3 code
isoAlpha3string
ISO 3166-1 Alpha-3 code
m49CodeintegerUnited Nations M.49 code
m49Codeinteger
United Nations M.49 code
namestringCountry name localised to the language as defined by 'localityLanguage' request parameter
namestring
Country name localised to the language as defined by 'localityLanguage' request parameter
isoNamestringISO 3166-1 Country name short
isoNamestring
ISO 3166-1 Country name short
isoNameFullstringISO 3166-1 Country name full
isoNameFullstring
ISO 3166-1 Country name full
isoAdminLanguagesarrayAdministrative languages as defined by ISO 3166-1 standard
isoAdminLanguagesarray
Administrative languages as defined by ISO 3166-1 standard
isoAlpha3stringISO 3166-1 Alpha-3 code
isoAlpha3string
ISO 3166-1 Alpha-3 code
isoAlpha2stringISO 3166-1 Alpha-2 code
isoAlpha2string
ISO 3166-1 Alpha-2 code
isoNamestringISO 3166-1 Language name
isoNamestring
ISO 3166-1 Language name
nativeNamestringA native name
nativeNamestring
A native name
unRegionstringRegion name as defined by the United Nations
unRegionstring
Region name as defined by the United Nations
currencycurrency object
currency
currency object
numericCodeintegerISO 4217 standard numeric code
numericCodeinteger
ISO 4217 standard numeric code
codestringISO 4217 standard code
codestring
ISO 4217 standard code
namestringISO 4217 English name
namestring
ISO 4217 English name
minorUnitsintegerISO 4217 minor units as the currency exponent (e.g. 2 = 1/100)
minorUnitsinteger
ISO 4217 minor units as the currency exponent (e.g. 2 = 1/100)
wbRegionwbRegion object
wbRegion
wbRegion object
idstringworld bank identification number. the expected values are: 'LCN','NA','SAS','SSF','ECS','MEA','EAS','NAC'
idstring
world bank identification number. the expected values are: 'LCN','NA','SAS','SSF','ECS','MEA','EAS','NAC'
iso2Codestringiso 2 letters code. the expected values are: 'ZJ','NA','8S','ZG','Z7','ZQ','Z4','XU'
iso2Codestring
iso 2 letters code. the expected values are: 'ZJ','NA','8S','ZG','Z7','ZQ','Z4','XU'
valuestringregion name. the expected values are: 'Latin America & Caribbean','Aggregates','South Asia',
'Sub-Saharan Africa','Europe & Central Asia','Middle East & North Africa','East Asia & Pacific','North America'
valuestring
region name. the expected values are: 'Latin America & Caribbean','Aggregates','South Asia',
'Sub-Saharan Africa','Europe & Central Asia','Middle East & North Africa','East Asia & Pacific','North America'
wbIncomeLevelwbIncomeLevel object
wbIncomeLevel
wbIncomeLevel object
idstringworld bank identification number. the expected values are: 'HIC','NA','LIC','LMC','UMC','INX'
idstring
world bank identification number. the expected values are: 'HIC','NA','LIC','LMC','UMC','INX'
iso2Codestringiso 2 letters code. the expected values are: 'XD','NA','XM','XN','XT','XY'
iso2Codestring
iso 2 letters code. the expected values are: 'XD','NA','XM','XN','XT','XY'
valuestringincome level name. the expected values are: 'High income','Aggregates','Low income','Lower middle income','Upper middle income','Not classified'
valuestring
income level name. the expected values are: 'High income','Aggregates','Low income','Lower middle income','Upper middle income','Not classified'
callingCodestringCalling code
callingCodestring
Calling code
countryFlagEmojistringCountry emoji
countryFlagEmojistring
Country emoji
wikidataIdstringWikidata item identifier, if available
wikidataIdstring
Wikidata item identifier, if available
geonameIdintegerA unique identifier as is given by GeoNames.org
geonameIdinteger
A unique identifier as is given by GeoNames.org
isIndependentbooleanDetermines if the country/territory is independent according to ISO 3166 records
isIndependentboolean
Determines if the country/territory is independent according to ISO 3166 records
Sample Response
JSON View
403Access denied, or your quota limit has exceeded
403
Access denied, or your quota limit has exceeded
Sample Response
JSON View
404Found no valid entry for the request
404
Found no valid entry for the request
Sample Response
JSON View
405The requested IP address is not valid
405
The requested IP address is not valid
Sample Response
JSON View
500An error has occurred and did not complete your request. Please try again
500
An error has occurred and did not complete your request. Please try again
Sample Response
JSON View
Was this page helpful?