WW1 France & Flanders Public API
No Daily Limits - Free - Simple to Use!
Welcome! Please feel free to use one of our public APIs to retrieve WW1-related data from France and Flanders.
- Convert a trench map reference to modern latitude and longitude;
- Search the Gazetteer of the Western Front;
- Find historic trenches & military locations, farms, communes, villages and cities;
- Find modern farming localities, communes, villages and cities in France and Flanders, with latest population & elevation data;
- Find major populated localities for a map sheet (eg 28) or quadrant (36NW or 51bSW1).
- Find nearby locations where an action resulted in a Victoria Cross (direct Wikipedia link provided).
- Find nearby CWGC cemeteries and memorials (+ Wikipedia link).
- Discover WW1 military engagements (+ Wikipedia link).
Simple and Fast - Easy to Configure!
Simple syntax, conforms with RESTful API, CSV and free text options.
- Show me the latitude & longitude for trench map reference 62d.J.19.b.40.30.
- Find Minden Post.
- Find trenches, military locations & WW1-era farms & farming communities within 1,000 metres of Passchendaele.
- Find highest to lowest elevations for modern locations within 2,750 metres of Messines. Include current population.
- Find top 25 populated centres in quadrant NW2 within sheet 28 (Iepers).
- Find a Victoria Cross recipient within 3,750 metres of Ovillers-la-Boisselle.
- Find CWGC cemeteries near Arras.
- Find major WW1 battles near Vimy Ridge.
- Find lat, lon for WW1 trench map quadrant — Sheet 36cNW2.
Standard Syntax, JSON Encoded Returns
Try it now! Paste any of the following lines into your browser:
→ api.tmapper.com/convert.php?term=62d.J.19.b.40.30
→ api.tmapper.com/search.php?term=Minden%20Post
→ api.tmapper.com/nearby.php?lat=50.89979&lon=3.02133&radius=1250
→ api.tmapper.com/geonames.php?lat=50.764098&lon=2.899388&radius=2750&type=e
→ api.tmapper.com/quadrants.php?sheet=36c&quadrant=NW3&dms=1
→ api.tmapper.com/quadrant.php?sheet=28&quadrant=NW3&min=1&limit=25
→ api.tmapper.com/vcnearby.php?lat=50.020749&lon=2.695609&radius=3750
→ api.tmapper.com/cwgc.php?lat=50.293186&lon=2.774403&radius=4000
→ api.tmapper.com/battles.php?lat=50.374957&lon=2.804310
Release Notes, Options & Errors
Note: Coverage is France and Flanders unless documented otherwise for an individual API.
Note: We parse for HTML special characters, check terms with regular expressions and return HTTP response code 400 or 404 when in doubt.
Note: An empty page means that no records were retrieved from the database. Your JSON encoded page will simply appear as [].
Distance: Radius is slightly over-sampled - for computational efficiency we calculate a bounding box to avoid a great-circle calculation for each Point of Interest. A radius of 400 m becomes 566 m at each vertex.
Tip: - for APIs 2 onwards if you append &disp=txt then your browser will display the result as human readable free text.
Tip: - appending &disp=csv will display the result in csv, ready for import into Excel.
API #1 - Convert
api.tmapper.com/convert.php?term=62d.J.19.b.40.30
- This API returns a latitude, longitude from a well-formed British Trench Map reference.
- We require &term= to be followed by all of: - sheet name, letter, number, grid, x ordinate & y ordinate.
- You must input the full term. &term=62d.J.19.b will error as it is missing the x and y ordinate.
- Each component must be separated by a period (dot or full stop).
- We only support sheets 11, 12, 13, 14, 15, 19, 20, 21, 22, 23, 27, 28, 29, 30, 31, 36a, 36, 37, 38, 39, 36b, 36c, 44, 45, 46, 51c, 51b, 51a, 51, 52, 57d, 57c, 57b, 57a, 57, 62d, 62c, 62b, 62a, 62, 66e, 66d, 66c, 66b & 66a.
- This API uses verbose errors so you should receive a full explanation for each error.
API #2 - Search
api.tmapper.com/search.php?term=Minden%20Post
- This API returns a list of WW1 localities that match the term you supply.
- Internally the search is performed as an SQL
WHERE term LIKE '%Minden Post%'
. API input &term=ear will return year, pear, pearl etc.
- Search is case-insensitive.
- Search ignores accents, diacritical marks etc. pozieres will retrieve Pozières and moy finds Moÿ-de-l'Aisne.
- Searching on Passchendaele also returns Passendale & vice-versa.
- A successful result is a JSON Encoded object consisting of the id, term, tmref, sheet, letter, quadrant, comment, tag, type, latitude, longitude, bound.
- This is our database id, full name, trench map reference, map sheet, letter, quadrant, additional details, tag, geonames type, latitude, longitude, locality precision.
- A maximum of 30 records will be returned.
- This API is terse and any errors result in a 400 or 404 HTTP response.
API #3 - WW1 Locations
api.tmapper.com/nearby.php?lat=50.89979&lon=3.02133&radius=1250
- This simple API returns a list of WW1 localities within a radius of a given location.
- If the radius is not supplied it is set to 5,000 metres.
- If the radius is too low it is set to 250 metres.
- If the radius is too high it is set to 25,000 metres.
- A successful result is a JSON Encoded object consisting of the geonames id, term, tmref, tag, type, latitude, longitude, bound. See API #2.
- It is sorted by distance, then type (eg farm, school etc).
- A maximum of 128 records will be returned.
- This API is terse and any errors result in a 400 or 404 HTTP response.
API #4 - Modern Population & Elevation
api.tmapper.com/geonames.php?lat=50.764098&lon=2.899388&radius=2750&type=e
- This simple API returns a list of modern localities within a radius of a given location.
- Recent population values and modern satellite elevation are included.
- See API #2 and #3 for radius and returned data.
- &type=p sorts results by population (default) descending, &type=e by elevation.
- The date of the last population census for each locality is also returned.
- A maximum of 128 records will be returned.
- This API is terse and any errors result in a 400 or 404 HTTP response.
API #5 - Map Sheet Cities
api.tmapper.com/quadrant.php?sheet=28&quadrant=NW3&min=1&limit=25
- This API returns localities within a map sheet with recent population values.
- Data returned is sorted by descending population, then quadrant.
- &quadrant=NW can be set to a 16,000 x 10,000 metre quadrant. Values are NW, NE, SW, SE.
- For extra granularity, any quadrant can be subdivided into 8,000 x 5,000 m. sub quadrants such as &quadrant=NW3. Values are the quadrant itself and a number from 1 - 4.
- &min=1 can be set from 0 to 999 and filters out any populated centre below the minimum value. The default is 1.
- &limit=25 can be set from 1 to 128 and determines the maximum number returned. The default is 128.
- See API #2 for returned data. Additionally, the quadrant is returned.
- This API is terse and any errors result in a 400 or 404 HTTP response.
API #6 - Victoria Cross Recipients
api.tmapper.com/vcnearby.php?lat=50.020749&lon=2.695609&radius=3750
- This simple API returns a list of Victoria Cross recipients within a radius of a given location.
- This API covers recipients world-wide.
- Data returned is id, recipient, unit, date, location, outcome - died or survived, direct link to Wikipedia entry, Wikipedia Unit article.
- Distance is not displayed - the source data is a general guide to the unit location, not to the action itself.
- Data is sorted by locality, then recipient.
- A maximum of 128 records are returned.
- See API #2 for radius options.
- This API is terse and any errors result in a 400 or 404 HTTP response.
API #7 - Commonwealth War Grave Commission (CWGC) Data
api.tmapper.com/cwgc.php?lat=50.293186&lon=2.774403&radius=4000
- This simple API returns a list of cemeteries and memorials within a radius of a given location.
- Data returned is id, distance (in metres), name, region & country, type (eg Military Cemetery Extension), number of WW1 casualties, latitude, longitude, CWGC website (exact link for cemtery with WW1 casualties).
- Data is sorted by distance, then country.
- A maximum of 128 records are returned.
- See API #2 for radius options.
- This API is terse and any errors result in a 400 or 404 HTTP response.
Sub-Notes
- The lat, lon & distance are to the nearest public entrance. These are souced from driving directions Point of Interest data. In many cases this is the same as the main cemetery entrance. In a small number, there is a cemetery and separate cemetery extension off the main road. Buttes New British Cemetery, Polygon Wood is just in from the main road and has 3 separate cemeteries. We show the same lat, lon so the individul CWGC website coordinates will differ marginally from ours.
- We return the total number of WW1 casualties. The direct link to the CWGC website will display the number of identified casualties.
API #8 - Military Engagements of WW1
api.tmapper.com/battles.php?lat=50.374957&lon=2.804310
- This simple API returns a list of Military Engagements near to a given location.
- Distance is not displayed - the source data is a general guide to a very large & sometimes fluid geographical area.
- We recommend an initial radius of 10,000 metres and increment in 5 km steps to return meaningful information.
- We return the name, a direct link to the Wikipedia entry, latitude, longitude.
- This API is terse and any errors result in a 400 or 404 HTTP response.
API #9 - Quadrant Boundaries
api.tmapper.com/quadrants.php?sheet=36c&quadrant=NW3
- This simple API returns the lat, lon for the NW, NE, SE & SW vertices (corners) given a map sheet & quadrant.
- The current version only returns data for — eg NW1, NW2, NW3, NW4.
- The option dms=1 converts decimal degrees into degree, minute, second — 50° 29' 57.9".
- This API is terse and any errors result in a 400 or 404 HTTP response.
Acknowledgements
All content on this website is © tMapper 2020
Data is sourced from Public Domain, original Copyrighted Material or under Creative Commons
- Gazetteer of the Western Front, originally courtesy of John Reed, updated 2016 - 2020. WW1 place names, farms, communes, villages etc. Used under license.
- Trench Names from tMapper, original source hand scanned maps.
- Contemporary locations, farms, hydrographic features and parks from GeoNames, original source French & Belgian government data.
- Contemporary population and elevation from GeoNames, original source government census and NASA data.
- Populated centres within sheet and quadrant boundaries from tMapper.
- Victoria Cross data from Wikimedia Foundation via Wikipedia.
- Commonwealth War Graves Commission statistical data from CWGC.
- Military Engagements of World War One from Wikimedia Foundation Wikipedia.
- CWGC location data, Military Engagements & VC recipients sourced from Oxford University World War One Centenary Project under a Creative Commons license.