Sourcelane

X (Twitter) Historical Tweets Scraper

X (Twitter)

Operated by Sourcelane✓ verified

Scrape every tweet an X (Twitter) account posted between any two dates - full text, engagement metrics, media and links - going back years, with keyword, language and reply filters.

Read full description

A scraper for historical X (Twitter) posts that retrieves every tweet from one or more accounts across any specified date range using a windowed pagination approach. The connector collects full tweet text, timestamps, language and source app, engagement metrics (likes, reposts/retweets, replies, quotes, view and bookmark counts), conversation context and reply/retweet/quote indicators, referenced tweet identifiers/URLs, hashtags, mentions, expanded links, and best-quality media URLs and types (video/image). It also captures author metadata such as author identifier, display name, verified status, and follower counts. Technical features include date-range windowing to reach older posts beyond timeline limits, keyword filtering with standard X search syntax, language filtering, options to include or exclude replies and reposts, configurable window size for high-activity accounts, concurrent processing of multiple accounts, and operation without authentication, cookies, or API keys.

Verified Sep 28, 3:56 AM

$0.002

per tweet

Up to 100 per call. Only pay for results returned; failed calls are refunded.

What people use it for

You give it

  • Usernamesrequired

    X / Twitter handles to scrape, one per line.

  • Start daterequired

    First day to include, in YYYY-MM-DD format.

  • End date

    Last day to include, in YYYY-MM-DD format.

  • Keywords

    Only return tweets matching these words.

Optional settings

Include repliesInclude reposts (retweets)LanguageMax tweets per accountSearch window (days)

You get back

Text & content
TextHashtags
People & accounts
UsernameIn reply to usernameAuthor user IDAuthor nameAuthor is blue verified
Numbers & stats
Retweet countReply countLike countQuote countView countBookmark countAuthor followers count
Dates
Created at
Links & media
URLQuoted tweet URLRetweeted tweet URLLinksMedia URLs
Other details
Tweet IDLangReplyIn reply to IDConversation IDQuoteRetweetMentions+1 more

Trust & reliability

7d uptime trend
WindowUptimeSuccess ratep50p95Calls
24h————0
7d————0
30d————0

Calling contract

Call it through Sourcelane's gateway or MCP server. We run the connector, apply your agent's spend guardrails, and bill only the results returned.

Call it via Sourcelane

curl -X POST https://api.usesourcelane.com/v1/call \
  -H "Authorization: Bearer sl_live_your_agent_key" \
  -H "Content-Type: application/json" \
  -d '{"listing":"x-historical-tweets-scraper","params":{"usernames":["NASA"],"startDate":"2023-01-01"},"maxResults":10}'

Request params

FieldTypeRequiredDescription
usernamesarrayrequiredX / Twitter handles to scrape (with or without @), one per line. Profile URLs are also accepted.
startDatestringrequiredFirst day to include, in YYYY-MM-DD format (UTC). Can be years in the past.
endDatestringoptionalLast day to include, in YYYY-MM-DD format (UTC). Leave empty for today.
keywordsstringoptionalOnly return tweets matching these words. Standard X search syntax works, e.g. `launch OR rocket`, `"exact phrase"`, `#hashtag`, `-exclude`.
includeRepliesbooleanoptionalKeep the account's replies to other people. Turn off for original posts only.
includeRetweetsbooleanoptionalAlso return posts the account reposted. Off by default.
languagestringoptionalOptional two-letter language code (en, es, de,...) to keep only tweets in that language.
maxTweetsPerUserintegeroptionalStop after this many tweets for each account, newest first. 0 = everything in the date range.
windowDaysintegeroptionalAdvanced. The date range is walked backwards in windows of this many days so very active accounts stay fully reachable. 0 = automatic (30 days).

Each result contains

FieldTypeDescription
usernamestringUsername
tweetIdstringTweet Id
urlstringUrl
textstringText
createdAtstringCreated At
langstringLang
sourcestringSource
retweetCountintegerRetweet Count
replyCountintegerReply Count
likeCountintegerLike Count
quoteCountintegerQuote Count
viewCountintegerView Count
bookmarkCountinteger—
isReplyboolean—
inReplyToIdnull—
inReplyToUsernamenull—
conversationIdstring—
isQuoteboolean—
quotedTweetUrlnull—
isRetweetboolean—
retweetedTweetUrlnull—
hashtagsarray—
mentionsarray—
linksarray—
mediaUrlsarray—
mediaTypesarray—
authorUserIdstring—
authorNamestring—
authorIsBlueVerifiedboolean—
authorFollowersCountinteger—

Use X (Twitter) Historical Tweets Scraper from Claude, ChatGPT or Cursor

Pick your tool and connect in under a minute. Then just ask — for example: “Find the 50 most-liked tweets about 'MCP servers' this month and summarise the takes.”

Connect Claude

Web, desktop and mobile. One click, then confirm.

  1. 1Click Add to Claude — claude.ai opens with Sourcelane filled in
  2. 2Click Continue to confirm — it then works in Claude desktop and mobile too
Manual setup (config files, REST, Python) +

Claude Code

Adds the Sourcelane MCP server with your key as a header.

terminal
claude mcp add --transport http sourcelane https://api.usesourcelane.com/mcp \
  --header "Authorization: Bearer sl_live_your_agent_key"

Claude Desktop (config file)

Alternative to the connector URL: add to claude_desktop_config.json, then restart Claude.

claude_desktop_config.json
{
  "mcpServers": {
    "sourcelane": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://api.usesourcelane.com/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "AUTH_HEADER": "Bearer sl_live_your_agent_key"
      }
    }
  }
}

Cursor & Windsurf

Add to ~/.cursor/mcp.json (or Windsurf's mcp_config.json).

mcp.json
{
  "mcpServers": {
    "sourcelane": {
      "url": "https://api.usesourcelane.com/mcp",
      "headers": {
        "Authorization": "Bearer sl_live_your_agent_key"
      }
    }
  }
}

VS Code

Save as .vscode/mcp.json. VS Code prompts for your key once.

.vscode/mcp.json
{
  "servers": {
    "sourcelane": {
      "type": "http",
      "url": "https://api.usesourcelane.com/mcp",
      "headers": {
        "Authorization": "Bearer ${input:sourcelane-key}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "sourcelane-key",
      "description": "Sourcelane agent key",
      "password": true
    }
  ]
}

ChatGPT Custom GPT (Actions)

Create a GPT → Actions → Import from URL, then Authentication: API Key, Bearer.

OpenAPI schema URL
https://usesourcelane.com/openapi.json

REST

One POST. Pass maxResults to cap cost.

curl
curl -X POST https://api.usesourcelane.com/v1/call \
  -H "Authorization: Bearer sl_live_your_agent_key" \
  -H "Content-Type: application/json" \
  -d '{"listing":"x-historical-tweets-scraper","params":{"usernames":["NASA"],"startDate":"2023-01-01"},"maxResults":10}'

Python, LangChain, CrewAI, OpenAI Agents SDK…

Wrap the REST call as a tool, or point an MCP client at the endpoint.

python
import requests

res = requests.post(
    "https://api.usesourcelane.com/v1/call",
    headers={"Authorization": "Bearer sl_live_your_agent_key"},
    json={
        "listing": "x-historical-tweets-scraper",
        "params": {"usernames":["NASA"],"startDate":"2023-01-01"},
        "maxResults": 10,
    },
    timeout=300,
)
body = res.json()
print(body["receipt"]["chargedMicros"], "micro-USD for", body["receipt"]["results"], "results")
print(body["data"])

Reviews

—

0 reviews

5
0
4
0
3
0
2
0
1
0

Leave a review

Loading reviews…

Related X (Twitter) connectors

See all X (Twitter) data connectors →

Guides that use this connector