No description
Find a file
2025-04-02 15:32:34 +02:00
src Fixed cache folder name. 2025-04-02 15:32:34 +02:00
.editorconfig Initial commit 2025-03-16 20:03:08 +01:00
.eslintignore Initial commit 2025-03-16 20:03:08 +01:00
.eslintrc Initial commit 2025-03-16 20:03:08 +01:00
.gitignore Initial commit 2025-03-16 20:03:08 +01:00
.npmrc Initial commit 2025-03-16 20:03:08 +01:00
esbuild.config.mjs Initial commit 2025-03-16 20:03:08 +01:00
LICENSE Updates 2025-03-17 16:22:27 +01:00
main.ts Initial commit 2025-03-16 20:03:08 +01:00
manifest.json Fixed cache folder name. 2025-04-02 15:32:34 +02:00
package-lock.json Initial commit 2025-03-16 20:03:08 +01:00
package.json Initial commit 2025-03-16 20:03:08 +01:00
README.md Updates 2025-03-17 16:22:27 +01:00
styles.css Initial commit 2025-03-16 20:03:08 +01:00
tsconfig.json Initial commit 2025-03-16 20:03:08 +01:00
version-bump.mjs Initial commit 2025-03-16 20:03:08 +01:00
versions.json Fixed cache folder name. 2025-04-02 15:32:34 +02:00

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

  1. Open Obsidian Settings
  2. Go to Community Plugins
  3. Search for "Data Fetcher"
  4. Click Install, then Enable

Manual Installation

  1. Clone the latest release from the plugin repository page
  2. Copy or move cloned folder into your Obsidian vault's .obsidian/plugins folder
  3. 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

  1. First, define an endpoint alias in the plugin settings
  2. 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 } } } }
```

TODO

  • Endpoints list in Settings
  • Query cache
  • Pulling data from RPC
  • Pulling data from API
  • Pulling data from GraphQL
  • Pulling data from gRPC
  • Cache browser
  • Cache cleaner
  • ... some other not yet known features

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 ...

Buy Me A Coffee

License

MIT