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"
}
]