bookmark.land
Api reference

Smart Folders

Rule-based dynamic bookmark folders

Smart folders are virtual folders that automatically contain bookmarks matching a set of rules. They don't physically move bookmarks -- they evaluate rules on demand.

List Smart Folders

GET /smart-folders

Scope: bookmarks:read

{
  "data": [
    {
      "id": "sf_abc",
      "name": "Unread Articles",
      "icon": "book-open",
      "color": "orange",
      "rules": { ... },
      "createdAt": "2026-01-15T10:30:00Z"
    }
  ],
  "meta": {
    "requestId": "req_abc123"
  }
}

Get Smart Folder

GET /smart-folders/:id

Scope: bookmarks:read

Returns the smart folder with its rule definitions.


Create Smart Folder

POST /smart-folders

Scope: bookmarks:write

Body:

{
  "name": "Recent GitHub Stars",
  "icon": "star",
  "color": "yellow",
  "rules": {
    "match": "all",
    "conditions": [
      { "field": "domain", "operator": "equals", "value": "github.com" },
      { "field": "isFavorite", "operator": "equals", "value": "true" }
    ]
  }
}
FieldTypeRequiredDescription
namestringYesFolder name
iconstringNoLucide icon name or emoji
colorstringNoColor identifier
rulesobjectYesObject with match ("all" or "any") and conditions[] array
rules.matchstringYes"all" (every condition must match) or "any" (at least one)
rules.conditionsarrayYesArray of { field, operator, value } objects (max 10 conditions)

Allowed fields and operators:

FieldAllowed OperatorsValue
tagequals, containsTag name (exact match or substring)
domainequals, containsDomain name (auto-normalized: lowercase, strips scheme/www/path)
typeequalslink, article, image, video, document
isFavoriteequals"true" or "false"
createdAfterequalsMilliseconds since epoch, as a string (e.g., "1704067200000")
createdBeforeequalsMilliseconds since epoch, as a string (e.g., "1704067200000")
clickCountgte, lteNumeric value as a string (e.g., "5")

Update Smart Folder

PATCH /smart-folders/:id

Scope: bookmarks:write


Delete Smart Folder

DELETE /smart-folders/:id

Scope: bookmarks:write

Deletes the folder definition. No bookmarks are affected.


Evaluate Smart Folder

GET /smart-folders/:id/bookmarks

Scope: bookmarks:read

Evaluates the folder's rules and returns matching bookmarks. This is a heavy endpoint with a rate limit of 1 request per minute.

Query Parameters:

ParameterTypeDescription
cursorstringPagination cursor from previous response

Always follow a non-null continueCursor, even when bookmarks is empty or truncated is false. Tag folders page their selective tag index, and one page can contain only trashed or deleted bookmarks while later pages still contain matches. Exact-tag cursors are opaque and become invalid when the folder rules change; restart without a cursor if the API returns SMART_FOLDER_CURSOR_INVALID. Domain, type, favorite, and fallback cursors are not strategy-bound and may remain accepted after rule changes.

Response:

{
  "data": {
    "bookmarks": [ ... ],
    "continueCursor": "eyJ...",
    "truncated": false
  }
}

Limits:

  • Exact-tag rules scan 200 tag memberships per request; other rules scan up to 5,000 bookmarks per evaluation
  • Returns up to 500 matching bookmarks
  • Uses cursor-based pagination (200 docs per page)

On this page