API Guide

Documentation

Subscription

To use the API you need to be subscribed to one of the API subscriptions.

Authentication

Every request to the Article 4 Map API requires a key. Your API Key is:
Sign up to an API subscription to get an API key

CORS

We support CORS, which allows Javascript requests to be made across domains. Each response contains the Access-Control-Allow-Origin: * header that enables CORS.
Exposing your API key in publicly visible source code is not recommended. You remain responsible for any and all calls made to the API using your key.

HTTP Method

GET

URL

https://api.article4map.com

Headers

Name Description Required
Authorization Your API Key Yes

Response

Each response body will be an array with one or more JSON objects contained within. Below are the fields that can be returned in the response from the API.
Name Description
quotamonth This is your total API quota that your subscription allows you per month.
countmonth This is the current amount of your API quota that you have used.

Example

Request

Curl

curl -X GET -H "Authorization: ENTERYOURAPIKEYHERE" "https://api.article4map.com/"

Python

import requests
import json

apikey = "ENTERYOURAPIKEYHERE"

url = "https://api.article4map.com/"
headers = {'Authorization': apikey}

result = requests.get(url, headers=headers)

result.raise_for_status()
print(result.content)

Response

[
 {
   "quotamonth": 4000,
   "countmonth": 129
 }
]

HTTP Method

POST

URL

https://api.article4map.com/text

Headers

Name Description Required
Authorization Your API Key Yes

Body

Name Description Required
search This can be an address, postcode, a point of interest name, a city name, etc Yes
type This is used to filter what type of article 4 area you're looking for. Allowed values are current, upcoming and all. Yes

Response

Each response body will be an array with one or more JSON objects contained within. Below are the fields that can be returned in the response from the API.
Name Description
status This will be active if there is article 4 and the type is current. If the type is upcoming and there is article 4, this will show the latest status or the date when the upcoming article 4 is due to start.
type This shows if the article 4 is either current or upcoming.
resolvedaddress This is the address the geocoder found from your search. This is useful to check as sometimes you may not have been accurate enough with your search and the geocoder will return the closest match.

Example

Request

Curl

curl -X POST -H "Authorization: ENTERYOURAPIKEYHERE" -H "Content-type: application/json" -d "{\"search\": \"SE6 1PH\", \"type\" : \"all\"}" "https://api.article4map.com/text"

Python

import requests
import json

apikey = "ENTERYOURAPIKEYHERE"
postcode = "SE6 1PH"
searchtype = "all"

url = "https://api.article4map.com/text"
headers = {'Authorization': apikey, 'Content-type': "application/json"}
data = {"search": postcode, "type" : searchtype}

result = requests.post(url, headers=headers, data=json.dumps(data))

result.raise_for_status()
print(result.content)

Response

[
 {
   "status": "active",
   "type": "current",
   "resolvedaddress": "SE6 1PH, London, Greater London, England, United Kingdom"
 },
 {
   "status": "19/01/2024",
   "type": "upcoming",
   "resolvedaddress": "SE6 1PH, London, Greater London, England, United Kingdom"
 }
]

HTTP Method

POST

URL

https://api.article4map.com/image

Headers

Name Description Required
Authorization Your API Key Yes

Body

Name Description Required
search This can be an address, postcode, a point of interest name, a city name, etc Yes

Response

Each response body will be an array with one or more JSON objects contained within. Below are the fields that can be returned in the response from the API.
Name Description
image This will be a url where the image is stored. Images will be automatically deleted after 30 days.

Example

Request

Curl

curl -X POST -H "Authorization: ENTERYOURAPIKEYHERE" -H "Content-type: application/json" -d "{\"search\": \"SE6 1PH\"}" "https://api.article4map.com/image"

Python

import requests
import json

apikey = "ENTERYOURAPIKEYHERE"
postcode = "SE6 1PH"

url = "https://api.article4map.com/image"
headers = {'Authorization': apikey, 'Content-type': "application/json"}
data = {"search": postcode}

result = requests.post(url, headers=headers, data=json.dumps(data))

result.raise_for_status()
print(result.content)

Response

[
 {
   "image": "https://images.article4map.com/ba211432-8d49-455d-9189-051979cf1ef5.png"
 }
]
We use essential cookies to make our site work. With your consent, we may also use non-essential cookies to improve user experience and analyse website traffic. By clicking 'Accept', you agree to our website's cookie use as described in our Cookie Policy. You can change your cookie settings at any time by clicking “Preferences”.