Global phone intelligence
एक number, consistent output
National, international और irregularly formatted input स्वीकार करें, फिर 242 देशों और क्षेत्रों के standardized formats और validation metadata पाएँ।
+91 98765 43210+919876543210isValid और isPossibleInput parameters
Number और address context
| Parameter | Requirement | Description |
|---|---|---|
number | जरूरी | National, international या E.164 format में phone number। |
address | सशर्त | National number interpret करने के लिए ISO country code, country name, city या region। |
number, + और international calling code से शुरू न हो तो IN, India या Mumbai जैसा context दें।
INIndiaMumbaiUSNew YorkQuery-string authentication
Basic GET request
curl "https://api.genderapi.io/api/phone?key=YOUR_API_KEY&number=%2B919876543210&address=IN"+ को %2B और spaces को %20 encode करें। Manual string बनाने के बजाय language की URL/URLSearchParams utilities इस्तेमाल करें।Bearer authentication
Server-side POST request
Number और optional address JSON में भेजें; API key Authorization header में रखें।
curl -X POST "https://api.genderapi.io/api/phone" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"number":"+919876543210","address":"IN"}'const response = await fetch("https://api.genderapi.io/api/phone", {
method: "POST", headers: { "Content-Type": "application/json", "Authorization": "Bearer YOUR_API_KEY" },
body: JSON.stringify({ number: "+919876543210", address: "India" })
});API response
Validation, formatting और metadata
{
"status": true, "remaining_credits": 15709, "expires": 0, "duration": "18ms",
"regionCode": "IN", "countryCode": 91, "country": "India",
"national": "098765 43210", "international": "+91 98765 43210", "e164": "+919876543210",
"isValid": true, "isPossible": true, "numberType": "MOBILE",
"nationalSignificantNumber": "9876543210", "rawInput": "+91 98765 43210",
"isGeographical": false, "areaCode": "", "location": "India"
}Response fields
| Field | Type | Description |
|---|---|---|
status | boolean | Request सफलतापूर्वक पूरा हुआ या नहीं। |
remaining_credits | integer | Request के बाद उपलब्ध credits। |
expires | integer | Credit expiry का UNIX timestamp। |
duration | string | Server processing time। |
regionCode | string | Detected ISO 3166-1 alpha-2 region code। |
countryCode | integer | International dialing code। |
country | string | पढ़ने योग्य country name। |
national | string | National use के लिए formatted number। |
international | string | International display के लिए formatted number। |
e164 | string | Canonical E.164 representation। |
isValid | boolean | Number regional validation rules पूरा करता है या नहीं। |
isPossible | boolean | Structure के आधार पर number संभव है या नहीं। |
numberType | string | Detected number category। |
nationalSignificantNumber | string | Country calling code के बिना national number। |
rawInput | string | Request में भेजा गया original number। |
isGeographical | boolean | Number geographic area से जुड़ सकता है या नहीं। |
areaCode | string | Detected area-code segment। |
location | string | Area code से जुड़ा location। |
Classification reference
Number type values
FIXED_LINEGeographic location से जुड़ा landline।
MOBILEMobile या cellular number।
FIXED_LINE_OR_MOBILENumbering plan landline और mobile में फर्क नहीं करता।
TOLL_FREEReceiver-paid toll-free number।
PREMIUM_RATEPremium-rate service number।
SHARED_COSTCall cost caller और recipient में साझा होता है।
VOIPVoice-over-IP telephone number।
PERSONAL_NUMBERदूसरी line पर redirect हो सकने वाला personal number।
PAGERPager notification number।
UANShared business contact के रूप में इस्तेमाल Universal Access Number।
VOICEMAILDedicated voicemail access number।
UNKNOWNNumber category तय नहीं हुई।
सामान्य सवाल
Phone API FAQ
Phone validation API क्या करता है?
यह phone numbers validate और normalize करता है, national, international व E.164 formats लौटाता है और उपलब्ध होने पर region, number type व geographic metadata बताता है।
isValid और isPossible में क्या अंतर है?
isValid regional numbering rules जाँचता है; isPossible बताता है कि structure किसी number का हो सकता है, भले validity confirm न हो।
address कब जरूरी है?
Number plus sign और international calling code से शुरू न हो तो address दें। यह ISO country code, country name, city या region हो सकता है।
Special characters कैसे भेजें?
GET query parameters में spaces, plus signs और अन्य special characters URL-encode करें। JSON POST bodies आपका HTTP client encode करता है।
अगला संदर्भ