Skip to main content
Obsidian logo

Overview

Add Obsidian to any ModuleX agent or workflow. Read, create, update, search, and delete notes in your Obsidian vault via the Obsidian Local REST API plugin. Manage periodic notes, list and execute commands, work with the active file, and patch content at specific headings, block references, or frontmatter fields. The plugin runs locally inside your Obsidian app and is reachable at a base_url you pass on every call (default https://127.0.0.1:27124). Because the plugin serves a self-signed TLS certificate, the HTTP client does not verify the certificate chain.
Categories: Productivity & Collaboration · Note Taking · Knowledge Base · Auth: API Key · Actions: 15

Authentication

API Key Authentication

Authenticate using the API key from the Obsidian Local REST API plugin
1

Step 1

Install the ‘Local REST API’ community plugin in Obsidian
2

Step 2

Open the plugin settings and enable it
3

Step 3

Copy the API key shown in the plugin settings
4

Step 4

Note the server URL (default https://127.0.0.1:27124) for the base_url parameter
5

Step 5

Paste the API key below

Required Credentials

FieldDescriptionRequiredFormat
Obsidian Local REST API KeyAPI key from the Obsidian Local REST API plugin settingsYes-

Available Actions

Parameters

base_url
string
required
Base URL for the Obsidian Local REST API (e.g. https://127.0.0.1:27124)
path
string
Directory path relative to vault root. Leave empty to list the root.

Response

{
  "$defs": {
    "FileEntry": {
      "additionalProperties": false,
      "description": "A single file or directory entry in ``list_files``.",
      "properties": {
        "path": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Path"
        },
        "type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Type"
        }
      },
      "title": "FileEntry",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "files": {
      "items": {
        "$ref": "#/$defs/FileEntry"
      },
      "title": "Files",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "ListFilesOutput",
  "type": "object"
}

Parameters

base_url
string
required
Base URL for the Obsidian Local REST API (e.g. https://127.0.0.1:27124)
filename
string
required
Path to the note relative to vault root (e.g. “folder/note.md”)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "content": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Content"
    },
    "filename": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Filename"
    }
  },
  "required": [
    "success"
  ],
  "title": "GetNoteOutput",
  "type": "object"
}

Parameters

base_url
string
required
Base URL for the Obsidian Local REST API (e.g. https://127.0.0.1:27124)
filename
string
required
Path for the note relative to vault root (e.g. “folder/note.md”)
content
string
required
Markdown content for the note

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "filename": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Filename"
    },
    "created": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Created"
    }
  },
  "required": [
    "success"
  ],
  "title": "CreateNoteOutput",
  "type": "object"
}

Parameters

base_url
string
required
Base URL for the Obsidian Local REST API (e.g. https://127.0.0.1:27124)
filename
string
required
Path to the note relative to vault root (e.g. “folder/note.md”)
content
string
required
Markdown content to append to the note

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "filename": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Filename"
    },
    "appended": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Appended"
    }
  },
  "required": [
    "success"
  ],
  "title": "AppendNoteOutput",
  "type": "object"
}

Parameters

base_url
string
required
Base URL for the Obsidian Local REST API (e.g. https://127.0.0.1:27124)
filename
string
required
Path to the note relative to vault root (e.g. “folder/note.md”)
content
string
required
Content to insert at the target location
operation
string
required
How to insert content: append, prepend, or replace
target_type
string
required
Type of target: heading, block, or frontmatter
target
string
required
Target identifier (heading text, block reference ID, or frontmatter field name)
target_delimiter
string
Delimiter for nested headings (default: ”::”)
trim_target_whitespace
boolean
Whether to trim whitespace from target before matching

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "filename": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Filename"
    },
    "patched": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Patched"
    }
  },
  "required": [
    "success"
  ],
  "title": "PatchNoteOutput",
  "type": "object"
}

Parameters

base_url
string
required
Base URL for the Obsidian Local REST API (e.g. https://127.0.0.1:27124)
filename
string
required
Path to the note to delete relative to vault root

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "filename": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Filename"
    },
    "deleted": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Deleted"
    }
  },
  "required": [
    "success"
  ],
  "title": "DeleteNoteOutput",
  "type": "object"
}

Parameters

base_url
string
required
Base URL for the Obsidian Local REST API (e.g. https://127.0.0.1:27124)
query
string
required
Text to search for across vault notes
context_length
integer
Number of characters of context around each match (default: 100)

Response

{
  "$defs": {
    "SearchMatch": {
      "additionalProperties": false,
      "description": "A single matching context snippet within a search result.",
      "properties": {
        "context": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Context"
        }
      },
      "title": "SearchMatch",
      "type": "object"
    },
    "SearchResultItem": {
      "additionalProperties": false,
      "description": "A single result row in ``search``.",
      "properties": {
        "filename": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Filename"
        },
        "score": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Score"
        },
        "matches": {
          "items": {
            "$ref": "#/$defs/SearchMatch"
          },
          "title": "Matches",
          "type": "array"
        }
      },
      "title": "SearchResultItem",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "results": {
      "items": {
        "$ref": "#/$defs/SearchResultItem"
      },
      "title": "Results",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "SearchOutput",
  "type": "object"
}

Parameters

base_url
string
required
Base URL for the Obsidian Local REST API (e.g. https://127.0.0.1:27124)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "content": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Content"
    },
    "filename": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Filename"
    }
  },
  "required": [
    "success"
  ],
  "title": "GetActiveOutput",
  "type": "object"
}

Parameters

base_url
string
required
Base URL for the Obsidian Local REST API (e.g. https://127.0.0.1:27124)
content
string
required
Markdown content to append to the active file

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "appended": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Appended"
    }
  },
  "required": [
    "success"
  ],
  "title": "AppendActiveOutput",
  "type": "object"
}

Parameters

base_url
string
required
Base URL for the Obsidian Local REST API (e.g. https://127.0.0.1:27124)
content
string
required
Content to insert at the target location
operation
string
required
How to insert content: append, prepend, or replace
target_type
string
required
Type of target: heading, block, or frontmatter
target
string
required
Target identifier (heading text, block reference ID, or frontmatter field name)
target_delimiter
string
Delimiter for nested headings (default: ”::”)
trim_target_whitespace
boolean
Whether to trim whitespace from target before matching

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "patched": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Patched"
    }
  },
  "required": [
    "success"
  ],
  "title": "PatchActiveOutput",
  "type": "object"
}

Parameters

base_url
string
required
Base URL for the Obsidian Local REST API (e.g. https://127.0.0.1:27124)
filename
string
required
Path to the file relative to vault root
new_leaf
boolean
Whether to open the file in a new leaf/tab

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "filename": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Filename"
    },
    "opened": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Opened"
    }
  },
  "required": [
    "success"
  ],
  "title": "OpenFileOutput",
  "type": "object"
}

Parameters

base_url
string
required
Base URL for the Obsidian Local REST API (e.g. https://127.0.0.1:27124)

Response

{
  "$defs": {
    "CommandItem": {
      "additionalProperties": false,
      "description": "A single available command in ``list_commands``.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        }
      },
      "title": "CommandItem",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "commands": {
      "items": {
        "$ref": "#/$defs/CommandItem"
      },
      "title": "Commands",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "ListCommandsOutput",
  "type": "object"
}

Parameters

base_url
string
required
Base URL for the Obsidian Local REST API (e.g. https://127.0.0.1:27124)
command_id
string
required
ID of the command to execute (use list_commands to discover available commands)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "command_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Command Id"
    },
    "executed": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Executed"
    }
  },
  "required": [
    "success"
  ],
  "title": "ExecuteCommandOutput",
  "type": "object"
}

Parameters

base_url
string
required
Base URL for the Obsidian Local REST API (e.g. https://127.0.0.1:27124)
period
string
required
Period type: daily, weekly, monthly, quarterly, or yearly

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "content": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Content"
    },
    "period": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Period"
    }
  },
  "required": [
    "success"
  ],
  "title": "GetPeriodicNoteOutput",
  "type": "object"
}

Parameters

base_url
string
required
Base URL for the Obsidian Local REST API (e.g. https://127.0.0.1:27124)
period
string
required
Period type: daily, weekly, monthly, quarterly, or yearly
content
string
required
Markdown content to append to the periodic note

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "period": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Period"
    },
    "appended": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Appended"
    }
  },
  "required": [
    "success"
  ],
  "title": "AppendPeriodicNoteOutput",
  "type": "object"
}

Limits & Quotas

  • The Local REST API runs on the user’s own machine, so throughput is bound only by the local Obsidian instance; there is no vendor rate limit.
  • base_url must be reachable from where the runtime executes (typically the same host). The default https://127.0.0.1:27124 only works for a co-located process.
  • Error model: non-2xx responses and timeouts are caught and returned as success=False + error rather than raising.

Grain

Granola

Reflect