Documents

twitter-bookmarks-exporter

Try it

Exports all X/Twitter bookmarks into individual Markdown files with metadata.

What it does

Extracts all bookmarked tweets from X/Twitter into clean Markdown files for Obsidian, Notion, or any note-taking system.

The skill document

Twitter Bookmarks Exporter

Extracts all bookmarked tweets from X/Twitter into clean Markdown files for Obsidian, Notion, or any note-taking system.

What it does

  1. Parses bookmarks from bookmarks.json (captured from browser Network tab).
  2. Handles multiple concatenated API pages in a single file — just paste all responses end-to-end.
  3. Converts each bookmark into a Markdown file with YAML frontmatter.
  4. Saves files to output/bookmarks/ folder, named sequentially like 0001-title.md.
  5. Extracts full content for all tweet types:
    • Regular tweets — full text, t.co URLs expanded to real URLs
    • Note tweets — complete long-form text (no truncation)
    • X Articles — title + preview text + article link
  6. Includes quoted tweets as blockquotes, media image/video links, and engagement stats.

Prerequisites

Step 1 — Capture your bookmarks from the browser

X/Twitter does not provide a public bookmarks export API, so you need to capture the responses directly from your browser's Network tab. Follow these steps:

  1. Log in to https://x.com in Chrome or Firefox.
  2. Open DevTools: press F12 (Windows/Linux) or Cmd+Option+I (Mac).
  3. Click the Network tab.
  4. Navigate to https://x.com/i/bookmarks.
  5. In the Network filter box, type Bookmarks to filter relevant requests.
  6. Scroll all the way to the bottom of your bookmarks page. Each scroll triggers a new paginated API request — you must scroll through all your bookmarks to capture every page.
  7. In the Network panel you will now see multiple Bookmarks?variables=... requests — one per page.

Step 2 — Save the responses to bookmarks.json

For each Bookmarks request in the Network panel:

  1. Right-click the request → Copy → Copy Response.
  2. Paste the response into a text editor.

Once you have all responses, save them into a single file named bookmarks.json inside the twitter-bookmarks-exporter/ folder. You can paste the responses one after another — the script handles multiple concatenated JSON objects automatically.

Example with two pages:

{ "data": { "bookmark_timeline_v2": { ... } } }
{ "data": { "bookmark_timeline_v2": { ... } } }

No special merging needed — just paste all responses end-to-end and save.

The script handles the current X GraphQL API response format as well as the legacy v1 format.

How to run

python scripts/main.py

This generates Markdown files in output/bookmarks/.

Output format

Each file follows this structure:

---
title: "Example tweet text here"
url: "https://x.com/username/status/123456789"
author: "@username"
saved_at: "2026-04-14"
type: "tweet"  # tweet | note | article
---

# Example tweet text here

**Author:** Display Name (@username)
**Date:** 2026-04-14
**URL:** https://x.com/username/status/123456789
**Stats:** ❤️ 142 · 🔁 38 · 💬 12 · 🔖 95 · 👁 24000

Full tweet content here, with all t.co links expanded to real URLs.

![image](https://pbs.twimg.com/media/example.jpg)   <!-- if media present -->

> **Quoted tweet** by @otheruser            <!-- if quoting another tweet -->
> https://x.com/otheruser/status/987654321
> Quoted tweet text here.

Example files generated

output/bookmarks/
├── 0001-the-thing-that-surprises-me-most-about-llms.md
├── 0002-we-are-still-very-much-in-the-early-innings.md
└── ...

Usage in OpenClaw

Agent prompt: "Export my Twitter bookmarks to Markdown using twitter-bookmarks-exporter."

Expected behavior:

  1. Confirm bookmarks.json exists in the skill folder.
  2. Run python scripts/main.py.
  3. Verify files created in output/bookmarks/.
  4. Report completion with file count.

Customization

Edit scripts/main.py to:

  • Change output path (OUT_DIR)
  • Modify Markdown template (bookmark_to_markdown)
  • Add filters (e.g., only tweets from certain authors, by date range)

Troubleshooting

  • No bookmarks.json: Manually capture from browser Network tab (see Prerequisites).
  • No bookmarks found: Ensure the JSON is the raw API response, not a browser-formatted copy.
  • Encoding issues: Ensure the file is saved as UTF-8.
  • Empty titles: Script auto-generates slugs from content.

License

MIT License. Free to use, modify, and distribute.

Related skills

Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.

by fly0pants4.3k installs296 stars

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván559 installs18 stars

Generate and edit Draw.io, Mermaid, and Excalidraw diagrams from natural language using a structured JSON spec.

by nssa.io1.0k installs47 stars

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván855 installs69 stars

Join a video meeting as an AI bot with voice, avatar, and screenshare across four operating modes.

by johnpatternai22 installs8 stars

More from j3ffyang

Browse all skills

Polish a technical blog draft into an 800–1000 word, 3–4 section zh-CN article, preserve technical terms/code, and generate consistent hero + per-section image prompts when the user asks to polish and translate a blog with images.

by j3ffyang28 installs

Generate video from supplied image using Veo-3.0 async API. Gemini vision analyzes image, Veo creates video via predictLongRunning. All outputs in ~/.openclaw/workspace/tibetanProc/ with yymmddHHMM prefix.

by j3ffyang17 installs

Read a plain Markdown file (e.g. 260321_openclawConfig.md), generate header and section images using the default OpenClaw image model and API key from ~/openclaw/.env, create a new *_img.md copy with embedded PNGs, and move all generated images into an img/ folder next to the original file.

by j3ffyang13 installs

Polish a technical blog draft into a 1000–1200 word, 4–5 section en-US article, preserve technical terms/code, and generate one consistent hero image prompt.

by j3ffyang17 installs

Help the user draft, review, and polish blog posts in Markdown, keeping the original languages and informal tone.

by j3ffyang25 installs

Generate a daily AI news newsletter from fresh web sources. Use when the user asks for a current AI digest, AI news roundup, curated newsletter, or daily AI...

by j3ffyang16 installs