- Cost
- 1 credit
- Cached repeats
- 0 creditssend max_age_days, results kept 30 days
- Failed requests
- 0 credits
X offers no way to page further, so there is no next-page cursor.
You send handle.
Part of the X (Twitter) Scraper API: 7 X (Twitter) endpoints on one key.
Request
Send your key in the x-api-key header.
1curl -G "https://api.socialscrape.dev/v1/twitter/profile/tweets" \2 -H "x-api-key: $SOCIALSCRAPE_API_KEY" \3 --data-urlencode 'handle=NASA'1import os2import requests34params = {5 "handle": "NASA",6}7res = requests.get(8 "https://api.socialscrape.dev/v1/twitter/profile/tweets",9 headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},10 params=params,11 timeout=60,12)13body = res.json()1415if body["ok"]:16 print(body["data"])17else:18 print(body["error"]["code"], body["error"]["message"])1const url = new URL("https://api.socialscrape.dev/v1/twitter/profile/tweets");2url.search = new URLSearchParams({3 handle: "NASA",4}).toString();5const res = await fetch(url, {6 headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },7});8const body = await res.json();910if (body.ok) {11 console.log(body.data);12} else {13 console.error(body.error.code, body.error.message);14}1{2 "nodes": [3 {4 "name": "SocialScrape X profile posts",5 "type": "n8n-nodes-base.httpRequest",6 "typeVersion": 4.2,7 "position": [8 0,9 010 ],11 "parameters": {12 "method": "GET",13 "url": "https://api.socialscrape.dev/v1/twitter/profile/tweets",14 "sendQuery": true,15 "queryParameters": {16 "parameters": [17 {18 "name": "handle",19 "value": "NASA"20 }21 ]22 },23 "sendHeaders": true,24 "headerParameters": {25 "parameters": [26 {27 "name": "x-api-key",28 "value": "={{ $env.SOCIALSCRAPE_API_KEY }}"29 }30 ]31 }32 }33 }34 ],35 "connections": {}36}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
handle | string | yes | Username, with or without the leading @. Also accepted as username, screen_name. |
cursor | string | Opaque cursor from the previous page; pass it back unchanged. Also accepted as continuationToken, continuation_token, next_max_id, max_id, max_cursor, min_time, after, page_token, pageToken, paginationToken, next_page_id, page. |
Every request also accepts trim, raw and max_age_days.
Response
Sample from a recorded response, shortened. Values are examples, not your data.
1{2 "ok": true,3 "credits_charged": 1,4 "credits_remaining": 4999,5 "cached": false,6 "cached_at": null,7 "request_id": "req_2f3acfff478c2a97370e067a",8 "data": {9 "object": "list",10 "items": [11 {12 "object": "post",13 "platform": "twitter",14 "id": "2115900247230537920",15 "url": "https://x.com/NASA/status/2115900247230537920",16 "type": "tweet",17 "author": {18 "id": "11348282",19 "handle": "NASA",20 "name": "NASA",21 "url": "https://x.com/NASA",22 "avatar_url": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",23 "verified": true24 },25 "title": null,26 "text": "Your name could fly on Saturn’s largest moon.\n\nNASA’s Dragonfly mission will launch in 2028 to explore the dunes, lakes, and rivers of Saturn’s moon, Titan, ...",27 "published_at": "2026-10-29T20:15:05Z",28 "duration_seconds": null,29 "language": "en",30 "hashtags": null,31 "mentions": null,32 "stats": {33 "views": 280499,34 "likes": 1594,35 "comments": 107,36 "shares": 386,37 "saves": 394,38 "dislikes": null39 },40 "media": {41 "thumbnail_url": "https://pbs.twimg.com/media/HV0wDfrWEAEN_2v.jpg",42 "video_url": null,43 "audio_url": null,44 "image_urls": [45 "https://pbs.twimg.com/media/HV0wDfrWEAEN_2v.jpg"46 ],47 "width": 8000,48 "height": 450149 },50 "song": null,51 "location": null,52 "is_pinned": false,53 "is_sponsored": null,54 "extra": {55 "is_edited": false,56 "links": [57 {58 "display_url": "go.nasa.gov/dragonfly-names",59 "url": "https://go.nasa.gov/dragonfly-names"60 }61 ],62 "media": [63 {64 "alt_text": "A poster-style graphic of the the Dragonfly rotorcraft and two example boarding passes with a reddish-tan background. Text on the graphic reads \"Journey to T...",65 "height": 4501,66 "type": "photo",67 "url": "https://pbs.twimg.com/media/HV0wDfrWEAEN_2v.jpg",68 "width": 800069 }70 ],71 "possibly_sensitive": false,72 "quote_count": 64,73 "retweet_count": 32274 }75 },76 {77 "object": "post",78 "platform": "twitter",79 "id": "2115753332958433574",80 "url": "https://x.com/NASA/status/2115753332958433574",81 "type": "tweet",82 "author": {83 "id": "11348282",84 "handle": "NASA",85 "name": "NASA",86 "url": "https://x.com/NASA",87 "avatar_url": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",88 "verified": true89 },90 "title": null,91 "text": "LIVE: NASA's Anil Menon and @csa_asc's Joshua Kutryk are setting up a new solar array outside the @Space_Station. Today's spacewalk is scheduled to start aro...",92 "published_at": "2026-10-29T10:31:18Z",93 "duration_seconds": null,94 "language": "en",95 "hashtags": null,96 "mentions": [97 "csa_asc",98 "Space_Station"99 ],100 "stats": {101 "views": 1026589,102 "likes": 3039,103 "comments": 219,104 "shares": 626,105 "saves": 173,106 "dislikes": null107 },108 "media": {109 "thumbnail_url": null,110 "video_url": null,111 "audio_url": null,112 "image_urls": null,113 "width": null,114 "height": null115 },116 "song": null,117 "location": null,118 "is_pinned": false,119 "is_sponsored": null,120 "extra": {121 "card": {122 "url": "https://t.co/xoJPYWty9Z"123 },124 "is_edited": false,125 "links": [126 {127 "display_url": "x.com/i/broadcasts/1…",128 "url": "https://x.com/i/broadcasts/1rxmqpBDDpWxy"129 }130 ],131 "possibly_sensitive": false,132 "quote_count": 79,133 "retweet_count": 547134 }135 }136 ],137 "cursor": null,138 "has_more": false,139 "parent": {140 "object": "profile",141 "platform": "twitter",142 "id": "11348282",143 "handle": "NASA",144 "name": "NASA",145 "headline": null,146 "url": "https://x.com/NASA",147 "kind": "organization",148 "bio": "Making the seemingly impossible, possible. ✨",149 "avatar_url": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",150 "banner_url": "https://pbs.twimg.com/profile_banners/11348282/1788992290",151 "verified": true,152 "is_private": false,153 "external_url": "http://www.nasa.gov/",154 "links": [155 {156 "title": "nasa.gov",157 "url": "http://www.nasa.gov/"158 }159 ],160 "location": "Pale Blue Dot",161 "category": null,162 "created_at": "2007-12-19T20:20:32Z",163 "stats": {164 "followers": 92300985,165 "following": 115,166 "posts": 74471,167 "likes": null,168 "views": null169 },170 "extra": {171 "affiliates_count": 85,172 "birthdate": {173 "day": 1,174 "month": 10,175 "year": 1958176 },177 "creator_subscriptions_count": 0,178 "highlighted_posts": 288,179 "is_blue_verified": true,180 "possibly_sensitive": false181 }182 }183 },184 "cursor": null,185 "has_more": false186}Fields
A page of results. Each entry in items is a Post. cursor and has_more page through the rest.
A field the platform does not give is null, never made up. Extra platform details are in extra.
| Field | Type | Always | Notes |
|---|---|---|---|
object | "post" | ||
platform | Platform | yes | |
id | string | yes | |
url | string or null | ||
type | "video" or "short" or "reel" or "image" or "carousel" or "story" or "live" or "clip" or "text" or "link" or "tweet" or "pin" or "community_post" or "episode" or "unknown" | ||
author | Author or null | ||
title | string or null | ||
text | string or null | ||
published_at | string (ISO 8601 date-time) or null | ||
duration_seconds | number or null | ||
language | string or null | ||
hashtags | string[] or null | ||
mentions | string[] or null | ||
stats | Stats |
Show the other 6 fields
Full field list in the reference for this endpoint and the data models. Errors are listed under Errors.
Questions
Which errors can it return?
invalid_params (do not retry), not_found (do not retry). Account and platform errors from the errors list can also happen. A failure always costs 0 credits.
How do I get more than one page?
Send the same request with cursor set to the cursor you received, until has_more is false. Each page costs its own price. See pagination.
Is there an SDK call for it?
The Python client has client.twitter.profile_tweets(...) and the TypeScript client client.twitter.profileTweets(). Both return the same envelope as the HTTP API. Install them from PyPI (socialscrape-sdk) or npm (socialscrape); plain HTTP works in any language.
Can an AI agent call it?
Yes. The MCP server, which you run on your own machine, reaches every built endpoint, with the same prices.