API hujjatlari

Bugungi kunda ishlatish uchun qulay API-dan foydalanishni boshlang, undan qanday foydalanishni bilib olish uchun misollarga rioya qiling.




GET Pochta indekslarini masofadan oling

Ushbu foydalanishni osonlashtiradigan so'nggi nuqta yordamida siz ma'lum masofada joylashgan pochta kodlari ro'yxatini olasiz. So'rov misolida noyob pochta indeksi ro'yxati, pochta indeksi to'liq ro'yxati va har bir pochta indeksining tafsilotlari keltiriladi.

GET https://postalcodes.app/api/v1/?key=YOUR-APIKEY&distance=25&zipcode=10005&country=us

Bizning API masofani o'lchovlarni kilometr (Standart) yoki milda qabul qiladi.

O'lchovni kilometrga o'zgartirish uchun ms parametrini so'rovingizga kiritishingiz kerak:

GET https://postalcodes.app/api/v1/?key=YOUR-APIKEY&ms=km&distance=25&zipcode=10005&country=us

Javob quyidagicha bo'ladi:

{
   "query":{
      "code": "10005",
      "country": "US",
      "range": "25",
      "measure": ""
   },
   "results":{
       "range_codes_unique": ["07010", "07020", "07022", "07024", "07026", ...],
       "range_codes": ["07010", "07020", "07022", "07024", "07026", ...],
       "range_codes_details": [
          {
              "postal_code":"07010",
              "country_code":"US",
              "city":"Cliffside Park",
              "state":"New Jersey",
              "state_code":"NJ",
              "province":"Bergen",
              "province_code":"003"
          },
          {
              "postal_code":"07020",
              "country_code":"US",
              "city":"Edgewater",
              "state":"New Jersey",
              "state_code":"NJ",
              "province":"Bergen",
              "province_code":"003"
          },
          {
              "postal_code":"07022",
              "country_code":"US",
              "city":"Fairview",
              "state":"New Jersey",
              "state_code":"NJ",
              "province":"Bergen",
              "province_code":"003"
          },
          {
              "postal_code":"07024",
              "country_code":"US",
              "city":"Fort Lee",
              "state":"New Jersey",
              "state_code":"NJ",
              "province":"Bergen",
              "province_code":"003"
          },
          {
              "postal_code":"07026",
              "country_code":"US",
              "city":"Garfield",
              "state":"New Jersey",
              "state_code":"NJ",
              "province":"Bergen",
              "province_code":"003"
          },
           ...
       ],
   }
}

GET Pochta indeksi ma'lumotlarini oling

Quyidagi misolda qidiruv so'roviga mos keladigan pochta indekslari tafsilotlari keltirilgan.

GET https://postalcodes.app/api/v1/?key=YOUR-APIKEY&zipcode=10005&country=us

Javob quyidagicha bo'ladi:

{
   "query":{
      "code": "10005",
      "country": "us",
      "range": "",
      "measure": ""
   },
   "results":{
       "range_codes_unique": ["10005"],
       "range_codes": ["10005"],
       "range_codes_details": [
          {
              "postal_code":"10005",
              "country_code":"US",
              "city":"New York",
              "state":"New York",
              "state_code":"NY",
              "province":"New York",
              "province_code":"061"
          }
       ],
   }
}

GET Maxsus ma'lumotlarni oling

Natijalar bo'yicha kerakli narsalarni olish uchun siz qo'shimcha parametrlardan o'tishingiz mumkin, faqat so'rovingizga fields

GET https://postalcodes.app/api/v1/?key=YOUR-APIKEY&fields=["range_codes_unique"]&distance=25&zipcode=10005&country=us

Javob quyidagicha bo'ladi:

{
   "query":{
      "code": "10005",
      "country": "US",
      "range": "25",
      "measure": ""
   },
   "results":{
       "range_codes_unique": ["07010", "07020", "07022", "07024", "07026", ...]
   }
}



Bugun bizning API-dan bepul foydalanishni boshlang!

240 kunlik bepul so'rovlarni oling

+94 Qo'llab-quvvatlanadigan mamlakatlar

AD (Andorra)
AR (Argentina)
AS (Amerika Samoasi)
AT (Avstriya)
AU (Avstraliya)
AX (Aland orollari)
AZ (Ozarbayjon)
BD (Bangladesh)
BE (Belgiya)
BG (Bolgariya)
BM (Bermuda)
BR (Braziliya)
Flag of Belarus
BY (Belarus)
CA (Kanada)
CH (Shveytsariya)
CL (Chili)
CO (Kolumbiya)
CR (Kosta-Rika)
CY (Kipr)
CZ (Chexiya Respublikasi)
Flag of Germany
DE (Germaniya)
DK (Daniya)
DO (Dominik Respublikasi)
DZ (Jazoir)
EE (Estoniya)
ES (Ispaniya)
FI (Finlandiya)
FM (Mikroneziya)
FO (Farer orollari)
FR (Frantsiya)
GB (Birlashgan Qirollik)
GF (Frantsiya Guyanası)
GG (Guernsey va Alderney)
GL (Grenlandiya)
GP (Guadeloupe)
GT (Gvatemalada)
GU (Guam)
HR (Xorvatiya (Hrvatska))
HU (Vengriya)
IE (Irlandiya)
IM (Man (ish bilan))
IN (Hindiston)
IS (Islandiya)
IT (Italiya)
JE (Jersi)
JP (Yaponiya)
Flag of South Korea
KR (Janubiy Koreya)
LI (Lixtenshteyn)
LK (Shri-Lanka)
LT (Litva)
LU (Lyuksemburg)
LV (Latviya)
MC (Monako)
MD (Moldova)
Flag of the Marshall Islands
MH (Marshall orollari)
MK (Makedoniya)
MP (Shimoliy Mariana orollari)
MQ (Martinique)
MT (Malta)
Flag of Malawi
MW (Malavi)