{
"query":{
"code": "10005",
"country": "US",
"range": "25",
"measure": "mi",
},
"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 https://postalcodes.app/api/v1/?key=YOUR-APIKEY&distance=25&zipcode=10005&country=us
আমাদের এপিআই কিলোমিটার (ডিফল্ট) বা মাইল দূরে দূরত্ব পরিমাপ গ্রহণ করে।
কিলোমিটার পরিমাপ পরিবর্তন করতে আপনাকে অবশ্যই আপনার অনুরোধে ms
GET https://postalcodes.app/api/v1/?key=YOUR-APIKEY&ms=km&distance=25&zipcode=10005&country=us
প্রতিক্রিয়াটি দেখতে এই রকম হবে:
{
"query":{
"code": "10005",
"country": "US",
"range": "25",
"measure": "mi"
},
"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 https://postalcodes.app/api/v1/?key=YOUR-APIKEY&zipcode=10005&country=us
প্রতিক্রিয়াটি দেখতে এই রকম হবে:
{
"query":{
"code": "10005",
"country": "us",
"range": "",
"measure": "mi"
},
"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"
}
],
}
}
ফলাফলগুলিতে আপনার যা প্রয়োজন কেবল তা পেতে আপনি অতিরিক্ত প্যারামগুলি পাস করতে পারেন, কেবল আপনার অনুরোধে fields
GET https://postalcodes.app/api/v1/?key=YOUR-APIKEY&fields=["range_codes_unique"]&distance=25&zipcode=10005&country=us
প্রতিক্রিয়াটি দেখতে এই রকম হবে:
{
"query":{
"code": "10005",
"country": "US",
"range": "25",
"measure": "mi"
},
"results":{
"range_codes_unique": ["07010", "07020", "07022", "07024", "07026", ...]
}
}