Search Posts
GET/v1/twitter/search/posts1 credit
Searches the web for X posts matching a query and returns each hit as a full post object with its `url`.
01Query parameters
| Name | Type | Description |
|---|---|---|
| queryrequired | string | The search text, e.g. `nasa artemis`. |
| cursoroptional | string | The page number to fetch, from `1` to `11`: pass the `cursor` of the previous answer. `null` returns an empty last page.Default: 1 |
02Pricing
1 credit per page with results. A page with no posts, and the `cursor=null` page, cost 0.
03Request
curl "https://api.scrapesocial.ai/v1/twitter/search/posts?query=nasa+artemis" \ -H "x-api-key: $SCRAPESOCIAL_KEY"
04Responses
Real answers from the API. Lists are shortened to 2 items.
GET /v1/twitter/search/posts?query=nasa
{
"success": true,
"credits_remaining": 4980,
"credits_charged": 1,
"query": "nasa",
"posts": [
{
"__typename": "Tweet",
"content_disclosure": {
"ai_generated_disclosure": {
"can_edit": true,
"has_ai_generated_media": false
}
},
"core": {
"user_results": {
"result": {
"__typename": "User",
"affiliates_highlighted_label": {},
"avatar": {
"image_url": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg"
},
"core": {
"created_at": "Wed Dec 19 20:20:32 +0000 2007",
"name": "NASA",
"screen_name": "NASA"
},
"dm_permissions": {
"can_dm": false
},
"follow_request_sent": false,
"has_graduated_access": true,
"id": "VXNlcjoxMTM0ODI4Mg==",
"is_blue_verified": true,
"legacy": {
"default_profile": false,
"default_profile_image": false,
"description": "Making the seemingly impossible, possible. ✨",
"entities": {
"description": {},
"url": {
"urls": [
{
"display_url": "nasa.gov",
"expanded_url": "http://www.nasa.gov/",
"indices": [
0,
23
],
"url": "https://t.co/9NkQJKAnuU"
}
]
}
},
"fast_followers_count": 0,
"favourites_count": 17049,
"follow_request_sent": false,
"followers_count": 92312538,
"friends_count": 115,
"has_custom_timelines": true,
"is_translator": false,
"listed_count": 96843,
"media_count": 28207,
"needs_phone_verification": false,
"normal_followers_count": 92312538,
"notifications": false,
"pinned_tweet_ids_str": [
"2113776971603689874"
],
"possibly_sensitive": false,
"profile_banner_url": "https://pbs.twimg.com/profile_banners/11348282/1788992290",
"profile_interstitial_type": "",
"statuses_count": 74455,
"time_zone": "",
"translator_type": "regular",
"url": "https://t.co/9NkQJKAnuU",
"utc_offset": 0,
"withheld_description": "",
"withheld_scope": ""
},
"location": {
"location": "Pale Blue Dot"
},
"media_permissions": {
"can_media_tag": false
},
"parody_commentary_fan_label": "None",
"privacy": {
"protected": false
},
"profile_bio": {
"description": "Making the seemingly impossible, possible. ✨"
},
"profile_description_language": "en",
"profile_image_shape": "Square",
"relationship_perspectives": {
"blocked_by": false,
"blocking": false,
"followed_by": false,
"following": false,
"muting": false
},
"rest_id": "11348282",
"super_follow_eligible": false,
"super_followed_by": false,
"super_following": false,
"verification": {
"verified": false,
"verified_type": "Government"
}
}
}
},
"edit_control": {
"edit_tweet_ids": [
"2113776971603689874"
],
"editable_until_msecs": "1792802276000",
"edits_remaining": "5",
"is_edit_eligible": true
},
"grok_analysis_button": true,
"grok_annotations": {
"is_image_editable_by_grok": true
},
"is_translatable": false,
"legacy": {
"bookmark_count": 340,
"bookmarked": false,
"conversation_id_str": "2113776971603689874",
"created_at": "Fri Oct 23 23:37:56 +0000 2026",
"display_text_range": [
0,
274
],
"entities": {
"media": [
{
"additional_media_info": {
"monetizable": false
},
"display_url": "pic.x.com/m8taK5B7Oy",
"expanded_url": "https://x.com/NASA/status/2113776971603689874/video/1",
"ext_media_availability": {
"status": "Available"
},
"id_str": "2113776813121941504",
"indices": [
275,
298
],
"media_key": "13_2113776813121941504",
"media_results": {
"result": {
"media_key": "13_2113776813121941504"
}
},
"media_url_https": "https://pbs.twimg.com/media/HVWk812WIAAg_hz.jpg",
"original_info": {
"focus_rects": [],
"height": 2160,
"width": 3840
},
"sizes": {
"large": {
"h": 1152,
"resize": "fit",
"w": 2048
},
"medium": {
"h": 675,
"resize": "fit",
"w": 1200
},
"small": {
"h": 383,
"resize": "fit",
"w": 680
},
"thumb": {
"h": 150,
"resize": "crop",
"w": 150
}
},
"type": "video",
"url": "https://t.co/m8taK5B7Oy",
"video_info": {
"aspect_ratio": [
16,
9
],
"duration_millis": 59893,
"variants": [
{
"content_type": "application/x-mpegURL",
"url": "https://video.twimg.com/amplify_video/2113776813121941504/pl/Sws2JLpHl8xdzMyH.m3u8?tag=16&v=ab6"
},
{
"bitrate": 288000,
"content_type": "video/mp4",
"url": "https://video.twimg.com/amplify_video/2113776813121941504/vid/avc1/480x270/CK1pQpicyNC7ryVp.mp4?tag=16"
}
]
}
}
],
"urls": [
{
"display_url": "go.nasa.gov/4jzartX",
"expanded_url": "https://go.nasa.gov/4jzartX",
"indices": [
165,
188
],
"url": "https://t.co/jSHP2lHuOx"
}
]
},
"extended_entities": {
"media": [
{
"additional_media_info": {
"monetizable": false
},
"display_url": "pic.x.com/m8taK5B7Oy",
"expanded_url": "https://x.com/NASA/status/2113776971603689874/video/1",
"ext_media_availability": {
"status": "Available"
},
"id_str": "2113776813121941504",
"indices": [
275,
298
],
"media_key": "13_2113776813121941504",
"media_results": {
"result": {
"media_key": "13_2113776813121941504"
}
},
"media_url_https": "https://pbs.twimg.com/media/HVWk812WIAAg_hz.jpg",
"original_info": {
"focus_rects": [],
"height": 2160,
"width": 3840
},
"sizes": {
"large": {
"h": 1152,
"resize": "fit",
"w": 2048
},
"medium": {
"h": 675,
"resize": "fit",
"w": 1200
},
"small": {
"h": 383,
"resize": "fit",
"w": 680
},
"thumb": {
"h": 150,
"resize": "crop",
"w": 150
}
},
"type": "video",
"url": "https://t.co/m8taK5B7Oy",
"video_info": {
"aspect_ratio": [
16,
9
],
"duration_millis": 59893,
"variants": [
{
"content_type": "application/x-mpegURL",
"url": "https://video.twimg.com/amplify_video/2113776813121941504/pl/Sws2JLpHl8xdzMyH.m3u8?tag=16&v=ab6"
},
{
"bitrate": 288000,
"content_type": "video/mp4",
"url": "https://video.twimg.com/amplify_video/2113776813121941504/vid/avc1/480x270/CK1pQpicyNC7ryVp.mp4?tag=16"
}
]
}
}
]
},
"favorite_count": 7392,
"favorited": false,
"full_text": "We are not slowing down. 🚀\n\nOur Artemis III mission will send four astronauts to low Earth orbit next year to test critical systems needed for future lunar landings https://t.co/jSHP2lHuOx and we’re accelerating efforts to ensure the success of Artemis IV, the first Artemis https://t.co/m8taK5B7Oy",
"id_str": "2113776971603689874",
"is_quote_status": false,
"lang": "en",
"possibly_sensitive": false,
"possibly_sensitive_editable": true,
"quote_count": 83,
"reply_count": 335,
"retweet_count": 964,
"retweeted": false,
"user_id_str": "11348282"
},
"note_tweet": {
"is_expandable": true,
"note_tweet_results": {
"result": {
"entity_set": {
"hashtags": [],
"symbols": [],
"timestamps": [],
"urls": [
{
"display_url": "go.nasa.gov/4jzartX",
"expanded_url": "https://go.nasa.gov/4jzartX",
"indices": [
165,
188
],
"url": "https://t.co/G5CkHbQhFR"
},
{
"display_url": "go.nasa.gov/4zV3TLc",
"expanded_url": "https://go.nasa.gov/4zV3TLc",
"indices": [
304,
327
],
"url": "https://t.co/zEDKEcLpXY"
}
],
"user_mentions": []
},
"id": "Tm90ZVR3ZWV0OjIxMTM3NzY5NzE0ODIxMTYwOTY=",
"text": "We are not slowing down. 🚀\n\nOur Artemis III mission will send four astronauts to low Earth orbit next year to test critical systems needed for future lunar landings https://t.co/G5CkHbQhFR and we’re accelerating efforts to ensure the success of Artemis IV, the first Artemis mission on the lunar surface https://t.co/zEDKEcLpXY."
}
}
},
"rest_id": "2113776971603689874",
"unmention_data": {},
"views": {
"count": "1270058",
"state": "EnabledWithCount"
},
"url": "https://x.com/NASA/status/2113776971603689874"
},
{
"__typename": "Tweet",
"content_disclosure": {
"ai_generated_disclosure": {
"can_edit": true,
"has_ai_generated_media": false
}
},
"core": {
"user_results": {
"result": {
"__typename": "User",
"affiliates_highlighted_label": {},
"avatar": {
"image_url": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg"
},
"core": {
"created_at": "Wed Dec 19 20:20:32 +0000 2007",
"name": "NASA",
"screen_name": "NASA"
},
"dm_permissions": {
"can_dm": false
},
"follow_request_sent": false,
"has_graduated_access": true,
"id": "VXNlcjoxMTM0ODI4Mg==",
"is_blue_verified": true,
"legacy": {
"default_profile": false,
"default_profile_image": false,
"description": "Making the seemingly impossible, possible. ✨",
"entities": {
"description": {},
"url": {
"urls": [
{
"display_url": "nasa.gov",
"expanded_url": "http://www.nasa.gov/",
"indices": [
0,
23
],
"url": "https://t.co/9NkQJKAnuU"
}
]
}
},
"fast_followers_count": 0,
"favourites_count": 17049,
"follow_request_sent": false,
"followers_count": 92312538,
"friends_count": 115,
"has_custom_timelines": true,
"is_translator": false,
"listed_count": 96843,
"media_count": 28207,
"needs_phone_verification": false,
"normal_followers_count": 92312538,
"notifications": false,
"pinned_tweet_ids_str": [
"2113776971603689874"
],
"possibly_sensitive": false,
"profile_banner_url": "https://pbs.twimg.com/profile_banners/11348282/1788992290",
"profile_interstitial_type": "",
"statuses_count": 74455,
"time_zone": "",
"translator_type": "regular",
"url": "https://t.co/9NkQJKAnuU",
"utc_offset": 0,
"withheld_description": "",
"withheld_scope": ""
},
"location": {
"location": "Pale Blue Dot"
},
"media_permissions": {
"can_media_tag": false
},
"parody_commentary_fan_label": "None",
"privacy": {
"protected": false
},
"profile_bio": {
"description": "Making the seemingly impossible, possible. ✨"
},
"profile_description_language": "en",
"profile_image_shape": "Square",
"relationship_perspectives": {
"blocked_by": false,
"blocking": false,
"followed_by": false,
"following": false,
"muting": false
},
"rest_id": "11348282",
"super_follow_eligible": false,
"super_followed_by": false,
"super_following": false,
"verification": {
"verified": false,
"verified_type": "Government"
}
}
}
},
"edit_control": {
"edit_tweet_ids": [
"2092721435663798658"
],
"editable_until_msecs": "1787782245000",
"edits_remaining": "5",
"is_edit_eligible": true
},
"grok_analysis_button": true,
"grok_annotations": {
"is_image_editable_by_grok": false
},
"is_translatable": false,
"legacy": {
"bookmark_count": 65,
"bookmarked": false,
"conversation_id_str": "2092721435663798658",
"created_at": "Wed Aug 26 21:10:45 +0000 2026",
"display_text_range": [
0,
251
],
"entities": {
"media": [
{
"additional_media_info": {
"monetizable": false
},
"display_url": "pic.x.com/Rh8T5tjgXH",
"expanded_url": "https://x.com/NASA/status/2092721435663798658/video/1",
"ext_media_availability": {
"status": "Available"
},
"id_str": "2092721337252872192",
"indices": [
252,
275
],
"media_key": "13_2092721337252872192",
"media_results": {
"result": {
"media_key": "13_2092721337252872192"
}
},
"media_url_https": "https://pbs.twimg.com/media/HQrXDQEXcAAQbWh.jpg",
"original_info": {
"focus_rects": [],
"height": 1080,
"width": 1920
},
"sizes": {
"large": {
"h": 1080,
"resize": "fit",
"w": 1920
},
"medium": {
"h": 675,
"resize": "fit",
"w": 1200
},
"small": {
"h": 383,
"resize": "fit",
"w": 680
},
"thumb": {
"h": 150,
"resize": "crop",
"w": 150
}
},
"type": "video",
"url": "https://t.co/Rh8T5tjgXH",
"video_info": {
"aspect_ratio": [
16,
9
],
"duration_millis": 28361,
"variants": [
{
"content_type": "application/x-mpegURL",
"url": "https://video.twimg.com/amplify_video/2092721337252872192/pl/uMizd8sCvvFiwsDy.m3u8?tag=14&v=7b6"
},
{
"bitrate": 288000,
"content_type": "video/mp4",
"url": "https://video.twimg.com/amplify_video/2092721337252872192/vid/avc1/480x270/jt0ntSmMXdkdb2ZO.mp4?tag=14"
}
]
}
}
],
"urls": [
{
"display_url": "go.nasa.gov/3UVyxoc",
"expanded_url": "https://go.nasa.gov/3UVyxoc",
"indices": [
228,
251
],
"url": "https://t.co/hQdipdo8gG"
}
],
"user_mentions": [
{
"id_str": "1854812412",
"indices": [
12,
22
],
"name": "Nancy Grace Roman Space Telescope",
"screen_name": "NASARoman"
}
]
},
"extended_entities": {
"media": [
{
"additional_media_info": {
"monetizable": false
},
"display_url": "pic.x.com/Rh8T5tjgXH",
"expanded_url": "https://x.com/NASA/status/2092721435663798658/video/1",
"ext_media_availability": {
"status": "Available"
},
"id_str": "2092721337252872192",
"indices": [
252,
275
],
"media_key": "13_2092721337252872192",
"media_results": {
"result": {
"media_key": "13_2092721337252872192"
}
},
"media_url_https": "https://pbs.twimg.com/media/HQrXDQEXcAAQbWh.jpg",
"original_info": {
"focus_rects": [],
"height": 1080,
"width": 1920
},
"sizes": {
"large": {
"h": 1080,
"resize": "fit",
"w": 1920
},
"medium": {
"h": 675,
"resize": "fit",
"w": 1200
},
"small": {
"h": 383,
"resize": "fit",
"w": 680
},
"thumb": {
"h": 150,
"resize": "crop",
"w": 150
}
},
"type": "video",
"url": "https://t.co/Rh8T5tjgXH",
"video_info": {
"aspect_ratio": [
16,
9
],
"duration_millis": 28361,
"variants": [
{
"content_type": "application/x-mpegURL",
"url": "https://video.twimg.com/amplify_video/2092721337252872192/pl/uMizd8sCvvFiwsDy.m3u8?tag=14&v=7b6"
},
{
"bitrate": 288000,
"content_type": "video/mp4",
"url": "https://video.twimg.com/amplify_video/2092721337252872192/vid/avc1/480x270/jt0ntSmMXdkdb2ZO.mp4?tag=14"
}
]
}
}
]
},
"favorite_count": 1413,
"favorited": false,
"full_text": "On Aug. 30, @NASARoman is scheduled to lift off to orbit after years of building and preparing for space.\n\nMeet some of the mission engineers who made the telescope happen in our newest NASA's Curious Universe podcast on Roman: https://t.co/hQdipdo8gG https://t.co/Rh8T5tjgXH",
"id_str": "2092721435663798658",
"is_quote_status": false,
"lang": "en",
"possibly_sensitive": false,
"possibly_sensitive_editable": true,
"quote_count": 17,
"reply_count": 62,
"retweet_count": 175,
"retweeted": false,
"user_id_str": "11348282"
},
"rest_id": "2092721435663798658",
"unmention_data": {},
"views": {
"count": "805616",
"state": "EnabledWithCount"
},
"url": "https://x.com/NASA/status/2092721435663798658"
}
],
"cursor": "2"
}Common to every endpoint
Any route can answer these: a missing or wrong key, no credits left, the platform not answering, or a failure on our side. None of them costs credits.
GET /v1/cosmos/profile?handle=design
{
"success": false,
"message": "Invalid API key"
}05Notes
The answer has `query`, `posts` and `cursor`, the next page number as a string, or null when there are no more pages. A page covers 10 search results, so it usually holds 8 to 10 posts; results that are not posts or cannot be read are left out. Results come from web search, so they differ from X's own search. A cursor outside 1 to 11 is a free 400. Web search engines also answer loosely related pages when nothing matches, so only results that name the query's words (in their title, snippet or URL) are kept: a query nothing matches answers the empty list for 0 credits.
06Errors & credits
Every error has success: false, a real HTTP status and costs no credits.
400missing_parameter
A required parameter is missing or invalid.
403private_account
The account is private or age-restricted.
404not_found
No such account.
503upstream_error
The platform did not answer; retry shortly.