API Codau Post - Mynediad at Ddata Cod Post Byd-eang

Chwilio am godau post, sicrhau bod yr holl godau post yn amrywio pellter a llawer mwy gyda'n API cod post.

Data ledled y byd
94+ Gwledydd
{
   "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"
          },
           ...
       ],
   }
}
Postalcodes.app - Access to Worldwide Postal Code data | Product Hunt






API hawdd ei ddefnyddio

Offeryn yw PostCodes.app sy'n eich galluogi i gael gwybodaeth am wahanol godau post ledled y byd. Gallwch gael codau post mewn amrediad pellter mewn cilometrau neu filltiroedd, neu gael manylion cod post yn gyffredinol.

GET Sicrhewch godau post o fewn pellter

Gyda'r pwynt terfyn hawdd ei ddefnyddio hwn fe gewch restr o godau post sydd o fewn pellter penodol. Bydd yr enghraifft cais yn dychwelyd rhestr o godau post unigryw, rhestr gyflawn o godau post a manylion pob cod post.

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

Mae ein API yn derbyn mesuriadau pellter mewn cilometrau (Diofyn) neu filltiroedd.

I newid mesuriad i gilometrau rhaid i chi roi'r ms yn eich cais:

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

Bydd yr ymateb yn edrych fel hyn:

{
   "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 Sicrhewch fanylion codau post

Bydd yr enghraifft ganlynol yn dychwelyd manylion y codau post sy'n cyd-fynd â'r ymholiad chwilio.

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

Bydd yr ymateb yn edrych fel hyn:

{
   "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"
          }
       ],
   }
}

GET Cael data personol

Gallwch basio params ychwanegol i gael dim ond yr hyn sydd ei angen arnoch chi yn y canlyniadau, dim ond ychwanegu'r fields gwerth yn eich cais.

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

Bydd yr ymateb yn edrych fel hyn:

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



+94 Gwledydd â chymorth

AD (Andorra)
AR (Yr Ariannin)
AS (Samoa Americanaidd)
AT (Awstria)
AU (Awstralia)
AX (Ynysoedd Aland)
AZ (Azerbaijan)
BD (Bangladesh)
BE (Gwlad Belg)
BG (Bwlgaria)
BM (Bermuda)
BR (Brasil)
Flag of Belarus
BY (Belarus)
CA (Canada)
CH (Y Swistir)
CL (Chile)
CO (Colombia)
CR (Costa Rica)
CY (Cyprus)
CZ (Gweriniaeth Tsiec)
Flag of Germany
DE (Yr Almaen)
DK (Denmarc)
DO (Gweriniaeth Dominica)
DZ (Algeria)
EE (Estonia)
ES (Sbaen)
FI (Y Ffindir)
FM (Micronesia)
FO (Ynysoedd Faroe)
FR (Ffrainc)
GB (Y Deyrnas Unedig)
GF (Giana Ffrengig)
GG (Guernsey ac Alderney)
GL (Yr Ynys Las)
GP (Guadeloupe)
GT (Guatemala)
GU (Guam)
HR (Croatia (Hrvatska))
HU (Hwngari)
IE (Iwerddon)
IM (Dyn (Ynys))
IN (India)
IS (Gwlad yr Iâ)
IT (Yr Eidal)
JE (Jersey)
JP (Japan)
Flag of South Korea
KR (Korea De)
LI (Liechtenstein)
LK (Sri Lanka)
LT (Lithwania)
LU (Lwcsembwrg)
LV (Latfia)
MC (Monaco)
MD (Moldova)
Flag of the Marshall Islands
MH (Ynysoedd Marshall)
MK (Macedonia)
MP (Ynysoedd Gogleddol Mariana)
MQ (Martinique)
MT (Malta)
Flag of Malawi
MW (Malawi)