-
Notifications
You must be signed in to change notification settings - Fork 1
352 Wikidata API and Wikidata Query Service Guidlines
Wikidata API and Query Service are powerful tools for accessing structured data from Wikidata, a collaborative knowledge base. Here's a brief explanation of each and how to use them:
- The Wikidata API allows you to programmatically access and retrieve data from Wikidata.
- It provides various endpoints to perform actions such as searching for entities, fetching entity data, querying for properties, and more.
- The API supports multiple output formats like JSON, XML, and RDF.
- You can use the API to integrate Wikidata content into your applications, websites, or research projects.
- To use the Wikidata API, you need to construct HTTP requests to the appropriate endpoints, specifying the action you want to perform and any parameters required.
- For example, to search for an entity, you would construct a request to the wbsearchentities endpoint, providing the search query as a parameter.
- You can then parse the response, which will contain the requested data in the specified format.
- The Wikidata Query Service (WDQS) is a powerful tool that allows you to run complex queries against the Wikidata knowledge base using the SPARQL query language.
- SPARQL (SPARQL Protocol and RDF Query Language) is a query language for querying RDF (Resource Description Framework) data.
- With WDQS, you can retrieve structured data from Wikidata according to your specific criteria, such as retrieving all instances of a particular class, finding relationships between entities, or obtaining statistical information.
- WDQS provides a web-based interface where you can compose and execute SPARQL queries, as well as an API endpoint for programmatic access.
To use the Wikidata Query Service, you can visit the web interface at https://query.wikidata.org/ and compose your SPARQL queries directly in the text editor. Write your query following the SPARQL syntax, specifying the patterns you want to match and the data you want to retrieve. Execute the query, and the results will be displayed in table format on the web interface. You can also use the API endpoint programmatically by sending HTTP requests with your SPARQL query as a parameter, and parsing the JSON response. Both the Wikidata API and Query Service are invaluable resources for accessing and utilizing the vast amount of structured data available on Wikidata. Whether you're building applications, conducting research, or simply exploring knowledge, these tools provide convenient ways to interact with Wikidata's wealth of information.
- Largest cities of the world
SELECT ?cityLabel ?population ?gps
WITH {
SELECT DISTINCT *
WHERE {
?city wdt:P31/wdt:P279* wd:Q515 .
?city wdt:P1082 ?population .
?city wdt:P625 ?gps .
}
ORDER BY DESC(?population)
LIMIT 100
} AS %i
WHERE {
INCLUDE %i
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }
}
ORDER BY DESC(?population)
- Longest river of each continent
SELECT ?continent ?river ?continentLabel ?riverLabel ?maxlength
WHERE
{
{
SELECT ?continent (MAX(?length) AS ?maxlength)
WHERE
{
?river wdt:P31/wdt:P279* wd:Q355304;
wdt:P2043 ?length;
wdt:P30 ?continent.
}
GROUP BY ?continent
}
?river wdt:P31/wdt:P279* wd:Q355304;
wdt:P2043 ?maxlength;
wdt:P30 ?continent.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?continentLabel
- Locations of Pablo Picasso works
#defaultView:Map
SELECT ?label ?coord ?subj
WHERE
{
?subj wdt:P170 wd:Q5593 .
OPTIONAL {?subj wdt:P276 ?loc .
?loc wdt:P625 ?coord } .
?subj rdfs:label ?label FILTER (lang(?label) = "en")
}
- https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples
- https://query.wikidata.org/
Prepeared by Enes Baser
- Meeting Note 9 - 10.12.2024
- Meeting Note 8 - 03.12.2024
- Meeting Note 7 - 19.11.2024
- Meeting Note 6 - 12.11.2024
- Meeting Note 5 - 05.11.2024
- Feedback Meeting - 29.10.2024
- Meeting Note 4 - 15.10.2024
- Meeting Note 3 - 08.10.2024
- Meeting Note 2 - 01.10.2024
- Meeting Note 1 - 24.09.2024
- Lab Report-1 📝
- Lab Report-2 📝
- Lab Report-3 📝
- Lab Report-4 📝
- Lab Report-5 📝
- Lab Report-6 📝
- Lab Report-7 📝
- Lab Report-8 📝
- Lab Report-9 📝
- Milestone Report
- Additional Scenario & Mockups
- Final Milestone Presentation Scenario
- Requirements
- Standard Implementation Documentation
- Software Design Diagrams ✨
- Customer Feedback for Demo
- Milestone Report
- Presentation Scenario
- Software Quality Standards
- Data Population Strategy
- Customer Feedback for Demo
- Standard Implementation Documentation
- Testing Documentation
- Requirements
- Software Design Diagrams ✨
- Milestone Report
- Scenarios & Mockups 🖌️
- User Stories
- Responsibility Assigment Matrix ☑️
- Class Diagram
- Issue Creation Guidlines ❓
- Wikidata Query Service Guidlines and Resources ❓
- Communication Plan ☎️
- Requirements
352 Sidebar
- Contribution Guide
- Backend Roadmap and Resources
- Issue Creation Guidlines ❓
- Wikidata Query Service Guidlines and Resources ❓
- Communication Plan ☎️
- UI Design Images, Figma
- Requirements
- Frontend Meeting Note 5 - 16.05.2024
- Frontend Meeting Note 4 - 14.05.2024
- Backend Meeting Note 6 - 11.05.2024
- Backend Meeting Note 5 - 10.05.2024
- Backend Meeting Note 4 - 07.05.2024
- Frontend Meeting Note 3 - 07.05.2024
- Backend Meeting Note 3 - 06.05.2024
- Frontend Meeting Note 2 - 05.05.2024
- Frontend Meeting Note 1 - 29.04.2024
- Meeting Note 11 - 28.04.2024
- Backend Meeting Note 2 - 26.04.2024
- Backend Meeting Note 1 - 25.04.2024
- Meeting Note 10 - 21.04.2024
- Meeting Note 9 - 14.04.2024
- Meeting Note 8 - 04.04.2024
- Meeting Note 7 - 23.03.2024
- Customer Meeting Note - 18.03.2024
- Meeting Note 6 - 16.03.2024
- Meeting Note 5 - 12.03.2024
- Meeting Note 4 - 09.03.2024
- Meeting Note 3 - 02.03.2024
- Meeting Note 2 - 24.02.2024
- Meeting Note 1 - 18.02.2024
- Nazire Ata
- Enes Başer
- Aslı Gök
- Çağatay Çolak
- Mehmet Efe Akça
- Yiğit Memceroktay
- Ufuk Altunbulak
- Boray Kasap
- Atakan Yasar