What is the Obsidian API?
The Obsidian API is a set of TypeScript definitions that give you access to Obsidian’s core functionality. It allows you to interact with the vault, workspace, metadata, and UI components to create powerful extensions that enhance the Obsidian experience. This API follows Obsidian’s release cycle and is continuously updated to support the latest features. The current version provides type-safe access to all public interfaces, classes, and methods available in Obsidian.What You Can Build
With the Obsidian API, you can create:Custom Commands
Add new commands to the command palette with custom keyboard shortcuts and context-aware behavior.
Editor Extensions
Enhance the editor with CodeMirror 6 extensions, custom suggestions, and markdown post-processing.
Custom Views
Register new view types to display custom UI panes and visualizations within Obsidian.
Vault Interactions
Read, write, and manage files and folders programmatically with full access to the vault.
UI Components
Add ribbon icons, status bar items, settings tabs, and custom modals to the Obsidian interface.
Metadata Processing
Access cached metadata including headings, links, embeds, tags, and blocks for advanced processing.
Key Capabilities
Core Modules
The Obsidian API is organized into major modules that you access through theApp interface:
App- The global object that owns everything else. Access viathis.appin your pluginVault- Interface for interacting with files and folders in the vaultWorkspace- Interface for interacting with panes and the screen layoutMetadataCache- Contains cached metadata about each markdown file (headings, links, embeds, tags, blocks)FileManager- High-level file operations and link management
Plugin Features
By extending thePlugin class, you can:
- Add ribbon icons with
this.addRibbonIcon - Add status bar elements with
this.addStatusBarItem - Register global commands with
this.addCommand - Add settings tabs with
this.addSettingTab - Register custom views with
this.registerView - Save and load plugin data with
this.saveDataandthis.loadData - Register event handlers that auto-cleanup on unload
- Register CodeMirror 6 extensions for editor enhancements
- Handle obsidian:// protocol URLs
The Plugin class extends Component, which provides automatic lifecycle management for event handlers, intervals, and DOM events through
registerEvent, registerInterval, and registerDomEvent.Type Safety
All API interfaces are fully typed, providing:- IntelliSense and autocomplete in your IDE
- Compile-time type checking
- Inline documentation with JSDoc comments
- Version-specific API annotations using
@sincetags
Official Resources
Official Documentation
Browse the complete Plugin API documentation
Sample Plugin
Start with the official plugin template
Developer Forum
Ask questions and request new API features
GitHub Repository
View the source code and contribute
Next Steps
Install the API
Add the Obsidian API types to your project with npm, yarn, or pnpm.View Installation Guide →
Build Your First Plugin
Follow our quickstart guide to create a working plugin in minutes.Start Quickstart →