{% extends "mapit/base.html" %} {% load url from future %} {% load static from staticfiles %} {% block fulltitle %} MapIt : map postcodes and geographical points to administrative areas {% endblock %} {% block content %}
{% if country == 'GB' %} Now Available: MapIt Global {% else %} also Available MapIt UK {% endif %}

MapIt: {% include "mapit/country.html" %}

{% if country == 'GB' %} MapIt is a service that maps UK postcodes and geographical points to administrative areas. It’s useful for anyone who has a postcode or co-ordinates of a point in the UK, and needs to find out what region, constituency, or council it lies within. It’s also great for looking up the shapes of all those boundaries. {% endif %} {% if country == 'NO' %} 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. {% endif %} {% if country == 'Global' %} MapIt is a service that maps geographical points to administrative areas. This edition is based on source data from the totally amazing OpenStreetMap project, so add your boundaries there if they’re missing. If you’re in the UK our MapIt UK with open Ordnance Survey data will probably be more useful.

MapIt is useful for anyone who has the co-ordinates of a point on Earth, and who needs to find out what country, region, city, constituency, or state it lies within. It’s also great for looking up the shapes of all those boundaries. {% endif %}

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.

{% if country == 'NO' %}

MapIt API

{% include "mapit/api/intro.html" %} {% if country != 'Global' %} {% include "mapit/api/postcode.html" %} {% endif %} {% include "mapit/api/point.html" %} {% include "mapit/api/area.html" %} {% include "mapit/api/areas.html" %} {% include "mapit/api/generations.html" %}

General information

Format

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. {% if country == 'GB' %} The main difference in generation 12 is that it contains the pre-2010 England and Wales Parliamentary constituencies; generation 14 contains the pre-2011 Scottish Parliament constituencies. Only current Northern Ireland constituencies are present; if you need pre-2010 UK Parliament NI constituencies, or pre-2011 Northern Ireland Assembly constituencies, you can work it out from the wards and the 2003 SNAC file in the data/ directory. {% endif %}
{% if country == 'GB' %}
Technical queries
If you have any technical queries with the API, please contact us at mapit@mysociety.org. {% endif %}

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. {% if country == 'GB' %} Versions have appeared in other countries, such as Norway, and in 2012 we released a global version based on OpenStreetMap data. {% endif %}{% if country == 'NO' %} Versions have appeared in other countries, such as this one in Norway, and in 2012 we released a global version based on OpenStreetMap data. {% endif %}{% if country == 'Global' %} Versions have appeared in other countries, such as Norway, and in 2012 we released this global version based on OpenStreetMap data. {% endif %}

Usage & Licence

{% if country != 'NO' %}

As a UK registered charity our legal status only allows this service to be used free of charge by other registered charities, or individuals working unpaid on non-profit projects. The free usage limit for non-profit users is 50,000 calls to the API per year. All other uses need to acquire a licence.

Find out if you need a licence or get in touch so we can discuss how we can provide you with the service you require.

To maintain quality of service for our own websites, as well as our API users, this service is rate limited to an average of 1 call per second in a rolling 3 minute period.

If you use this service, you must attribute {% if country == 'GB' %} OS/RM/ONS {% else %} OpenStreetMap {% endif %} as per their licences. We also ask that all non-profit users attribute MapIt at the point of use on sites or apps. Attribution should use the text “Powered by MapIt”, with a link back to this page. {% endif %}

{% endblock %}