# Kody Pocztowe API (Polish zip codes) > HTTP API and MCP server for Polish postal codes (kody pocztowe) from the official list of Poczta Polska S.A., completed with streets from the GUGiK address register (PRG): the address of a zip code, the zip codes of a town, street or city district, the zip code of an address with a house number, and validation of the zip code of an address. 50 free requests per day per client IP address; more with a prepaid request package bought with an x402 payment (USDC on Base) or a RapidAPI plan. Base URL: `https://kodpocztowy.intami.pl`. REST endpoints answer JSON by default (`Accept: application/xml` or `text/plain` for other formats). Without a key every client IP address (IPv6: /64 prefix) gets 50 requests per UTC day, shared by the REST API and the MCP tools; only answers with a result and lookups that found nothing (`404`) are counted. Over the limit a lookup answers `402` with JSON listing the request packages. Buy one with `POST /x402/packages/{id}` (x402 v2 payment) or in a browser wallet at `https://kodpocztowy.intami.pl/wallet.html?package=pro`, then send the returned key (`kp_...`) in the `X-API-Key` header. Packages: `pro` 30000 requests for 5 USDC, `mega` 900000 requests for 12 USDC; no daily limit, no expiry. Every client is also limited to 120 requests per minute (`429`, `Retry-After: 60`). ## Endpoints - `GET /{zipCode}` - entries of a zip code (town, street, house number ranges, commune, county, voivodeship, district), e.g. `https://kodpocztowy.intami.pl/01-111`. - `GET /city/{city}` - all zip codes of a town, e.g. `https://kodpocztowy.intami.pl/city/Gdańsk`. - `GET /city/{city}/street/{street}` - zip codes of a street, `wildcard=true` matches a part of the name, e.g. `https://kodpocztowy.intami.pl/city/Wrocław/street/Grodzka`, `https://kodpocztowy.intami.pl/city/Warszawa/street/Mickiewicza?wildcard=true`. - `GET /city/{city}/street/{street}/number/{number}` - zip code of an address with a house number, optional `district`, e.g. `https://kodpocztowy.intami.pl/city/Szczecin/street/Piłsudskiego/number/40`. - `GET /city/{city}/district/{district}` - zip codes of a city district, e.g. `https://kodpocztowy.intami.pl/city/Warszawa/district/Wola`. - `POST /validate` - checks whether a zip code matches an address, JSON body `{"kod":"70-420","miejscowosc":"Szczecin","ulica":"al. Piłsudskiego","numer":"40"}`; answers `poprawny`, the correct codes `kody`, the matching entries and notes in Polish. - `GET /x402/packages` - request packages for sale (free); `POST /x402/packages/{id}` buys one with an x402 payment. - MCP server: `https://kodpocztowy.intami.pl/mcp` (Streamable HTTP, stateless). Tools `lookup_by_zip`, `lookup_by_city`, `lookup_by_city_street`, `lookup_by_city_district`, `lookup_by_address`, `validate_address` (each call uses one request of the same free limit or package; the key goes in the `api_key` argument or the `X-API-Key` header) and `buy_package` (x402 payment in `_meta["x402/payment"]`). `initialize` and `tools/list` are free. Names of towns, streets and districts are case-insensitive, also for Polish letters (`łódź` = `Łódź`); street prefixes such as `ul.`, `al.`, `pl.` may be omitted. URL-encode spaces and Polish letters if your client does not. ## Docs - [Full description for LLMs](https://kodpocztowy.intami.pl/llms-full.txt): every endpoint with parameters, responses, limits, payment and MCP details. - [OpenAPI 3 specification](https://kodpocztowy.intami.pl/open-api.yaml): machine-readable description of all endpoints. - [Home page](https://kodpocztowy.intami.pl/index.html): human documentation (in Polish) with a demo. ## Optional - [MCP server description](https://kodpocztowy.intami.pl/mcp): open in a browser (`Accept: text/html`) for the tools and their arguments. - [Request packages](https://kodpocztowy.intami.pl/x402/packages): current packages, prices and payment links (JSON). - [RapidAPI plans](https://rapidapi.com/intami-intami-default/api/polish-zip-codes1/pricing): monthly subscriptions as an alternative to packages.