mirror of
https://github.com/qf3l3k/obsidian-data-fetcher.git
synced 2026-07-22 12:20:30 +00:00
No description
| .editorconfig | ||
| .eslintignore | ||
| .eslintrc | ||
| .gitignore | ||
| .npmrc | ||
| esbuild.config.mjs | ||
| LICENSE | ||
| main.ts | ||
| manifest.json | ||
| package.json | ||
| README.md | ||
| styles.css | ||
| tsconfig.json | ||
| version-bump.mjs | ||
| versions.json | ||
Obsidian Data Fetcher
A plugin for Obsidian that allows users to fetch data from multiple sources (REST APIs, GraphQL, gRPC, RPC) and insert the results into notes.
Features
- Support for multiple data sources:
- REST APIs
- GraphQL endpoints
- gRPC services (via REST proxies)
- RPC services
- Two modes of operation:
- Directly define queries within notes
- Predefine endpoints in settings and reference them in notes
- Automatic caching of query results to reduce redundant requests
- Cache expiration settings
- Manual refresh capabilities
- Customizable headers for authentication
Installation
From Obsidian Community Plugins
- Open Obsidian Settings
- Go to Community Plugins
- Search for "Data Fetcher"
- Click Install, then Enable
Manual Installation
- Clone the latest release from the plugin repository page
- Copy or move cloned folder into your Obsidian vault's
.obsidian/pluginsfolder - Enable the plugin in Obsidian settings
Usage
Method 1: Direct Query Definition
Create a code block with the language set to data-query and define your query in JSON format:
```data-query
{
"type": "rest",
"url": "https://api.example.com/data",
"method": "GET",
"headers": {
"Authorization": "Bearer your-token"
}
}
```
Method 2: Using Aliases
- First, define an endpoint alias in the plugin settings
- Then reference it in your notes:
```data-query
@my-api-alias
body: {"id": 123}
```
Configuration
Go to Settings > Data Fetcher to configure:
- Cache duration
- Pre-defined endpoint aliases
- Default headers
Examples
REST API Example
```data-query
{
"type": "rest",
"url": "https://jsonplaceholder.typicode.com/posts/1",
"method": "GET"
}
```
GraphQL Example
```data-query
{
"type": "graphql",
"url": "https://api.spacex.land/graphql",
"query": "{ launchesPast(limit: 5) { mission_name launch_date_local } }",
"variables": {}
}
```
Using Aliases
```data-query
@github-api
query: query { viewer { repositories(first: 5) { nodes { name } } } }
```
Support
If you encounter any issues or have feature requests, please file them on the GitHub issues page.
If you like this plugin you can support it's development and ...
License
MIT
