Polish Post PNA Postal Code API

The Polish Post PNA Postal Code API is a robust and high-performance  REST API designed for efficient search and management of Polish postal codes (PNA). This API simplifies the process of validating address inputs and enhances user experience through its intuitive autocomplete suggestions. With support for precise house-number matching, including both range checks and odd/even parity logic, it is an essential tool for developers and businesses working with Polish addresses.

Key Features

  • Search postal codes using city, street, and house numbers.
  • Address validation and autocomplete for improved accuracy.
  • Supports both GET and POST requests for greater flexibility.
  • Reverse geocoding to find locations based on latitude and longitude.
  • AI integration for enhanced functionality and user engagement.

API Endpoints

1. Search Postal Codes

GET /pna/search

  • Query parameters:

  • city (required)

  • street (optional)

  • number (optional)

  • Example: GET domain/pna/search?city=Wroclaw&street=Kwiska&number=3

 

2. Search Postal Codes (POST)

POST /pna/search

Body (application/json):

{"city":"Bialystok","street":"Mikolaja Kopernika","number":"2a","province":"podlaskie"}

3. Get Addresses by Postal Code

GET /pna/code/{postalCode}

Example: GET /pna/code/54-210

4. Get Addresses by Postal Code (POST)

POST /pna/code

Body (application/json):

{"postal_code":"54-210"}

5. Reverse Geocoding

GET /pna/reverse

  • Query parameters:

  • Lat (required)

  • Lon (required)

  • RadiusKm (optional, default 5)

  • Example: GET /pna/reverse?Lat=51.12161528781476&Lon=16.98550601056978&RadiusKm=0.1

6. Reverse Geocoding (POST)

POST /pna/reverse

Body (application/json):

{"lat":51.12161528781476,"lon":16.98550601056978,"radius_km":0.1}

7. Autocomplete Streets

GET /pna/autocomplete/streets

  • Query parameters:

  • query (minimum 2 characters)

  • city (optional)

  • Example: GET /pna/autocomplete/streets?query=Legn&city=Wroclaw

8. Autocomplete Cities

GET /pna/autocomplete/cities

  • Query parameters:

  • query (required)

  • Example: GET /pna/autocomplete/cities?query=Wroc

AI Integration

  • GET /pna/ai-guide

  • GET /.well-known/ai-plugin.json