Skip to main content
GET
/
account
/
history
/
:source
/
:externalId
curl -X GET "https://scrape.st/account/history/twitter/12" \
  -H "x-api-key: YOUR_API_KEY"
{
  "data": [
    {
      "id": "cm9abc123def456",
      "source": "TWITTER",
      "messageId": "1886493083207827456",
      "sourceId": "12",
      "content": "Bitcoin hits new all-time high! 🚀",
      "rawPayload": {
        "id": "1886493083207827456",
        "text": "Bitcoin hits new all-time high! 🚀",
        "created_at": "2026-04-20T15:30:00.000Z",
        "favorite_count": 15000,
        "retweet_count": 3000,
        "reply_count": 800,
        "author": {
          "id": "12",
          "name": "Jack",
          "screen_name": "jack"
        }
      },
      "createdAt": "2026-04-20T15:30:00.000Z"
    }
  ],
  "nextCursor": "cm9xyz789ghi012",
  "limit": 50
}
Retrieve historical data that has been backfilled for tracked sources. Returns the full payload including the raw JSON data. Uses cursor-based pagination for efficient sequential consumption.
The history endpoint is rate-limited to 30 requests per 60 seconds.

Path Parameters

source
string
required
The source platform. Valid values: TWITTER, DISCORD, TELEGRAM
externalId
string
required
The external ID of the account to fetch history for (e.g., a Twitter user ID).

Query Parameters

messageId
string
Filter by a specific message ID (e.g. a tweet ID)
startDate
string
ISO-8601 date string. Only return records created on or after this date. Example: 2026-01-01
endDate
string
ISO-8601 date string. Only return records created on or before this date. Example: 2026-04-21
order
string
default:"desc"
Sort order by creation date. Valid values: asc, desc
limit
number
default:"50"
Number of records to return per page (1–100)
cursor
string
Pagination cursor — the id of the last record from the previous page. Pass the nextCursor value from the previous response to fetch the next page.
autoBackfill
boolean
default:"false"
If true and no data exists, automatically triggers a background backfill job for the specified externalId.

Response

data
array
Array of backfill data objects. Each object contains:
  • id — Unique record ID
  • source — Source type (TWITTER, DISCORD, TELEGRAM)
  • messageId — External message ID (e.g. tweet ID)
  • sourceId — External source ID (e.g. Twitter user ID)
  • content — Extracted text content
  • rawPayload — Full raw JSON payload from the source
  • createdAt — Timestamp of the original message
nextCursor
string | null
Cursor for fetching the next page. null when there are no more results.
limit
number
The limit that was applied
curl -X GET "https://scrape.st/account/history/twitter/12" \
  -H "x-api-key: YOUR_API_KEY"
{
  "data": [
    {
      "id": "cm9abc123def456",
      "source": "TWITTER",
      "messageId": "1886493083207827456",
      "sourceId": "12",
      "content": "Bitcoin hits new all-time high! 🚀",
      "rawPayload": {
        "id": "1886493083207827456",
        "text": "Bitcoin hits new all-time high! 🚀",
        "created_at": "2026-04-20T15:30:00.000Z",
        "favorite_count": 15000,
        "retweet_count": 3000,
        "reply_count": 800,
        "author": {
          "id": "12",
          "name": "Jack",
          "screen_name": "jack"
        }
      },
      "createdAt": "2026-04-20T15:30:00.000Z"
    }
  ],
  "nextCursor": "cm9xyz789ghi012",
  "limit": 50
}