Run Dataview Query
dataview.queryExecute custom Dataview Query Language (DQL) queries on your Obsidian vault via the Local REST API. Use for queries not covered by simpler list-by-tag or table helpers.
Instructions
Execute an arbitrary Dataview Query Language (DQL) query through the Obsidian Local REST API. The query string is raw DQL — e.g. LIST FROM #inbox, TASK WHERE !completed, TABLE file.mtime FROM "Journal". Requires the Dataview plugin to be enabled in Obsidian and the Local REST API plugin to be configured (OBSIDIAN_API_URL/OBSIDIAN_REST_API_KEY). For common patterns (list-by-tag, list-by-folder, table) the sugar tools dataview.listByTag/listByFolder/table are easier to use — prefer those when applicable and fall back to dataview.query for custom DQL.
Operates on the session-active vault (see vault.current — selectable via vault.select) unless an explicit vaultPath argument is passed, which always wins.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | A Dataview Query Language (DQL) string. Examples: `LIST FROM #inbox`, `TASK FROM "Journal" WHERE !completed`, `TABLE file.ctime, priority FROM #projects`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||