SlideShare a Scribd company logo
1 of 26
Download to read offline
Wikimedia APIsLucie-Aimée Kaffee
[[User:Frimelle]]
Find the slides here:
https://tinyurl.com/qemwbfh
Wikimedia APIs
Wikipedia
Wikidata
Wikimedia Commons
Wikiquote
Wikisource
...
Introduction to the APIs
of Wikimedia projects
MediaWiki
(Wikipedia)
MediaWiki
is the software behind the
Wikimedia projects like
Wikipedia
index.php
api.php
RESTbase
index.php
Get the content of a Wikipedia Page
→ as Wikitext
https://en.wikipedia.org/w/index.php?action=raw&title=Alan_Turing
→ as HTML
https://en.wikipedia.org/wiki/Alan_Turing?action=render
_Turing
api.php
→ every MediaWiki has an api, to be found at:
https://en.wikipedia.org/w/api.php
→ documentation:
https://www.mediawiki.org/wiki/API:Main_page
https://rest.wikimedia.org/en.wikipedia.org/v1/?doc#/
→ documentation: https://www.mediawiki.org/wiki/RESTBase
RESTbase
Wikidata
the free knowledge base with
14,958,963 data items that anyone
can edit
Short introduction
→ free knowledge base by the Wikimedia movement
→ structured data
→ user created content
→ linked data
→ people, places, events, …
→ powered by Wikibase (open source)
→ data: CC-0
https://www.wikidata.
org/wiki/Q7251
item
Qid
labels en label
de Bezeichner
…….....
statements
statement
property value
…….....
…….....
…….....
qualifiers
property value
property value
…….....
references reference property value
…….....
…….....
descriptions / aliases / sitelinks
WikidataDataModel
Accessing
Wikidata’s data
Per Item Access
API
SPARQL Endpoint
Wikidata Query (WDQ)
Dumps
https://www.wikidata.
org/wiki/Wikidata:
Data_access
Per Item Access
→ data of for single item can be retrieved via
http://www.wikidata.org/wiki/Special:EntityData/Q7251
→ to get the data of the item in .json format
http://www.wikidata.org/wiki/Special:EntityData/Q7251.json
→ other possible formats:
.rdf, .ttl or .nt
Wikidata API
→ get the data of a single item
https://www.wikidata.org/w/api.php?
action=wbgetentities&ids=Q7251&format=json
→ wbgetentities, wbgetclaims, wbsearchentites
→ Sandbox: wikidata.org/wiki/Special:ApiSandbox
→ additional documentation: mediawiki.org/wiki/Wikibase/API
SPARQL Endpoint
https://query.wikidata.org/
→ complex queries with SPARQL
→ SPARQL? SPARQL! http://tinyurl.
com/nlsoqxf
→ documentation: https://www.
mediawiki.
org/wiki/Wikidata_query_service/Use
r_Manual
→ example: All items, that have
their date of birth (P569) today
http://tinyurl.com/nfeskmf
Wikidata Query and Database Dumps
→ Wikidata Query (WDQ) helps to run
complex queries in another query
language
https://wdq.wmflabs.org/
→ there are Wikidata database dumps
in json (recommended), XML and RDF
https://www.wikidata.
org/wiki/Wikidata:Database_download
Wikimedia Commons
a database of 28,765,395 freely
usable media files to which anyone
can contribute
https://commons.wikimedia.org
Wikimedia Commons API
→ example image URL
https://upload.wikimedia.org/wikipedia/commons/1/17/LuciePixelated.png
→ get a certain image with a set size and metadata like the
license
https://tools.wmflabs.org/magnus-toolserver/commonsapi.php
→ documentation
https://commons.wikimedia.org/wiki/Commons:Commons_API
Examples
Wikidata Game
http://tools.wmflabs.org/wikidata-game/#
→ improve Wikidata’s data in a quick and simple game
Guess the Quote
http://fuzzle.me/guess-the-quote/
→ get your books from inventaire.io (which is build on
Wikidata) including Wikidata entity Id, title and cover link
to Wikimedia Commons
→ check the Item Ids of the books and get their Wikiquote
sitelink via the Wikidata API
→ get a random quote from Wikiquote using https://github.
com/natetyler/wikiquotes-api
Contact me!
lucie.kaffee@wikimedia.de
@frimelle
Thank you!
Presentation:
http://tinyurl.com/qemwbfh
Lucie-Aimée Kaffee
CC-BY-SA
numbers as of 23.10.15

More Related Content

Similar to Wikimedia Game Jam 20015: Wikimedia APIs

Wikipedia Day 2011 Talk
Wikipedia Day 2011 TalkWikipedia Day 2011 Talk
Wikipedia Day 2011 TalkMark Reynolds
 
Web2.0 2012 - lesson 5 - wiki
Web2.0 2012 - lesson 5 - wikiWeb2.0 2012 - lesson 5 - wiki
Web2.0 2012 - lesson 5 - wikiCarlo Vaccari
 
Open Knowledge Management
Open Knowledge ManagementOpen Knowledge Management
Open Knowledge ManagementFrieda Brioschi
 
DM110 - Week 3 - Wikis
DM110 - Week 3 - WikisDM110 - Week 3 - Wikis
DM110 - Week 3 - WikisJohn Breslin
 
MySQL at Wikipedia: How we do relational data at the Wikimedia Foundation
MySQL at Wikipedia: How we do relational data at the Wikimedia FoundationMySQL at Wikipedia: How we do relational data at the Wikimedia Foundation
MySQL at Wikipedia: How we do relational data at the Wikimedia FoundationJaime Crespo
 
Lessons learned from Semantic Wiki
Lessons learned from Semantic WikiLessons learned from Semantic Wiki
Lessons learned from Semantic WikiJie Bao
 
Wikidata and Semantic MediaWiki
Wikidata and Semantic MediaWiki Wikidata and Semantic MediaWiki
Wikidata and Semantic MediaWiki Bernhard Krabina
 
Enabling cross-wikis integration by extending the SIOC ontology
Enabling cross-wikis integration by extending the SIOC ontologyEnabling cross-wikis integration by extending the SIOC ontology
Enabling cross-wikis integration by extending the SIOC ontologyFabrizio Orlandi
 
Technologie Proche: Imagining the Archival Systems of Tomorrow With the Tools...
Technologie Proche: Imagining the Archival Systems of Tomorrow With the Tools...Technologie Proche: Imagining the Archival Systems of Tomorrow With the Tools...
Technologie Proche: Imagining the Archival Systems of Tomorrow With the Tools...Artefactual Systems - AtoM
 
BAAC conference 2018 - Wikimedia keynote
BAAC conference 2018 - Wikimedia keynoteBAAC conference 2018 - Wikimedia keynote
BAAC conference 2018 - Wikimedia keynoteSandra Fauconnier
 
GDG Meets U event - Big data & Wikidata - no lies codelab
GDG Meets U event - Big data & Wikidata -  no lies codelabGDG Meets U event - Big data & Wikidata -  no lies codelab
GDG Meets U event - Big data & Wikidata - no lies codelabCAMELIA BOBAN
 
Linked open data with Semantic MediaWiki - ENDORSE 2021
Linked open data with Semantic MediaWiki - ENDORSE 2021Linked open data with Semantic MediaWiki - ENDORSE 2021
Linked open data with Semantic MediaWiki - ENDORSE 2021Bernhard Krabina
 
Semantic Tagging for the XWiki Platform with Zemanta and DBpedia
Semantic Tagging for the XWiki Platform with Zemanta and DBpediaSemantic Tagging for the XWiki Platform with Zemanta and DBpedia
Semantic Tagging for the XWiki Platform with Zemanta and DBpediaElena-Oana Tabaranu
 
2014 05-21 poster on ORCID identifiers in Wikipedia, Wikidata & sister projects
2014 05-21 poster on ORCID identifiers in Wikipedia, Wikidata & sister projects2014 05-21 poster on ORCID identifiers in Wikipedia, Wikidata & sister projects
2014 05-21 poster on ORCID identifiers in Wikipedia, Wikidata & sister projectsAndy Mabbett
 
Sgmp Wiki - GenNxt Wiki Concepts
Sgmp Wiki - GenNxt Wiki ConceptsSgmp Wiki - GenNxt Wiki Concepts
Sgmp Wiki - GenNxt Wiki Conceptsprasadburra
 
DBpedia Tutorial - Feb 2015, Dublin
DBpedia Tutorial - Feb 2015, DublinDBpedia Tutorial - Feb 2015, Dublin
DBpedia Tutorial - Feb 2015, Dublinm_ackermann
 

Similar to Wikimedia Game Jam 20015: Wikimedia APIs (20)

Wikipedia Day 2011 Talk
Wikipedia Day 2011 TalkWikipedia Day 2011 Talk
Wikipedia Day 2011 Talk
 
Web2.0 2012 - lesson 5 - wiki
Web2.0 2012 - lesson 5 - wikiWeb2.0 2012 - lesson 5 - wiki
Web2.0 2012 - lesson 5 - wiki
 
Open Knowledge Management
Open Knowledge ManagementOpen Knowledge Management
Open Knowledge Management
 
Fantastic Two wiki's
Fantastic Two wiki'sFantastic Two wiki's
Fantastic Two wiki's
 
Fantastic Two
Fantastic TwoFantastic Two
Fantastic Two
 
DM110 - Week 3 - Wikis
DM110 - Week 3 - WikisDM110 - Week 3 - Wikis
DM110 - Week 3 - Wikis
 
MySQL at Wikipedia: How we do relational data at the Wikimedia Foundation
MySQL at Wikipedia: How we do relational data at the Wikimedia FoundationMySQL at Wikipedia: How we do relational data at the Wikimedia Foundation
MySQL at Wikipedia: How we do relational data at the Wikimedia Foundation
 
Lessons learned from Semantic Wiki
Lessons learned from Semantic WikiLessons learned from Semantic Wiki
Lessons learned from Semantic Wiki
 
Wikidata and Semantic MediaWiki
Wikidata and Semantic MediaWiki Wikidata and Semantic MediaWiki
Wikidata and Semantic MediaWiki
 
Linked Open Data stuff
Linked Open Data stuffLinked Open Data stuff
Linked Open Data stuff
 
Enabling cross-wikis integration by extending the SIOC ontology
Enabling cross-wikis integration by extending the SIOC ontologyEnabling cross-wikis integration by extending the SIOC ontology
Enabling cross-wikis integration by extending the SIOC ontology
 
Technologie Proche: Imagining the Archival Systems of Tomorrow With the Tools...
Technologie Proche: Imagining the Archival Systems of Tomorrow With the Tools...Technologie Proche: Imagining the Archival Systems of Tomorrow With the Tools...
Technologie Proche: Imagining the Archival Systems of Tomorrow With the Tools...
 
BAAC conference 2018 - Wikimedia keynote
BAAC conference 2018 - Wikimedia keynoteBAAC conference 2018 - Wikimedia keynote
BAAC conference 2018 - Wikimedia keynote
 
GDG Meets U event - Big data & Wikidata - no lies codelab
GDG Meets U event - Big data & Wikidata -  no lies codelabGDG Meets U event - Big data & Wikidata -  no lies codelab
GDG Meets U event - Big data & Wikidata - no lies codelab
 
Linked open data with Semantic MediaWiki - ENDORSE 2021
Linked open data with Semantic MediaWiki - ENDORSE 2021Linked open data with Semantic MediaWiki - ENDORSE 2021
Linked open data with Semantic MediaWiki - ENDORSE 2021
 
Semantic Tagging for the XWiki Platform with Zemanta and DBpedia
Semantic Tagging for the XWiki Platform with Zemanta and DBpediaSemantic Tagging for the XWiki Platform with Zemanta and DBpedia
Semantic Tagging for the XWiki Platform with Zemanta and DBpedia
 
2014 05-21 poster on ORCID identifiers in Wikipedia, Wikidata & sister projects
2014 05-21 poster on ORCID identifiers in Wikipedia, Wikidata & sister projects2014 05-21 poster on ORCID identifiers in Wikipedia, Wikidata & sister projects
2014 05-21 poster on ORCID identifiers in Wikipedia, Wikidata & sister projects
 
Sgmp Wiki - GenNxt Wiki Concepts
Sgmp Wiki - GenNxt Wiki ConceptsSgmp Wiki - GenNxt Wiki Concepts
Sgmp Wiki - GenNxt Wiki Concepts
 
DBpedia Tutorial - Feb 2015, Dublin
DBpedia Tutorial - Feb 2015, DublinDBpedia Tutorial - Feb 2015, Dublin
DBpedia Tutorial - Feb 2015, Dublin
 
2007 03 12 Swecr 2
2007 03 12 Swecr 22007 03 12 Swecr 2
2007 03 12 Swecr 2
 

Recently uploaded

Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineeringssuserb3a23b
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 

Recently uploaded (20)

Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineering
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Odoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting ServiceOdoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting Service
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 

Wikimedia Game Jam 20015: Wikimedia APIs