How To Get Data Containing The Country, The Phone Country Code And The Mobile Phone Digits Length?

I’m looking for data containing the name of the country, the phone country code, and the msisdn length (without the phone country code) like this

[{“name”: “United States”, “code”: “+1”, “length”: 10}, {“name”: “China”, “code”: “+86”, “length”: 11}]

I don’t need the landline number length, just the mobile number length. if a country can have multiple number lengths, like 7 and 8, then the dataset should have the max length, in this case, 8.

It would be great if I can get this data in JSON, but any format would do. I’m only finding this data on Wikipedias and such, with no reliable sources, and hard to work with, I need to copy and paste from webpages.

I need this data to validate input field phone numbers. I currently have 80 countries already, I’d like to have the complete list though.

submitted by /u/lynob
[link] [comments]

Leave a Reply

Your email address will not be published. Required fields are marked *