Obsidian SDK

Properties

Auto-generated API documentation.

Properties Service

Manage file properties/frontmatter metadata.

Service Overview

The Properties service provides endpoints to read, set, and delete frontmatter properties from your notes. Properties are key-value metadata stored at the top of Markdown files.

Base URL

/api/content/properties
/api/content/property

Endpoints


GET /api/content/properties

List all property types used in the vault.

CLI Command: obsidian properties

Query Parameters:

ParameterTypeRequiredDescription
countsbooleanNoInclude usage counts
formatstringNoOutput format
vaultstringNoTarget vault name

Example Request:

curl "http://localhost:3000/api/content/properties?vault=youtube"

Example Response:

{
  "success": true,
  "data": {
    "type": "list",
    "data": [
      "title",
      "tags",
      "created",
      "modified",
      "aliases"
    ]
  }
}

With counts:

curl "http://localhost:3000/api/content/properties?counts=true&vault=youtube"

Python (with counts):

response = requests.get("http://localhost:3000/api/content/properties", params={
    "counts": "true",
    "vault": "youtube"
})

GET /api/content/property/:name

Read a specific property value from a file.

CLI Command: obsidian property:read

URL Parameters:

ParameterTypeRequiredDescription
namestringYesProperty name to read

Query Parameters:

ParameterTypeRequiredDescription
filestringNoTarget file
pathstringNoFull path to the file
vaultstringNoTarget vault name

Example Request:

curl "http://localhost:3000/api/content/property/title?file=Notes.md&vault=youtube"

Example Response:

{
  "success": true,
  "data": {
    "type": "kv",
    "data": {
      "title": "My Notes"
    }
  }
}

Multiple parameters:

curl "http://localhost:3000/api/content/property/tags?file=Notes.md&vault=youtube"

POST /api/content/property/:name

Set a property value on a file.

CLI Command: obsidian property:set

URL Parameters:

ParameterTypeRequiredDescription
namestringYesProperty name to set

Request Body:

ParameterTypeRequiredDescription
valuestringYesProperty value
typestringNoProperty type (string, number, date, tags)
filestringNoTarget file
pathstringNoFull path to the file
vaultstringNoTarget vault name

Example Request:

curl -X POST "http://localhost:3000/api/content/property/status?file=Notes.md&vault=youtube" \
  -H "Content-Type: application/json" \
  -d '{"value": "in-progress"}'
curl -X POST "http://localhost:3000/api/content/property/priority?file=Notes.md&vault=youtube" \
  -H "Content-Type: application/json" \
  -d '{"value": "high", "type": "string"}'
curl -X POST "http://localhost:3000/api/content/property/rating?file=Notes.md&vault=youtube" \
  -H "Content-Type: application/json" \
  -d '{"value": "5", "type": "number"}'

Example Request:

curl -X DELETE "http://localhost:3000/api/content/property/draft?file=Notes.md&vault=youtube" \
  -H "Content-Type: application/json" \
  -d '{}'
# Add a tag to multiple files
for file in Projects/*.md; do
  filename=$(basename "$file" .md)
  curl -X POST "http://localhost:3000/api/content/property/tags?file=$filename&vault=youtube" \
    -H "Content-Type: application/json" \
    -d '{"value": "project", "type": "tags"}'
done
# Read multiple properties from a file
for prop in title tags created; do
  curl -s "http://localhost:3000/api/content/property/$prop?file=Notes.md&vault=youtube" \
    | jq -r '.data.data'
done

On this page