MapIt is a charitable project from mySociety Keep us online, Donate Now
also Available MapIt UK

MapIt: Norway

MapIt is a service that maps postcodes and geographical points to administrative areas. It’s useful for anyone who has a postcode or co-ordinates of a point in Norway, and needs to find out what fylke, kommune, or more it lies within. It’s also great for looking up the shapes of all those boundaries.

Charitable, low volume use of this service is free – read more.
You can download the source on Github.
Need a licence? Read more or get in touch.


The documentation below is for developers who want to use MapIt as a web service, describing its REST API. If that’s all Greek to you, please see our page for non-developers.

lookup by postcode


Information on a particular postcode, including its location in WGS84 latitude/longitude, and the areas it is contained within.

Optional query parameters:

generation, to return results from a previous generation.


If your postcode was 0373 you would load /postcode/0373

By default the response is in JSON, if you want a human readable page then append ‘.html’ to the url /postcode/0373.html

lookup by partial postcode

/postcode/partial/[partial postcode]

Geographical details for the centroid of the partial postcode specified.


lookup by point

  • /point/[SRID]/[x],[y]
  • /point/[SRID]/[x],[y]/box

SRID is a unique number referring to a particular co-ordinate system; the one you probably are interested in is 4326 for WGS84 normal lon/lat.

x and y are the co-ordinates of the point in the co-ordinate system; note that x,y means longitude,latitude.

Optional query parameters:
  • type, to restrict results to a particular area type or types (multiple types separated by commas);
  • generation, to return results for a previous generation.
  • min_generation, to return results since that generation.

A hash of the areas that the point is contained within. If the /box version is used, only the area bounding boxes are considered.

Example of areas containing (59,10).

lookupnearest postcode

Same as for by point.
The postcode closest to the particular point.
Example of postcode nearest to (59,10).

lookup by area

  • /area/[area ID]
  • /area/[area ID]/example_postcode
  • /area/[area ID]/geometry
  • /area/[area ID].[kml or geojson or wkt]
  • /area/[SRID]/[area ID].[kml or json or wkt]
Optional query parameters:
simplify_tolerance, a floating point parameter to simplify the polygons returned.
Information on a particular area, including name, type, parent, and any associated codes (see below for details). The code lookups redirect to the area URI. example_postcode returns a random postcode within the area specified. geometry returns centroid, extent and area of the area.

lookup multiple areas

  • /areas/[area IDs]
  • /areas/[area IDs]/geometry
  • /areas/[type(s)]
  • /areas/[name prefix]
Separate multiple parameters with commas. Name prefix means it will return any area that starts with the string given. The current area types are: NKO (kommune), NFY (fylke), NRA (vegvesen), NPT (kollektivtransportselskap), NPG (kraftregionselskap), NRR (jernbaneverk), NSA (kystverk).
Optional query parameters:
  • generation, to return areas in that generation (type and name lookups only).
  • min_generation, to return areas since that generation (type and name lookups only).
  • type, to restrict results to a type or types (multiple separated by commas; name lookup only).

Information on multiple areas that match the parameters provided, as a dictionary indexed by area ID. The geometry argument lets you fetch multiple single area geometry results at once.



A list of all generations in this installation of MapIt.

General information


All calls return JSON, you can generally get an HTML representation by sticking .html on the end.

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.

Historical areas
By default, calls will return active areas; for some calls you may specify a previous generation to look up instead.

About MapIt

MapIt was written back in 2003 as a postcode lookup to power the original mySociety sites such as WriteToThem. Over time it gained features such as point lookup (for FixMyStreet), and when Ordnance Survey data became freely available in 2010, it was rewritten and made public for the whole UK. Versions have appeared in other countries, such as this one in Norway, and in 2012 we released a global version based on OpenStreetMap data.

Usage & Licence