7

I am an editor at Wikivoyage (world travel guide), and for each city we list all embassies and consulates available in that city. Our problem is that this information quickly becomes out-of-date.

Where to find up-to-date information about embassies and consulates of all countries, in all cities?

For each item, we would need (in order of importance):

  • Country that runs the embassy/consulate
  • Address in which the embassy/consulate is (at least city/country)
  • Name (for instance "Consulate General of Germany" or "Taipei Economic and Cultural Office"). Bonus if the name is available in various languages (local language, country's language, others)
  • Website
  • Latitude/longitude
  • Phone
  • Office hours

Data must be reusable under the Creative Commons Attribution-ShareAlike License.

Nicolas Raoul
  • 8,426
  • 5
  • 28
  • 61

4 Answers4

8

For a wider listing of diplomatic entities, consider using Open Street Maps.

For example, you can use the Tag: amenity=embassy. This data source includes the following dimensions:

 "lat"
 "lon"
  "tags": {
    "addr:city"
    "addr:country"
    "addr:housenumber"
    "addr:postcode"
    "addr:street"
    "amenity"
    "contact:email"
    "contact:fax"
    "contact:phone"
    "country"
    "name"
    "name:de"
    "name:en"
    "name:fr"
    "opening_hours"
    "website"}

With 5,600 objects including consulates, missions, embassies (as of Dec 2014).

enter image description here

To test it out, you can use the overpass-turbo API.

enter image description here

And the corresponding JSON data:

enter image description here

philshem
  • 17,647
  • 7
  • 68
  • 170
  • Wonderful! So, if I understand correctly, the Argentinian embassy in Switzerland is the consulate-tagged item that has country=AR and addr:country=CH. Unfortunately consulates don't seem to enjoy the same success, with only 57 occurrences: http://taginfo.openstreetmap.org/tags/amenity=consulate#overview – Nicolas Raoul Dec 08 '14 at 11:34
  • 1
    Yes, that's the Argentinian Embassy in Bern, Switzerland. I think many consulates are tagged with amenity=embassy (i.e. http://www.openstreetmap.org/way/24525106 ). Data quality can only improve for this type of project! – philshem Dec 08 '14 at 12:12
  • I've tried to used OSM, but it appears that a lot of the data is broken. Out of those 5,600 objects, only ~1,100 appear to have a country and target to them. Also TagInfo doesn't actually have any data for the tags that Embassies use... – user2361174 Feb 08 '17 at 05:02
7

Wikidata has a lot of data about embassies and consulates.

I created a Python+SPARQL script that pulls that data and maintains an easy-to-consume CSV file. You can download the CSV file at https://database-of-embassies.github.io.

Data sample:

operator;operatorQID;jurisdictions;jurisdictionQIDs;country;countryQID;city;cityQID;address;latitude;longitude;phone;email;website;facebook;twitter;youtube;picture;pictureAuthor;pictureLicense;pictureLicenseURL;type;typeQID;creation;QID
Afghanistan;http://www.wikidata.org/entity/Q889;Austria;http://www.wikidata.org/entity/Q40;Austria;http://www.wikidata.org/entity/Q40;Vienna;http://www.wikidata.org/entity/Q1741;;48.2018;16.3738;;;http://www.afghanistan-vienna.org;;;;;;;;embassy;http://www.wikidata.org/entity/Q3917681;;http://www.wikidata.org/entity/Q104602592
France;http://www.wikidata.org/entity/Q142;United States of America;http://www.wikidata.org/entity/Q30;United States of America;http://www.wikidata.org/entity/Q30;Washington, D.C.;http://www.wikidata.org/entity/Q61;;38.9137;-77.0779;+1-202-944-6000;;http://www.ambafrance-us.org/;FranceInTheUs;franceintheus;UCbq_AyHPdsFDCFgGrjSeMKQ;http://commons.wikimedia.org/wiki/Special:FilePath/France%2C%20Washington.JPG;;CC-BY-SA-3.0;http://creativecommons.org/licenses/by-sa/3.0/;embassy;http://www.wikidata.org/entity/Q3917681;;http://www.wikidata.org/entity/Q2841718

The GitHub page also lists things that you can easily do to help improve the data.

I would say the Wikidata data is more structured than OpenStreetMap data, for instance consulates are clearly marked as such. The CSV file currently contains 6365 diplomatic representations, though not all with coordinates.

enter image description here

License: Public domain

A nice plus is the pictures, which can for instance be used as thumbnails:

enter image description here

The URL, license, author of each embassy/consulate's picture are also present as columns in the CSV file.

Nicolas Raoul
  • 8,426
  • 5
  • 28
  • 61
6

Official lists maintained by government bodies:

United States

The dc.gov (Washington, DC) has a dataset for all embassies in Washington, DC:
http://data.octo.dc.gov/metadata.aspx?id=77

This data.gov dataset lists all US embassies/consulates in the World:
https://catalog.data.gov/dataset/country-specific-information

Canada

This open.canada dataset lists all Canadian embassies/consulates in the world:
http://open.canada.ca/data/en/dataset?keywords=Embassies

This dataset gives details on Canada embassies/consulates in the US:
http://can-am.gc.ca/offices-bureaux/index.aspx?lang=eng

You can get a quarterly publication from the Canadian government on all embassies/consular in Canada via email by subscribing here:
http://w03.international.gc.ca/Protocol-Protocole/archives.aspx?lang=eng

Australia

This data.gov.au dataset lists all Embassies/Consulars in Australia:
https://data.gov.au/dataset/national-consular-missions-database

This government site lists the location of all Australian embassies/consulates in the world:
http://www.dfat.gov.au/missions/

United Kingdom

This data.gov.uk dataset lists all the locations of UK Embassies/Consulates in the World:
http://data.gov.uk/dataset/uk-foreign-post-locations

China

Chinese Embassies:
http://www.fmprc.gov.cn/mfa_eng/wjb_663304/zwjg_665342/2490_665344/

Chinese Consulates General:
http://www.fmprc.gov.cn/mfa_eng/wjb_663304/zwjg_665342/2498_665360/

United Nations?

My opinion, if the UN does not provide/maintain such a dataset (I have not seen one), then you will be dependent on getting up-to-date information on a per country basis.

Nicolas Raoul
  • 8,426
  • 5
  • 28
  • 61
Andrew - OpenGeoCode
  • 8,657
  • 17
  • 28
2

Just to detail my findings about Andrew's first link (embassies in Washington, DC):

The data file can be found at http://geospatial.dcgis.dc.gov/dc_kmz/Culture_and_Society/DCG9_Miscellaneous_EmbassyPt/DCG9_Miscellaneous_EmbassyPt/DCG9_Miscellaneous_EmbassyPt.kmz

Once unzipped, open the doc.kml file, it contains such an item for each embassy:

<Placemark id="497" >
 <description>
  <![CDATA[
   <style type="text/css">HTML{font-family: Arial;font-size: 14px;}.popupBackground{width: Auto;height: Auto;margin: 10px 10px 10px;background-repeat: no-repeat;}.TOCName{text-align: center;font-weight: bold;margin-bottom: 10px;}.contentDiv{height: Auto;width:350px;}.leftSpan{width: 200px;float:left;}.rightSpan{}.dataGrid{border-collapse: collapse;padding: 1px;margin-bottom: 8px;}.dataGrid, .dataGrid th, .dataGrid td{border: solid 1px #bfbfbf;padding: 1px 1px 1px 1px;}.dataGridLeftTD{width: 150px;}.dataGridRightTD{}.bottomLinks{color: #365f91;text-decoration: underline;cursor: pointer;white-space:nowrap;}.ProvidedBy{white-space:nowrap;}</style>
   <div class="popupBackground"><div class="contentDiv"><div class="TOCName">Embassies </div><div><span class="leftSpan">Feature Class Name:</span> <span class="rightSpan">EmbassyPt </span></div><div style="margin-bottom: 8px;"><span class="leftSpan">Last Data Update:</span> <span class="rightSpan">20130704</span></div>
   <table class="dataGrid" width="100%">
   <tr><td class="dataGridLeftTD">COUNTRY</td><td class="dataGridRightTD">Yemen</td></tr>
   <tr><td class="dataGridLeftTD">ADDRESS</td><td class="dataGridRightTD">2319 WYOMING AVENUE NW</td></tr>
   <tr><td class="dataGridLeftTD">CITY</td><td class="dataGridRightTD">Washington</td></tr>
   <tr><td class="dataGridLeftTD">STATE</td><td class="dataGridRightTD">DC</td></tr>
   <tr><td class="dataGridLeftTD">TELEPHONE</td><td class="dataGridRightTD">(202) 965-4760</td></tr>
   <tr><td class="dataGridLeftTD">EMBASSY TITLE</td><td class="dataGridRightTD">Embassy of the Republic of Yemen</td></tr>
   </table>
   <table border="0" width="100%">
   <tr><td><img src="http://geospatial.dcgis.dc.gov/DC_KMZ/dclogo.gif"  alt="DCGIS" border="none" /></td><td class="ProvidedBy" style="text-align: right">Provided By:</td><td class="bottomLinks"><a href='http://dcgis.dc.gov' target='_blank' >DC GIS</a></td><td class="bottomLinks"><a href="#497;flyto">Fly To Me</a></td></tr>
   </table></div>
  ]]>
 </description>
 <Snippet maxLines="0"></Snippet>
 <styleUrl>#Style_0</styleUrl>
 <Point  id="g177">
  <altitudeMode>clampToGround</altitudeMode>
  <coordinates>-77.0513058292769,38.9172415955323,0</coordinates>
 </Point>
</Placemark>
Nicolas Raoul
  • 8,426
  • 5
  • 28
  • 61