This project enables users to write and execute SPARQL queries on Wikidata directly within an Express.js application, without needing to visit the Wikidata website.
- Execute SPARQL queries
- Retrieve and display query results in a user-friendly interface
- Built with React and Vite for a modern front-end experience
- Node.js and pnpm installed
- Basic understanding of SPARQL and Wikidata
-
Clone the repository:
git clone https://github.com/kaliacad/wqsai cd wqsai -
Install dependencies:
pnpm install
-
Start the development server:
pnpm dev
-
Open your browser and navigate to
http://localhost:5173.
To get started with querying, you can run this example SPARQL query to see the results:
SELECT ?pays ?paysLabel ?capitaleLabel ?codeISO2 WHERE {
# Trouver les instances de pays (wd:Q6256)
?pays wdt:P31 wd:Q6256.
# Filtrer pour les pays du continent africain (wd:Q15)
?pays wdt:P30 wd:Q15.
# Optionnel : obtenir la capitale
OPTIONAL { ?pays wdt:P36 ?capitale. }
# Optionnel : obtenir le code ISO 3166-1 alpha-2
OPTIONAL { ?pays wdt:P297 ?codeISO2. }
# Service pour les labels en français
SERVICE wikibase:label {
bd:serviceParam wikibase:language "fr,en".
}
}
ORDER BY ?paysLabelThis query will return African countries with their capitals and ISO codes. Simply copy and paste it into the editor and click "Run Query" to see the results.
public/- Static assetssrc/- Source code for the React front-endindex.html- Main HTML filepackage.json- Project metadata and dependenciesvite.config.js- Vite configuration
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License.
Have fun with the project!
We are deeply committed to fostering genuine open-source contributions. Consequently, we maintain a strict policy against the use of plagiarized source code. Any Pull Requests (PRs) that do not adhere to our Terms and Conditions will be identified as spam and subsequently closed by our maintainers.

