Run Dataview Query
dataview.queryRun custom Dataview Query Language (DQL) queries on your Obsidian vault to filter, list, or table notes, tasks, and metadata using advanced criteria beyond preset tools.
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 | |||