Search Bookmarks
Perform a hybrid search across the user’s bookmarks. Combines three strategies for maximum recall:
- Full-text search (PostgreSQL FTS) — exact word matching with stemming
- Fuzzy matching (trigram similarity via
pg_trgm) — tolerates typos
- Semantic search (pgvector embeddings) — understands meaning
curl -H "Authorization: Bearer $ACCESS_TOKEN" \
"https://api.unisave.io/v1/search/bookmarks?q=react+hooks+tutorial&limit=20"
Query Parameters
| Param | Type | Required | Description |
|---|
q | string | Yes | Search query |
limit | integer | No | Max results. Default: 20. |
Response 200
{
"results": [
{
"clientBookmarkId": "abc-123",
"url": "https://react.dev/reference/react/hooks",
"title": "React Hooks Reference",
"summary": "Complete guide to built-in React hooks...",
"tags": ["react", "hooks", "frontend"],
"thumbnailUrl": "https://react.dev/og.png",
"score": 0.92
}
],
"total": 1
}
Results are ranked by relevance score (higher = better match). The score blends full-text rank, trigram similarity, and cosine similarity from embeddings.
Search Fields
The query matches against these bookmark fields:
| Field | FTS | Fuzzy | Semantic |
|---|
| Title | Yes | Yes | Yes |
| URL / domain | Yes | Yes | No |
| Summary | Yes | Yes | Yes |
| Tags | Yes | No | Yes |
| Description | Yes | Yes | Yes |
Semantic Search
Semantic search uses AI-generated vector embeddings (created during enrichment). This enables meaning-based search:
- Query “cooking tips” finds bookmarks about recipes
- Query “frontend framework” finds React, Vue, and Svelte bookmarks
- Query “investment advice” finds finance articles
Bookmarks that haven’t completed enrichment don’t have embeddings yet. They’re still findable via full-text and fuzzy search, but won’t appear in semantic results.
Pro Gating
The saveWhy field in search results follows the same Pro gating as the enrichment status endpoint — free users receive null.