Skip to content

User Tweets

GET/v1/twitter/user-tweets1 credit

Returns the posts X shows publicly on an account's timeline, each with its text, media, engagement counts, view count and a `url`.

01Query parameters

NameTypeDescription
handleoptionalstringThe account's username, e.g. `NASA`. One of `handle` or `userId` is required; a leading `@` is ignored.
userIdoptionalstringThe account's numeric id, e.g. `11348282`. One of `handle` or `userId` is required; when both are given, `userId` is used.
trimoptionalboolean`true` returns a smaller object per post: `rest_id`, `views`, `legacy` and `url`.Default: false

02Request

curl "https://api.scrapesocial.ai/v1/twitter/user-tweets?handle=NASA" \
  -H "x-api-key: $SCRAPESOCIAL_KEY"

03Responses

Real answers from the API. Lists are shortened to 2 items.

GET /v1/twitter/user-tweets?handle=NASA

{
  "success": true,
  "credits_remaining": 4980,
  "credits_charged": 1,
  "tweets": [
    {
      "__typename": "Tweet",
      "core": {
        "user_results": {
          "result": {
            "__typename": "User",
            "affiliates_highlighted_label": {},
            "has_graduated_access": true,
            "id": "VXNlcjoxMTM0ODI4Mg==",
            "is_blue_verified": true,
            "legacy": {
              "blocked_by": false,
              "blocking": false,
              "can_dm": false,
              "can_media_tag": false,
              "created_at": "Wed Dec 19 20:20:32 +0000 2007",
              "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,
              "followed_by": false,
              "followers_count": 92312407,
              "following": false,
              "friends_count": 115,
              "has_custom_timelines": true,
              "is_translator": false,
              "listed_count": 96844,
              "location": "Pale Blue Dot",
              "media_count": 28207,
              "muting": false,
              "name": "NASA",
              "needs_phone_verification": false,
              "normal_followers_count": 92312407,
              "notifications": false,
              "pinned_tweet_ids_str": [
                "2113776971603689874"
              ],
              "possibly_sensitive": false,
              "profile_banner_url": "https://pbs.twimg.com/profile_banners/11348282/1788992290",
              "profile_image_url_https": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg",
              "profile_interstitial_type": "",
              "protected": false,
              "screen_name": "NASA",
              "statuses_count": 74455,
              "time_zone": "",
              "translator_type": "regular",
              "url": "https://t.co/9NkQJKAnuU",
              "utc_offset": 0,
              "verified": false,
              "verified_type": "Government",
              "withheld_description": "",
              "withheld_scope": ""
            },
            "profile_image_shape": "Square",
            "rest_id": "11348282",
            "super_follow_eligible": false,
            "super_followed_by": false,
            "super_following": false,
            "tipjar_settings": {
              "bandcamp_handle": "",
              "bitcoin_handle": "",
              "cash_app_handle": "",
              "ethereum_handle": "",
              "gofundme_handle": "",
              "is_enabled": false,
              "patreon_handle": "",
              "pay_pal_handle": "",
              "venmo_handle": ""
            }
          }
        }
      },
      "edit_control": {
        "edit_tweet_ids": [
          "2113776971603689874"
        ],
        "editable_until_msecs": "1792802276000",
        "edits_remaining": "5",
        "is_edit_eligible": true
      },
      "is_translatable": false,
      "legacy": {
        "bookmark_count": 336,
        "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": 7359,
        "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": 82,
        "reply_count": 332,
        "retweet_count": 961,
        "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."
          }
        }
      },
      "quick_promote_eligibility": {
        "eligibility": "IneligibleUserUnauthorized"
      },
      "rest_id": "2113776971603689874",
      "unmention_data": {},
      "views": {
        "count": "1267377",
        "state": "EnabledWithCount"
      },
      "url": "https://x.com/NASA/status/2113776971603689874"
    },
    {
      "__typename": "Tweet",
      "core": {
        "user_results": {
          "result": {
            "__typename": "User",
            "affiliates_highlighted_label": {},
            "has_graduated_access": true,
            "id": "VXNlcjoxMTM0ODI4Mg==",
            "is_blue_verified": true,
            "legacy": {
              "blocked_by": false,
              "blocking": false,
              "can_dm": false,
              "can_media_tag": false,
              "created_at": "Wed Dec 19 20:20:32 +0000 2007",
              "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,
              "followed_by": false,
              "followers_count": 92312407,
              "following": false,
              "friends_count": 115,
              "has_custom_timelines": true,
              "is_translator": false,
              "listed_count": 96844,
              "location": "Pale Blue Dot",
              "media_count": 28207,
              "muting": false,
              "name": "NASA",
              "needs_phone_verification": false,
              "normal_followers_count": 92312407,
              "notifications": false,
              "pinned_tweet_ids_str": [
                "2113776971603689874"
              ],
              "possibly_sensitive": false,
              "profile_banner_url": "https://pbs.twimg.com/profile_banners/11348282/1788992290",
              "profile_image_url_https": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg",
              "profile_interstitial_type": "",
              "protected": false,
              "screen_name": "NASA",
              "statuses_count": 74455,
              "time_zone": "",
              "translator_type": "regular",
              "url": "https://t.co/9NkQJKAnuU",
              "utc_offset": 0,
              "verified": false,
              "verified_type": "Government",
              "withheld_description": "",
              "withheld_scope": ""
            },
            "profile_image_shape": "Square",
            "rest_id": "11348282",
            "super_follow_eligible": false,
            "super_followed_by": false,
            "super_following": false,
            "tipjar_settings": {
              "bandcamp_handle": "",
              "bitcoin_handle": "",
              "cash_app_handle": "",
              "ethereum_handle": "",
              "gofundme_handle": "",
              "is_enabled": false,
              "patreon_handle": "",
              "pay_pal_handle": "",
              "venmo_handle": ""
            }
          }
        }
      },
      "edit_control": {
        "edit_tweet_ids": [
          "2114130258912043194"
        ],
        "editable_until_msecs": "1792886507022",
        "edits_remaining": "5",
        "is_edit_eligible": false
      },
      "is_translatable": false,
      "legacy": {
        "bookmark_count": 0,
        "bookmarked": false,
        "conversation_id_str": "2114130258912043194",
        "created_at": "Sat Oct 24 23:01:47 +0000 2026",
        "display_text_range": [
          0,
          140
        ],
        "entities": {
          "user_mentions": [
            {
              "id_str": "2000593641480605696",
              "indices": [
                3,
                13
              ],
              "name": "NASA Administrator Jared Isaacman",
              "screen_name": "NASAAdmin"
            },
            {
              "id_str": "1886776365673803776",
              "indices": [
                82,
                93
              ],
              "name": "Secretary Brooke Rollins",
              "screen_name": "SecRollins"
            }
          ]
        },
        "favorite_count": 0,
        "favorited": false,
        "full_text": "RT @NASAAdmin: Roll Tide and full throttle!\n\nAn incredible day in Tuscaloosa with @SecRollins, from signing a new agreement between @NASA a…",
        "id_str": "2114130258912043194",
        "is_quote_status": false,
        "lang": "en",
        "quote_count": 0,
        "reply_count": 0,
        "retweet_count": 206,
        "retweeted": false,
        "retweeted_status_result": {
          "result": {
            "__typename": "Tweet",
            "core": {
              "user_results": {
                "result": {
                  "__typename": "User",
                  "affiliates_highlighted_label": {
                    "label": {
                      "badge": {
                        "url": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_bigger.jpg"
                      },
                      "description": "NASA",
                      "url": {
                        "url": "https://twitter.com/NASA",
                        "urlType": "DeepLink"
                      },
                      "userLabelDisplayType": "Badge",
                      "userLabelType": "BusinessLabel"
                    }
                  },
                  "has_graduated_access": true,
                  "id": "VXNlcjoyMDAwNTkzNjQxNDgwNjA1Njk2",
                  "is_blue_verified": true,
                  "legacy": {
                    "blocked_by": false,
                    "blocking": false,
                    "can_dm": false,
                    "can_media_tag": false,
                    "created_at": "Mon Dec 15 15:47:57 +0000 2025",
                    "default_profile": true,
                    "default_profile_image": false,
                    "description": "Serving President Donald J. Trump as the 15th @NASA Administrator | Leading the next Golden Age of space discovery 🚀",
                    "entities": {
                      "description": {},
                      "url": {
                        "urls": [
                          {
                            "display_url": "nasa.gov",
                            "expanded_url": "http://www.nasa.gov",
                            "indices": [
                              0,
                              23
                            ],
                            "url": "https://t.co/v3Y5MEaVjW"
                          }
                        ]
                      }
                    },
                    "fast_followers_count": 0,
                    "favourites_count": 5355,
                    "follow_request_sent": false,
                    "followed_by": false,
                    "followers_count": 212970,
                    "following": false,
                    "friends_count": 101,
                    "has_custom_timelines": false,
                    "is_translator": false,
                    "listed_count": 792,
                    "location": "",
                    "media_count": 371,
                    "muting": false,
                    "name": "NASA Administrator Jared Isaacman",
                    "needs_phone_verification": false,
                    "normal_followers_count": 212970,
                    "notifications": false,
                    "pinned_tweet_ids_str": [
                      "2049824441245335821"
                    ],
                    "possibly_sensitive": false,
                    "profile_banner_url": "https://pbs.twimg.com/profile_banners/2000593641480605696/1766090641",
                    "profile_image_url_https": "https://pbs.twimg.com/profile_images/2001755387486232576/mf5hRS_U_normal.jpg",
                    "profile_interstitial_type": "",
                    "protected": false,
                    "screen_name": "NASAAdmin",
                    "statuses_count": 1889,
                    "time_zone": "",
                    "translator_type": "none",
                    "url": "https://t.co/v3Y5MEaVjW",
                    "utc_offset": 0,
                    "verified": false,
                    "verified_type": "Government",
                    "withheld_description": "",
                    "withheld_scope": ""
                  },
                  "profile_image_shape": "Circle",
                  "rest_id": "2000593641480605696",
                  "super_follow_eligible": false,
                  "super_followed_by": false,
                  "super_following": false,
                  "tipjar_settings": {
                    "bandcamp_handle": "",
                    "bitcoin_handle": "",
                    "cash_app_handle": "",
                    "ethereum_handle": "",
                    "gofundme_handle": "",
                    "is_enabled": false,
                    "patreon_handle": "",
                    "pay_pal_handle": "",
                    "venmo_handle": ""
                  }
                }
              }
            },
            "edit_control": {
              "edit_tweet_ids": [
                "2114127143072387241"
              ],
              "editable_until_msecs": "1792885764000",
              "edits_remaining": "5",
              "is_edit_eligible": true
            },
            "is_translatable": false,
            "legacy": {
              "bookmark_count": 57,
              "bookmarked": false,
              "conversation_id_str": "2114127143072387241",
              "created_at": "Sat Oct 24 22:49:24 +0000 2026",
              "display_text_range": [
                0,
                282
              ],
              "entities": {
                "media": [
                  {
                    "allow_download_status": {
                      "allow_download": true
                    },
                    "display_url": "pic.x.com/ThVziAKeLs",
                    "expanded_url": "https://x.com/NASAAdmin/status/2114127143072387241/photo/1",
                    "ext_media_availability": {
                      "status": "Available"
                    },
                    "features": {
                      "large": {
                        "faces": []
                      },
                      "medium": {
                        "faces": []
                      },
                      "orig": {
                        "faces": []
                      },
                      "small": {
                        "faces": []
                      }
                    },
                    "id_str": "2114127134327242752",
                    "indices": [
                      283,
                      306
                    ],
                    "media_key": "3_2114127134327242752",
                    "media_results": {
                      "result": {
                        "media_key": "3_2114127134327242752"
                      }
                    },
                    "media_url_https": "https://pbs.twimg.com/media/HVbjbXOXAAAXJ0a.jpg",
                    "original_info": {
                      "focus_rects": [
                        {
                          "h": 1147,
                          "w": 2048,
                          "x": 0,
                          "y": 0
                        },
                        {
                          "h": 1152,
                          "w": 1152,
                          "x": 448,
                          "y": 0
                        }
                      ],
                      "height": 1152,
                      "width": 2048
                    },
                    "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": "photo",
                    "url": "https://t.co/ThVziAKeLs"
                  },
                  {
                    "allow_download_status": {
                      "allow_download": true
                    },
                    "display_url": "pic.x.com/ThVziAKeLs",
                    "expanded_url": "https://x.com/NASAAdmin/status/2114127143072387241/photo/1",
                    "ext_media_availability": {
                      "status": "Available"
                    },
                    "features": {
                      "large": {
                        "faces": [
                          {
                            "h": 258,
                            "w": 258,
                            "x": 1680,
                            "y": 14
                          }
                        ]
                      },
                      "medium": {
                        "faces": [
                          {
                            "h": 151,
                            "w": 151,
                            "x": 984,
                            "y": 8
                          }
                        ]
                      },
                      "orig": {
                        "faces": [
                          {
                            "h": 258,
                            "w": 258,
                            "x": 1680,
                            "y": 14
                          }
                        ]
                      },
                      "small": {
                        "faces": [
                          {
                            "h": 85,
                            "w": 85,
                            "x": 557,
                            "y": 4
                          }
                        ]
                      }
                    },
                    "id_str": "2114127134318882816",
                    "indices": [
                      283,
                      306
                    ],
                    "media_key": "3_2114127134318882816",
                    "media_results": {
                      "result": {
                        "media_key": "3_2114127134318882816"
                      }
                    },
                    "media_url_https": "https://pbs.twimg.com/media/HVbjbXMXcAAphce.jpg",
                    "original_info": {
                      "focus_rects": [
                        {
                          "h": 1147,
                          "w": 2048,
                          "x": 0,
                          "y": 0
                        },
                        {
                          "h": 1152,
                          "w": 1152,
                          "x": 896,
                          "y": 0
                        }
                      ],
                      "height": 1152,
                      "width": 2048
                    },
                    "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": "photo",
                    "url": "https://t.co/ThVziAKeLs"
                  }
                ],
                "user_mentions": [
                  {
                    "id_str": "1886776365673803776",
                    "indices": [
                      67,
                      78
                    ],
                    "name": "Secretary Brooke Rollins",
                    "screen_name": "SecRollins"
                  },
                  {
                    "id_str": "11348282",
                    "indices": [
                      117,
                      122
                    ],
                    "name": "NASA",
                    "screen_name": "NASA"
                  }
                ]
              },
              "extended_entities": {
                "media": [
                  {
                    "allow_download_status": {
                      "allow_download": true
                    },
                    "display_url": "pic.x.com/ThVziAKeLs",
                    "expanded_url": "https://x.com/NASAAdmin/status/2114127143072387241/photo/1",
                    "ext_media_availability": {
                      "status": "Available"
                    },
                    "features": {
                      "large": {
                        "faces": []
                      },
                      "medium": {
                        "faces": []
                      },
                      "orig": {
                        "faces": []
                      },
                      "small": {
                        "faces": []
                      }
                    },
                    "id_str": "2114127134327242752",
                    "indices": [
                      283,
                      306
                    ],
                    "media_key": "3_2114127134327242752",
                    "media_results": {
                      "result": {
                        "media_key": "3_2114127134327242752"
                      }
                    },
                    "media_url_https": "https://pbs.twimg.com/media/HVbjbXOXAAAXJ0a.jpg",
                    "original_info": {
                      "focus_rects": [
                        {
                          "h": 1147,
                          "w": 2048,
                          "x": 0,
                          "y": 0
                        },
                        {
                          "h": 1152,
                          "w": 1152,
                          "x": 448,
                          "y": 0
                        }
                      ],
                      "height": 1152,
                      "width": 2048
                    },
                    "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": "photo",
                    "url": "https://t.co/ThVziAKeLs"
                  },
                  {
                    "allow_download_status": {
                      "allow_download": true
                    },
                    "display_url": "pic.x.com/ThVziAKeLs",
                    "expanded_url": "https://x.com/NASAAdmin/status/2114127143072387241/photo/1",
                    "ext_media_availability": {
                      "status": "Available"
                    },
                    "features": {
                      "large": {
                        "faces": [
                          {
                            "h": 258,
                            "w": 258,
                            "x": 1680,
                            "y": 14
                          }
                        ]
                      },
                      "medium": {
                        "faces": [
                          {
                            "h": 151,
                            "w": 151,
                            "x": 984,
                            "y": 8
                          }
                        ]
                      },
                      "orig": {
                        "faces": [
                          {
                            "h": 258,
                            "w": 258,
                            "x": 1680,
                            "y": 14
                          }
                        ]
                      },
                      "small": {
                        "faces": [
                          {
                            "h": 85,
                            "w": 85,
                            "x": 557,
                            "y": 4
                          }
                        ]
                      }
                    },
                    "id_str": "2114127134318882816",
                    "indices": [
                      283,
                      306
                    ],
                    "media_key": "3_2114127134318882816",
                    "media_results": {
                      "result": {
                        "media_key": "3_2114127134318882816"
                      }
                    },
                    "media_url_https": "https://pbs.twimg.com/media/HVbjbXMXcAAphce.jpg",
                    "original_info": {
                      "focus_rects": [
                        {
                          "h": 1147,
                          "w": 2048,
                          "x": 0,
                          "y": 0
                        },
                        {
                          "h": 1152,
                          "w": 1152,
                          "x": 896,
                          "y": 0
                        }
                      ],
                      "height": 1152,
                      "width": 2048
                    },
                    "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": "photo",
                    "url": "https://t.co/ThVziAKeLs"
                  }
                ]
              },
              "favorite_count": 2057,
              "favorited": false,
              "full_text": "Roll Tide and full throttle!\n\nAn incredible day in Tuscaloosa with @SecRollins, from signing a new agreement between @NASA and @USDA and meeting with students at @UofAlabama to flying over a packed Bryant-Denny Stadium ahead of Alabama vs. Texas A&M.\n\nThe same spirit that takes https://t.co/ThVziAKeLs",
              "id_str": "2114127143072387241",
              "is_quote_status": false,
              "lang": "en",
              "possibly_sensitive": false,
              "possibly_sensitive_editable": true,
              "quote_count": 14,
              "reply_count": 74,
              "retweet_count": 206,
              "retweeted": false,
              "user_id_str": "2000593641480605696"
            },
            "note_tweet": {
              "is_expandable": true,
              "note_tweet_results": {
                "result": {
                  "entity_set": {
                    "hashtags": [],
                    "symbols": [],
                    "urls": [],
                    "user_mentions": [
                      {
                        "id_str": "1886776365673803776",
                        "indices": [
                          67,
                          78
                        ],
                        "name": "Secretary Brooke Rollins",
                        "screen_name": "SecRollins"
                      },
                      {
                        "id_str": "11348282",
                        "indices": [
                          117,
                          122
                        ],
                        "name": "NASA",
                        "screen_name": "NASA"
                      }
                    ]
                  },
                  "id": "Tm90ZVR3ZWV0OjIxMTQxMjcxNDI5ODg0NDM2NDk=",
                  "text": "Roll Tide and full throttle!\n\nAn incredible day in Tuscaloosa with @SecRollins, from signing a new agreement between @NASA and @USDA and meeting with students at @UofAlabama to flying over a packed Bryant-Denny Stadium ahead of Alabama vs. Texas A&M.\n\nThe same spirit that takes us into the skies will take us back to the Moon and inspire the next generation to take us even farther."
                }
              }
            },
            "rest_id": "2114127143072387241",
            "unmention_data": {},
            "views": {
              "count": "181286",
              "state": "EnabledWithCount"
            }
          }
        },
        "user_id_str": "11348282"
      },
      "quick_promote_eligibility": {
        "eligibility": "IneligibleUserUnauthorized"
      },
      "rest_id": "2114130258912043194",
      "source": "<a href=\"http://twitter.com/download/iphone\" rel=\"nofollow\">Twitter for iPhone</a>",
      "unmention_data": {},
      "views": {
        "count": "48189",
        "state": "EnabledWithCount"
      },
      "url": "https://x.com/NASA/status/2114130258912043194"
    }
  ]
}

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"
}

04Notes

One call, one batch: there is no cursor. X decides which posts it shows publicly; for some accounts that is the newest ~20 posts including reposts, for very large accounts around 100 of their most popular posts. An account with no visible posts returns `tweets: []` for 0 credits; an unknown or suspended account is a free 404. A non-numeric `userId` is a free 400.

05Errors & 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.