Wikidata:SPARQL query service/Wikidata Query Help/SPARQL Editor
Jump to navigation
Jump to search
This page helps you to understand the SPARQL editor on Wikidata Query.
Code Completion
The code completion (default shortcut CTRL + Space / CTRL + ALT + Space / ALT + Enter) helps you with writing your SPARQL query.
It knows some SPARQL syntax and can also help you find the right Property or Item ID.
Auto complete SPARQL
- Write for example SELECT
- Hit CTRL + Space
Auto complete Item ID
- Write for example wd:
- Hit CTRL + Space
- Type to search for a specific item
Tooltip
- Hover over Wikidata ID like Q146
- Tooltip is shown
When hovering an Item or Property ID a tooltip shows more information.
Editor Toolbar
- expand icon allows you to switch to full-screen mode. You can exit this mode by pressing the "escape" key
- pin icon shows you the useful prefixes you may want to use in your query
- folder icon is another way to display the queries examples
- previous icon allows you to go back to the previous query you wrote (the content is stored in the local storage of your browser, so you can also find back the last query you wrote before closing the tab or browser)
- bin icon deletes the whole content of the editor (if you do this by mistake, don't panic, use the previous button to get your query back ^^)
- chain icon displays the short URL of your query
- play button run query
Shortcuts
If "CTRL+Space" doesn't work (on macOS, for example), there are two alternative shortcuts: "CTRL+ALT+Space" and "ALT+Enter".
The equivalent keyboard shortcuts on a Mac are Control-Space, Control-Option-Space, and Option-Enter (with a portable or wireless keyboard, the last can be entered while holding the Function key, with Fn-Option-Return).