MaPit is a database and web service that maps points to administrative area information and polygons for Norway (see the UK version). The source code is available on GitHub.

This site is filled with only open data, so you can be secure that you can reuse the data from this site under the minimal terms of the licences given below. It is based on Kommune and Fylkes area info from OpenStreetMap and Norwegian post code coordinates from Erik Bolstad.

API

Non-commercial, low-volume use of this service is free. You will need to attribute data sources as per their licenses, and please do attribute us too :) For commercial or high-volume usage, please contact us about using the service, by licensing or by helping you install your own version.

All calls below are made to http://mapit.nuug.no/ and return JSON (on some calls, stick .html on the end for an HTML version). By default, calls will return active areas; for some calls you may specify a previous generation to look up instead. Whenever an area is returned from MaPit, it is as a dictionary with the following keys: id, name, country, type, parent_area, generation_low, generation_high, codes.

By postcode

Multiple areas

Generations

By point

An SRID is a unique number referring to a particular co-ordinate system; the one you probably are interested in is 4326 for WGS84 lon/lat. You can restrict results to particular area types with a type parameter (multiple types separated by commas), and have results for a previous generation with a generation parameter. Note that x,y means longitude,latitude.

By area ID

All the following can take a type parameter to restrict results to a type or types: