{
  "name": "SocialCrawl: Export the latest N comments on a TikTok video",
  "nodes": [
    {
      "id": "node-1",
      "position": [
        260,
        0
      ],
      "name": "Run recipe",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "parameters": {}
    },
    {
      "id": "node-2",
      "position": [
        520,
        0
      ],
      "name": "comments",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "parameters": {
        "method": "GET",
        "url": "https://www.socialcrawl.dev/v1/tiktok/post/comments?url=https%3A%2F%2Fwww.tiktok.com%2F%40stoolpresidente%2Fvideo%2F7623818255903329566&sort=recent&scan_pages=3",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {
          "timeout": 300000,
          "pagination": {
            "pagination": {
              "paginationMode": "updateAParameterInEachRequest",
              "parameters": {
                "parameters": [
                  {
                    "type": "qs",
                    "name": "cursor",
                    "value": "={{ $response.body.pagination.next_cursor }}"
                  }
                ]
              },
              "paginationCompleteWhen": "other",
              "completeExpression": "={{ !$response.body.pagination || !$response.body.pagination.has_more }}",
              "limitPagesFetched": true,
              "maxRequests": 10
            }
          }
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "SocialCrawl API key"
        }
      },
      "executeOnce": true,
      "retryOnFail": true,
      "maxTries": 4,
      "waitBetweenTries": 2000
    },
    {
      "id": "note",
      "name": "How this recipe works",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        -460
      ],
      "parameters": {
        "content": "## Export the latest N comments on a TikTok video\n\nPrice for two hundred comments: ≥ 15 credits held up front (settles 5-15; the unused hold is refunded); a count or fan-out is unknown, so this is a floor: quote the whole job with GET /v1/utility/estimate or scripts/estimate.py.\n\nMeasured on 25/10/2026: 3 credits in 1 call for ITEMS=25 (the quote held 3). The TypeScript and Python programs both ran.\n\nITEMS caps the rows a step collects or loops over (default 200, two hundred comments); the price scales with it.\n\nFRESH=1 skips the cache and bills every call; a cache hit is free.\n\nInputs, set to a working example (change them to yours):\n\n  url: The TikTok video URL\n\n**Key:** create a Header Auth credential named SocialCrawl API key, with Name x-api-key and your API key as Value, and pick it on every request node.\n\n**Rows:** a step that runs once per row takes the first 200 rows (change the number in its rows node). A paging step reads up to 10 pages: raise Max Pages under Options, Pagination to fetch more.\n\n**Errors:** a request node stops the workflow on an API error. Read error.type in its output; retry only when error.retryable is true.",
        "width": 520,
        "height": 420
      }
    }
  ],
  "connections": {
    "Run recipe": {
      "main": [
        [
          {
            "node": "comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {}
}
