Skip to main content

Exporting bookmarks

Using a valid API token for the Queso browser extension can also be used for scripts, CLIs, or server jobs using the Queso Bookmarks API. Additionally it can be used to bulk export bookmarks, import bookmarks, sync them to other tools, or even feed them into AI.

Authenticate once

Send your Authorization: Bearer <token> header to https://quesobookmarks.com/api (or your self-hosted domain). Tokens are scoped to your workspace, so you can create separate credentials for automations, the Chrome extension, Orion, etc.

export QUESO_TOKEN="xxxxxxxxx"
export QUESO_API="https://quesobookmarks.com/api/v1"

Export bookmarks in bulk

The /bookmarks/ endpoint returns every page you have clipped, complete with metadata such as highlights, source URL, tags, created timestamps, and reading status.

curl -s -H "Authorization: Bearer $QUESO_TOKEN" \
"$QUESO_API/bookmarks/?limit=100&sort=-created_at&meta=total_count" \
| jq '.data'

Paginate through the collection by increasing the page parameter until the response array is empty. You can also send filter[read][_eq]=false to grab only unread items, or search=cats to run a full-text query before exporting.

Node/TypeScript example

import fetch from "node-fetch";

const token = process.env.QUESO_TOKEN!;
const base = process.env.QUESO_API ?? "https://quesobookmarks.com/api/v1";

async function fetchAllBookmarks() {
const bookmarks = [];
for (let page = 1; page <= 50; page += 1) {
const res = await fetch(`${base}/bookmarks/?limit=100&page=${page}`, {
headers: { Authorization: `Bearer ${token}` },
});
const payload = await res.json();
bookmarks.push(...payload.data);
if (!payload.data.length) break;
}
return bookmarks;
}

fetchAllBookmarks().then((data) => {
console.log(`Exported ${data.length} bookmarks`);
});