Geoptapi Save

GEO API PT - Provides information for Portugal on official divisional administrative regions, georeferencing, census and postal codes

Project README

logo

JSON API documentation Test API server CodeQL Security Check js-standard-style Request last hour Request last day
Donate with librepay Donate with librepay

RESTful API which provides information on official divisional administrative regions of Portugal (based on "Carta Administrativa Oficial de Portugal, 2022", from here). It includes information on mainland Portugal, Azores and Madeira. It also provides information on Postal Codes and Census. For more information see the resource and routines documentations.

Uptime of this server.

It uses NodeJS (much faster than Python) to create a HTTP server allowing several GET requests. It pre-processes all the raw data for fast real-time delivery.

Docs and Routes

All the API documentation is at geoapi.pt/docs.

This API follows the OpenAPI Specification, thus you can see all the routes in the openapi.yaml file.

Directory structure of the main project

This is the main public repo of the geoapi.pt project

The directory structure of the main project should be like:

./               # geoapi-pt/root (private)
 ├── resources/  # geoapi-pt/resources (private)
 ├── main/       # this repo (public)

JSON or HTML

By default the server replies with text/html format. To receive JSON format, chose one of these:

  • add the query GET parameter json=1 to the URL (ex.: /municipio/évora?json=1);
  • set the HTTP request header Accept as JSON, that is, Accept: application/json; or
  • in case you're using the public API, use the host json.geoapi.pt (ex: json.geoapi.pt/cp/2495-300)

For pretty-printing JSON as HTML response, use in the query ?json=belo, for example /cp/2495-300?json=belo

Open Source Agenda is not affiliated with "Geoptapi" Project. README Source: geoapi-pt/main

Open Source Agenda Badge

Open Source Agenda Rating