Wikivoyage:Cooperating with Wikidata

This page is an incubator for ideas on how to work with Wikidata. This is not a policy document.



Wikidata is a shared repository of information used by all Wikimedia projects. It contains the following shared data that is used on Wikivoyage:

  • Other project links - The "In other projects" menu in the sidebar on the left is populated from Wikidata and provides links to articles on the same subject in different Wikimedia projects.
  • Other language links - The "In other languages" menu in the sidebar on the left is populated (in part) from Wikidata and provides links to articles on the same subject in different language versions of Wikivoyage.
  • Page banners - Currently default page banners are stored in Wikidata, although the default value is often overridden by specifying a banner image in the Wikivoyage article.

See Special:UnconnectedPages for a list of all Wikivoyage articles that are missing a corresponding record in Wikidata - these articles should either be added to existing Wikidata records (when an appropriate record exists), or else new records should be created.

Listings database


If our listings were moved to Wikidata, updates to their details (or open/closed status) could be shared across language versions. It could also allow us to collect multilingual reviews.



We list country statistics, such as population and currency, in the quickbar. If these were replaced with a Wikidata link, we wouldn't have to worry about updating these figures. There are Wikidata fields (like P1622, driving side) which are not in the current quickbar but may be useful for travel. French Wikivoyage has a city-level {{Info Ville}} which consolidates a mapframe and a quickbar; currently some fields can display a Wikidata property as a default. Our {{mapframe}} and {{geo}} might be able to re-use P625:Coordinates (but not much else) if the dynamic map were made Wikidata-aware. See d:Wikidata:Wikivoyage/Resources#Properties for other common page templates.

An initial test was run with a few {{quickbar}} fields in the Andorra article. Efforts are being made to create Wikidata properties for many of the remaining {{listing}} or quickbar-like fields, see d:Wikidata:Wikivoyage/Resources.


Article geolocation


For each destination article: latitude, longitude.

Additionally, a "zoom level", or approximate size of the destination, would be needed. For instance, Greenland is bigger than Paris, which has a great impact on mapping applications.

  • On Wikivoyage: {{geo|35.660000|139.730000|zoom=15}}
  • On Wikidata:
P625 coordinate location - Only latitude/longitude, no zoom level
P242 locator map image - Link to a commons geographic map image which highlights the location of the subject
P1621 detail map - Link to a Commons map containing details about the entire location

The {{geo}} tag is used by the "destinations" layer on the dynamic map, much as {{listing}} and {{marker}} are used by the "points of interest" layer and the {{mapframe}} is used by the "GPX tracks/map mask" layer. The dynamic map code is not currently Wikidata-aware and expects the data to be directly in the article Mediawiki templates.


See also: Wikivoyage_talk:Listings#Wikidata_item_number_.3F

This is an example; see d:Wikidata:Wikivoyage/Resources#Properties for listings for a full set of {{listing}} fields in various Wikivoyage projects. Example Wikivoyage/Wikidata:

Current listing:

 | name=National Art Center Tokyo | alt=国立新美術館 | wikidata=Q1362638 | url= | email=
 | address=7-22-2 Roppongi | lat=35.66483 | long=139.72685 | directions=Nogizaka stn, exit 6
 | phone= | tollfree= | fax= | image=The_National_Art_Center,_Tokyo_(cropped).jpg
 | hours=W–M 10:00–18:00 | price=Entry fees vary by exhibition, some are free
 | content=Tokyo's latest and greatest art museum, housed in an undulating wave-shaped building designed by Kisho Kurokawa and devoted entirely to changing exhibitions.}}

What can be reused from Wikidata?

Example: 35°39'55.01"N, 139°43'34.82"E

We have to split and transform them to decimal (if in DMS - degrees, minutes, seconds), and reuse as lat and long. Note that French Wikivoyage already has templates for accessing the latitude and longitude for the current page (imported from another Wikivoyage and implemented in Lua I think). Maybe some parsing code could be reused.

Example: National Art Center Tokyo 2008.jpg

Reusable directly as image. As this is part of the dynamic map data, the same requirements that the dynamic map server find the data in the on-page local listing apply as for (lat, long).


It is in the local language of the item, so only reuse as url if no value is present in the listing.



Example: National Art Center Tokyo

This can come from the wikidata labels. It is a bit different from other properties as there is a label for each language, but most probably accessible. We have to choose the Wikivoyage language.

wikidata allows aliases to be added in any language and wikidata uses these like redirects to help the search function on wikidata. 'Alt' info from wikivoyage can be added here.

P1448 Official Name is a wikidata property for the name in the local language which might be worth adding to the listing.



This is trickier. There are a few properties that can be used as fragments to reconstitute address:


See also Property:P276: location.



Some Wikivoyages use a standard format, they will probably push it into a new Wikidata property. Even if the English Wikivoyage does not adopt the standard, we can re-use it when we have no hours information locally.



No interlanguage standard seems to have appeared yet. Simple cases (just value and currency) could be a great target for collaboration, though.



Seems reusable, except for case when there are several (for instance for TTY/TDD).



Not reusable.

Interoperability with other software


Dynamic mapping


The dynamic map software expects the (lat, long) pairs to be in the individual listings on each page. Moving the data to Wikidata would break things; conversely, using Wikidata as a source of co-ordinates to be copied into the local wiki by some automated process could be helpful to the project.

In the long term, though, all tools should be migrated to download coordinates from Wikidata.

The dynamic map is also capable of displaying a bubble (like a cartoon-style caption) for one individual POI when its marker is clicked. That bubble currently displays the name= and image= fields from the {{listing}}. We don't display anything else there. In future, it may be desirable to add more info (maybe amenity-style icons to indicate availability of everything from wheelchair ramps to a Wikipedia article to wi-fi) to this bubble.

Wikidata:Wikivoyage/Resources lists P18:image for the list of images, but the map software expects the image= field to be directly in the listing.

Listing editor


The listing editor had long been notorious for removing any fields from listing templates which it does not recognise, including {{listing|wikidata=Q...}}. This is now fixed; there is limited support for looking up thumbnail image, Wikipedia article and (lat, long) co-ordinates if the user provides a Wikidata record Q-number. The reverse lookup (find the Wikidata entry, given the title of the Wikipedia article or another unique identifier) is not yet supported.

There is potential to create an improved listing editor which would populate the information for a venue from a Wikidata item instead of requiring it be entered manually. One day the listing editor will edit the wikidata item from inside the various wikivoyages so any changes on one are available to all.

Robot scripts


While there are currently no Wikidata-aware scripts in use, it may be worthwhile to create one which finds listings with a wikipedia= or wikidata= link that are missing data from other fields, such as lat/long and address. The script could copy the missing data from Wikidata into the local listing - useful as dynamic maps must obtain co-ordinates from the local wikitext.

Another possibility might be for a script to find the Wikidata page for a listing based on existing data; for example, the "Musée du Louvre" is listed in Paris/1st arrondissement at téléphone +33 1 40 20 53 17. Retrieve the French-language version of the same article fr:Paris/1er arrondissement, extract the listing with the same phone number (+33 1 40 20 53 17) and get a link to 'Wikipédia en français' w:fr:Musée du Louvre. That article links to Wikidata at d:Q19675 (musée du Louvre), so add 'wikidata=Q19675' to any or all of the Wikivoyage listings for the museum.

(Any attempt to use telephone numbers as unique identifiers will have to detect numbers which appear in multiple listings - such as the hotel chain reservation numbers - and add them to an 'ignore' list. This is one reason we need the 'wikidata=' field, unlike the other contact info, it's a guaranteed-unique identifier.)

Wikivoyage in other languages


Transvoyage script


The French-language Wikivoyage has a script,, which serves as an aid to translators adapting our articles. Its original author intended it as a temporary solution while waiting for Wikidata listings. It replaces common {{listing}} field names (address becomes adresse, for instance) and section headers (see becomes voir). When this script is made Wikidata-aware, it could extract useful info (such as a link from the new fr.Wikivoyage listing to an article on fr.Wikipédia about the individual venue) which isn't in the original English-language destination guide but is retrievable by following en.voy's pointer to a Wikidata item.

Mashups and third-party reuse


A link from individual {{listing}}s to Wikidata may be useful to third-party bundles. As one example, WikiSherpa is a mashup of WP, WV and OSM. A link from the WV listing to Wikidata would give lat/long (for the OpenStreetMap inclusion) and each language Wikipedia article for a venue (for the WP inclusion). This could greatly aid re-use in derivative works that draw from multiple projects.

When the listing info is in wikidata it is available to access other ways besides accessing it via a wikivoyage page. Expect most mapping apps to have a 'wikivoyage' overlay which shows every location with a listing with different cute symbols for See/Eat/Sleep listings. Just touch to see the listing for an item, localised into 200 different languages. (Basic Localisation just requires the names of the listing headings to be translated)



OpenStreetMap objects can be tagged with the equivalent Wikidata ID. This can then be used to display the outline of the item, on a slippy map, on a wiki page, using <mapframe> See more, including examples, on: mw:Help:Extension:Kartographer#Getting started.

See also