API Docs

Use these endpoints to extract X content and sync to Notion or flomo.

Base URL: /api/*Method: POSTResponse: application/json

Extract Only

POST /api/extract

Extract tweet text, author, media URLs, basic stats, and parsed user comments. Supports X long-form article parsing and returns article when available.

Request body (JSON):

{
  "url": "https://x.com/user/status/1234567890"
}

Flomo Sync Only

POST /api/flomo

Sync content to flomo. You can pass either flomoApiKey or flomoUrl.

Request body (JSON):

{
  "flomoApiKey": "your_key",
  "content": "hello flomo",
  "fileUrls": ["https://example.com/a.jpg"]
}

flomoApiKey supports:

  • Key only: your_key
  • Full webhook URL: https://flomoapp.com/iwh/...

Notion Sync Only

POST /api/notion

Create a new Notion page under your target parent page. Pass your integration token and parent page ID (or URL).

Request body (JSON):

{
  "notionToken": "ntn_xxx",
  "notionPageId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "title": "Tweet by @user",
  "content": "hello notion",
  "fileUrls": ["https://example.com/a.jpg"]
}

Make sure your integration has access to the target page in Notion.

iOS Shortcut (Extract + Sync)

POST /api/shortcut

One request to extract X content and sync directly to flomo.

If an X article is detected, the final flomo content places the original article link at the very bottom.

JSON request:

{
  "xUrl": "https://x.com/user/status/1234567890",
  "flomoApiKey": "your_key"
}

x-www-form-urlencoded request fields:

xUrl=https://x.com/user/status/1234567890
flomoApiKey=your_key

Success response example:

{
  "success": true,
  "message": "Extracted and synced to flomo",
  "data": {
    "tweet": {
      "...": "...",
      "article": {
        "title": "Article title",
        "content": "Full article body...",
        "isLongForm": true
      },
      "comments": [
        {
          "id": "1900000000000000000",
          "text": "Nice post",
          "author": { "username": "reply_user" }
        }
      ]
    },
    "content": "tweet text\n\n#tweet @user\nhttps://x.com/user/status/1234567890",
    "fileUrls": [],
    "flomo": { "code": 0, "message": "ok" }
  }
}

iOS Shortcut Setup

Recommended
  1. Add action: Get Contents of URL
  2. URL: https://<your-domain>/api/shortcut
  3. Method: POST
  4. Request body: JSON
  5. JSON keys: xUrl, flomoApiKey
  6. Check response: success == true
Open flomo API docsOpen Notion API docs