{"openapi":"3.1.0","info":{"title":"Phone Number Validation - Type, Carrier, Timezone","description":"Phone number validation for 240+ countries: valid or not, mobile or fixed line, E.164 format, country, original carrier and time zone.","version":"v1"},"servers":[{"url":"https://phone-number-validation-type-carrier-timezone.p.rapidapi.com","description":"RapidAPI"}],"paths":{"/v1/phone/validate":{"get":{"tags":["Validation"],"summary":"Validate a phone number","description":"Valid or not, line type (mobile, fixed line, toll-free, VoIP...), E.164,\ninternational and national formats, country, area, original carrier and\ntime zones. Offline (Google's libphonenumber): no SMS, no call. 1 credit.","operationId":"validatePhoneNumber","parameters":[{"name":"number","in":"query","required":true,"schema":{"type":"string","maxLength":64,"description":"Phone number in any format: +44 20 7946 0958, 0044..., or a national number with the country parameter.","examples":["+44 20 7946 0958"],"title":"Number"},"description":"Phone number in any format: +44 20 7946 0958, 0044..., or a national number with the country parameter."},{"name":"country","in":"query","required":false,"schema":{"type":"string","minLength":2,"maxLength":2,"description":"ISO country for a number written without +country code (e.g. FR for 06 12 34 56 78).","examples":["GB"],"title":"Country"},"description":"ISO country for a number written without +country code (e.g. FR for 06 12 34 56 78)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumber"},"examples":{"Validate Phone Number":{"summary":"Validate Phone Number (real response)","value":{"input":"+44 20 7946 0958","valid":true,"possible":true,"reason":"Valid fixed line number in United Kingdom.","e164":"+442079460958","international":"+44 20 7946 0958","national":"020 7946 0958","country_code":44,"region":"GB","country":"United Kingdom","location":"London","line_type":"fixed_line","timezones":["Europe/London"]}}}}}},"400":{"description":"Invalid input, or the target could not be processed (see `error.code`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing proxy secret (call through RapidAPI with your key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Invalid proxy secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Daily limit of your plan reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-rapidapi-endpoint":"Validate Phone Number"}},"/v1/phone/validate/bulk":{"post":{"tags":["Validation"],"summary":"Validate up to 100 phone numbers","description":"Same checks for up to 100 numbers, with a valid/invalid summary.\n1 credit per number.","operationId":"validatePhoneNumbersInBulk","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneBulkRequest"},"examples":{"Validate Phone Numbers in Bulk":{"summary":"Validate Phone Numbers in Bulk","value":{"numbers":["+44 20 7946 0958","06 12 34 56 78","+1 650-253-0000"],"country":"FR"}}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneBulkResponse"},"examples":{"Validate Phone Numbers in Bulk":{"summary":"Validate Phone Numbers in Bulk","value":{"results":[{"input":"+44 20 7946 0958","reason":"Valid fixed line number in United Kingdom.","e164":"+442079460958","international":"+44 20 7946 0958","national":"020 7946 0958","country_code":44,"region":"GB","country":"United Kingdom","location":"London","line_type":"fixed_line","carrier":"SFR","timezones":["Europe/London"]}],"summary":{"invalid":0,"valid":3}}}}}}},"400":{"description":"Invalid input, or the target could not be processed (see `error.code`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing proxy secret (call through RapidAPI with your key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Invalid proxy secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Daily limit of your plan reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-rapidapi-endpoint":"Validate Phone Numbers in Bulk"}},"/v1/phone/extract":{"post":{"tags":["Extraction"],"summary":"Find and validate every phone number in a text","description":"Every phone number written in a text (signature, page, note), each\nvalidated and formatted, in order of appearance and without duplicates.\nUp to 20,000 characters and 100 numbers. 1 credit per number found\n(1 minimum).","operationId":"extractPhoneNumbersFromText","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneExtractRequest"},"examples":{"Extract Phone Numbers from Text":{"summary":"Extract Phone Numbers from Text","value":{"text":"Call us on +1 650-253-0000 or our Paris office: 01 23 45 67 89.","country":"FR"}}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneExtractResponse"},"examples":{"Extract Phone Numbers from Text":{"summary":"Extract Phone Numbers from Text","value":{"numbers":[{"input":"+44 20 7946 0958","reason":"Valid fixed line number in United Kingdom.","e164":"+442079460958","international":"+44 20 7946 0958","national":"020 7946 0958","country_code":44,"region":"GB","country":"United Kingdom","location":"London","line_type":"fixed_line","carrier":"SFR","timezones":["Europe/London"],"start":11}],"count":2}}}}}},"400":{"description":"Invalid input, or the target could not be processed (see `error.code`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing proxy secret (call through RapidAPI with your key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Invalid proxy secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Daily limit of your plan reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-rapidapi-endpoint":"Extract Phone Numbers from Text"}}},"components":{"schemas":{"ErrorBody":{"properties":{"status":{"type":"integer","title":"Status","examples":[400]},"code":{"type":"string","title":"Code","examples":["invalid_url"]},"message":{"type":"string","title":"Message","examples":["A website URL is required."]}},"type":"object","required":["status","code","message"],"title":"ErrorBody"},"ErrorEnvelope":{"properties":{"error":{"$ref":"#/components/schemas/ErrorBody"}},"type":"object","required":["error"],"title":"ErrorEnvelope"},"FoundPhoneNumber":{"properties":{"input":{"type":"string","title":"Input","examples":["+44 20 7946 0958"]},"valid":{"type":"boolean","title":"Valid","description":"The number exists in its country's numbering plan (right length and a prefix in use). Not a check that the line is active."},"possible":{"type":"boolean","title":"Possible","description":"The length fits the country, even if the prefix is unassigned."},"reason":{"type":"string","title":"Reason","examples":["Valid fixed line number in United Kingdom."]},"e164":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"E164","description":"Only for a valid number.","examples":["+442079460958"]},"international":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"International","examples":["+44 20 7946 0958"]},"national":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"National","examples":["020 7946 0958"]},"extension":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extension","description":"Extension written after the number (ext. 123)."},"country_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Country Code","description":"Calling code.","examples":[44]},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region","description":"ISO 3166-1 alpha-2 country.","examples":["GB"]},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","examples":["United Kingdom"]},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location","description":"Area of a fixed line when known.","examples":["London"]},"line_type":{"type":"string","enum":["mobile","fixed_line","fixed_line_or_mobile","toll_free","premium_rate","shared_cost","voip","personal_number","pager","uan","voicemail","unknown"],"title":"Line Type","default":"unknown","examples":["fixed_line"]},"carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier","description":"Carrier the number range was first assigned to (mobiles). A number ported to another carrier keeps this original name.","examples":["SFR"]},"timezones":{"items":{"type":"string"},"type":"array","title":"Timezones","examples":[["Europe/London"]]},"start":{"type":"integer","title":"Start","description":"Position of the number in the text.","examples":[11]}},"type":"object","required":["input","valid","possible","reason","start"],"title":"FoundPhoneNumber"},"PhoneBulkRequest":{"properties":{"numbers":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Numbers","examples":[["+44 20 7946 0958","06 12 34 56 78","+1 650-253-0000"]]},"country":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country","description":"ISO country used for numbers written without +country code (e.g. FR for 06 12 34 56 78).","examples":["FR"]}},"type":"object","required":["numbers"],"title":"PhoneBulkRequest"},"PhoneBulkResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/PhoneNumber"},"type":"array","title":"Results"},"summary":{"additionalProperties":{"type":"integer"},"type":"object","title":"Summary","examples":[{"invalid":0,"valid":3}]}},"type":"object","required":["results","summary"],"title":"PhoneBulkResponse"},"PhoneExtractRequest":{"properties":{"text":{"type":"string","maxLength":20000,"minLength":1,"title":"Text","description":"Any text: an email signature, a web page, a CRM note...","examples":["Call us on +1 650-253-0000 or our Paris office: 01 23 45 67 89."]},"country":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country","description":"ISO country used for numbers written without +country code.","examples":["FR"]}},"type":"object","required":["text"],"title":"PhoneExtractRequest"},"PhoneExtractResponse":{"properties":{"numbers":{"items":{"$ref":"#/components/schemas/FoundPhoneNumber"},"type":"array","title":"Numbers"},"count":{"type":"integer","title":"Count","examples":[2]}},"type":"object","required":["numbers","count"],"title":"PhoneExtractResponse"},"PhoneNumber":{"properties":{"input":{"type":"string","title":"Input","examples":["+44 20 7946 0958"]},"valid":{"type":"boolean","title":"Valid","description":"The number exists in its country's numbering plan (right length and a prefix in use). Not a check that the line is active."},"possible":{"type":"boolean","title":"Possible","description":"The length fits the country, even if the prefix is unassigned."},"reason":{"type":"string","title":"Reason","examples":["Valid fixed line number in United Kingdom."]},"e164":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"E164","description":"Only for a valid number.","examples":["+442079460958"]},"international":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"International","examples":["+44 20 7946 0958"]},"national":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"National","examples":["020 7946 0958"]},"extension":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extension","description":"Extension written after the number (ext. 123)."},"country_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Country Code","description":"Calling code.","examples":[44]},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region","description":"ISO 3166-1 alpha-2 country.","examples":["GB"]},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","examples":["United Kingdom"]},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location","description":"Area of a fixed line when known.","examples":["London"]},"line_type":{"type":"string","enum":["mobile","fixed_line","fixed_line_or_mobile","toll_free","premium_rate","shared_cost","voip","personal_number","pager","uan","voicemail","unknown"],"title":"Line Type","default":"unknown","examples":["fixed_line"]},"carrier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Carrier","description":"Carrier the number range was first assigned to (mobiles). A number ported to another carrier keeps this original name.","examples":["SFR"]},"timezones":{"items":{"type":"string"},"type":"array","title":"Timezones","examples":[["Europe/London"]]}},"type":"object","required":["input","valid","possible","reason"],"title":"PhoneNumber"}},"securitySchemes":{"RapidAPIKey":{"type":"apiKey","in":"header","name":"X-RapidAPI-Key"},"RapidAPIHost":{"type":"apiKey","in":"header","name":"X-RapidAPI-Host"}}},"tags":[{"name":"Validation","description":"One phone number or up to 100, validated and formatted."},{"name":"Extraction","description":"Every phone number found in a text."}],"security":[{"RapidAPIKey":[],"RapidAPIHost":[]}]}