scraper
Back to API docs

Overview

  • Overview

APIs

  • POSTThread
  • POSTSearch
  • POSTUser Tweets
  • POSTUser Info

Twitter Search

2 credits

Search Twitter for tweets.

POST/api/v1/tools/twitter/search

Parameters

querystringrequired

Search query string.

maxResultsnumber

Maximum number of results to return. Must be a positive integer. Defaults to 100. Upper bound is determined by your plan.

Response Schema

dataobject

Twitter search result

postsobject[]

Matching tweets.

countnumber

Number of tweets returned

metaobject

Request metadata

toolstring

Tool name (twitter-search)

creditsUsednumber

Credits consumed (2)

requestIdstring

Unique request ID

Request

curl -X POST https://scraper.run/api/v1/tools/twitter/search \
-H "Authorization: Bearer sc_live_..." \
-H "Content-Type: application/json" \
-d '{
"query": "artificial intelligence startups"
}'

Response Example

{
"data": {
"posts": [
{
"id": "9876543210",
"author": "ai_founder",
"text": "Just raised our Series A to build the next generation of AI tools for developers. Thrilled to share more soon.",
"createdAt": "2026-04-09T09:30:00.000Z",
"url": "https://x.com/ai_founder/status/9876543210",
"likes": 1420,
"retweets": 312
}
],
"count": 1
},
"meta": {
"tool": "twitter-search",
"creditsUsed": 2,
"requestId": "req_abc123"
}
}