X profile posts
Beta GET /v1/twitter/profile/tweets
GET /v1/twitter/profile/tweets
Public posts of an account, as X shows them to logged-out visitors: about 20 popular posts and reposts, or, when X's public timeline widget is rate limited, the 5 newest original posts. X offers logged-out visitors no way to page further, so there is no next-page cursor.
- Cost: 1 credit
- Status: Beta. Built and tested against recorded responses; the shape may still gain fields.
- Cache: Results are kept up to 30 days; send
max_age_daysto reuse them for free. - Timeout: A request still running after about 25 seconds answers
202with a job to poll (Batch and jobs).
Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
handle | string | yes | Username, with or without the leading @. Also accepted as username, screen_name. |
Every request also accepts:
cursor: the cursor from the previous page (Pagination).trim:truefor a smaller response withoutnullfields andextra.raw:trueto also get the platform's original object asraw.max_age_days: accept a cached result up to this many days old, for 0 credits (Caching).
Example request#
Set your key in the environment first (see Authentication).
curl -G "https://api.socialscrape.io/v1/twitter/profile/tweets" \
-H "x-api-key: $SOCIALSCRAPE_API_KEY" \
--data-urlencode "handle=NASA"import os
import requests
params = {
"handle": "NASA",
}
res = requests.get(
"https://api.socialscrape.io/v1/twitter/profile/tweets",
headers={"x-api-key": os.environ["SOCIALSCRAPE_API_KEY"]},
params=params,
)
body = res.json()
if body["ok"]:
print(body["data"])
else:
print(body["error"]["code"], body["error"]["message"])const url = new URL("https://api.socialscrape.io/v1/twitter/profile/tweets");
url.search = new URLSearchParams({
"handle": "NASA"
}).toString();
const res = await fetch(url, {
headers: { "x-api-key": process.env.SOCIALSCRAPE_API_KEY! },
});
const body = await res.json();
if (body.ok) {
console.log(body.data);
} else {
console.error(body.error.code, body.error.message);
}{
"nodes": [
{
"name": "SocialScrape X profile posts",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
0,
0
],
"parameters": {
"method": "GET",
"url": "https://api.socialscrape.io/v1/twitter/profile/tweets",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "handle",
"value": "NASA"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "x-api-key",
"value": "={{ $env.SOCIALSCRAPE_API_KEY }}"
}
]
}
}
}
],
"connections": {}
}Example response#
This is a sample from a recorded response, lists and long text are shortened. Status 200.
{
"ok": true,
"credits_charged": 1,
"credits_remaining": 4999,
"cached": false,
"cached_at": null,
"request_id": "req_2f3acfff478c2a97370e067a",
"data": {
"object": "list",
"items": [
{
"object": "post",
"platform": "twitter",
"id": "2115900247230537920",
"url": "https://x.com/NASA/status/2115900247230537920",
"type": "tweet",
"author": {
"id": "11348282",
"handle": "NASA",
"name": "NASA",
"url": "https://x.com/NASA",
"avatar_url": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",
"verified": true
},
"title": null,
"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, and your name can come along! Join the voyage and claim your boarding pass: https:/...",
"published_at": "2026-10-29T20:15:05Z",
"duration_seconds": null,
"language": "en",
"hashtags": null,
"mentions": null,
"stats": {
"views": 280499,
"likes": 1594,
"comments": 107,
"shares": 386,
"saves": 394,
"dislikes": null
},
"media": {
"thumbnail_url": "https://pbs.twimg.com/media/HV0wDfrWEAEN_2v.jpg",
"video_url": null,
"audio_url": null,
"image_urls": [
"https://pbs.twimg.com/media/HV0wDfrWEAEN_2v.jpg"
],
"width": 8000,
"height": 4501
},
"song": null,
"location": null,
"is_pinned": false,
"is_sponsored": null,
"extra": {
"is_edited": false,
"links": [
{
"display_url": "go.nasa.gov/dragonfly-names",
"url": "https://go.nasa.gov/dragonfly-names"
}
],
"media": [
{
"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 Titan\" and \"Fly your name to another world!\"",
"height": 4501,
"type": "photo",
"url": "https://pbs.twimg.com/media/HV0wDfrWEAEN_2v.jpg",
"width": 8000
}
],
"possibly_sensitive": false,
"quote_count": 64,
"retweet_count": 322
}
},
{
"object": "post",
"platform": "twitter",
"id": "2115753332958433574",
"url": "https://x.com/NASA/status/2115753332958433574",
"type": "tweet",
"author": {
"id": "11348282",
"handle": "NASA",
"name": "NASA",
"url": "https://x.com/NASA",
"avatar_url": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",
"verified": true
},
"title": null,
"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 around 8am ET (1200 UTC) and run for about six and a half hours. https://x.com/i/broad...",
"published_at": "2026-10-29T10:31:18Z",
"duration_seconds": null,
"language": "en",
"hashtags": null,
"mentions": [
"csa_asc",
"Space_Station"
],
"stats": {
"views": 1026589,
"likes": 3039,
"comments": 219,
"shares": 626,
"saves": 173,
"dislikes": null
},
"media": {
"thumbnail_url": null,
"video_url": null,
"audio_url": null,
"image_urls": null,
"width": null,
"height": null
},
"song": null,
"location": null,
"is_pinned": false,
"is_sponsored": null,
"extra": {
"card": {
"url": "https://t.co/xoJPYWty9Z"
},
"is_edited": false,
"links": [
{
"display_url": "x.com/i/broadcasts/1…",
"url": "https://x.com/i/broadcasts/1rxmqpBDDpWxy"
}
],
"possibly_sensitive": false,
"quote_count": 79,
"retweet_count": 547
}
}
],
"cursor": null,
"has_more": false,
"parent": {
"object": "profile",
"platform": "twitter",
"id": "11348282",
"handle": "NASA",
"name": "NASA",
"headline": null,
"url": "https://x.com/NASA",
"kind": "organization",
"bio": "Making the seemingly impossible, possible. ✨",
"avatar_url": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_400x400.jpg",
"banner_url": "https://pbs.twimg.com/profile_banners/11348282/1788992290",
"verified": true,
"is_private": false,
"external_url": "http://www.nasa.gov/",
"links": [
{
"title": "nasa.gov",
"url": "http://www.nasa.gov/"
}
],
"location": "Pale Blue Dot",
"category": null,
"created_at": "2007-12-19T20:20:32Z",
"stats": {
"followers": 92300985,
"following": 115,
"posts": 74471,
"likes": null,
"views": null
},
"extra": {
"affiliates_count": 85,
"birthdate": {
"day": 1,
"month": 10,
"year": 1958
},
"creator_subscriptions_count": 0,
"highlighted_posts": 288,
"is_blue_verified": true,
"possibly_sensitive": false,
"profile_image_shape": "Square",
"subscribers_count": 0,
"verification_reason": "This account is verified because it is a government or multilateral organization account. Learn more",
"verified_type": "Government"
}
}
},
"cursor": null,
"has_more": false
}Response#
A list of Post objects in data.items, with data.cursor and data.has_more.
See Data models for every field. The envelope around data is described in Responses.
Errors#
Failures are free: credits_charged is 0. Branch on error.code, never on the message.
| Code | HTTP | Retry | Meaning |
|---|---|---|---|
invalid_params | 400 | no | A parameter is missing, unknown or has the wrong type. |
not_found | 404 | no | The platform says this profile, post or item does not exist. |
Every request can also fail with the account and platform errors listed on the Errors page.
Also served at#
These paths answer the same request, so code written for other APIs keeps working: /v1/twitter/user-tweets. See Switching from ScrapeCreators.
Related endpoints#
- X post search (
GET /v1/twitter/search/posts) - X profile (
GET /v1/twitter/profile) - X post details (
GET /v1/twitter/tweet) - X video transcript (
GET /v1/twitter/tweet/transcript) - X community (
GET /v1/twitter/community) - X community posts (
GET /v1/twitter/community/tweets)