Docs
User articles

User articles

X Articles (long-form posts) published by a user.

GET/user/{userId}/articles

Parameters

  • userIdpath · string · required

    Numeric user ID (digits only, up to 30). To pass a handle instead, use -1 here and set username.

  • usernamequery · string · optional

    Handle, with or without @. When set, it is used instead of userId: the API looks up the ID first, which makes the call a little slower. Still one billed call.

  • countquery · integer · optional · default 20

    Number of items to ask X for. Sent to X as is; X treats it as a hint and decides how many it returns (follower and following pages often hold 50 to 70 users for count=20). A value that is not a number falls back to 20.

  • cursorquery · string · optional

    Bottom cursor from the previous page. Leave it out for the first page. See Pagination.

  • includePromotedContentquery · boolean · optional · default true

    Ask X to include promoted tweets. Accepts true/false, 1/0.

Paginated: pass the bottom cursor of one page as cursor to get the next. Each page is one billed call. See Pagination.

Notes

  • An entry can have an empty tweet_results ({}) when X no longer returns that article (deleted or restricted). Skip such entries.

Example request

curl 'https://api.twittrapi.com/user/12/articles?count=20' \
  --header 'X-API-KEY: YOUR_API_KEY'

Base URL https://api.twittrapi.com, key in the X-API-KEY header. Python and Node.js use the official SDKs.

Response

Raw JSON of X's UserArticlesTweets query.

Simple format (?format=simple or X-Response-Format: simple): Collection of Tweet objects: {data: [Tweet], nextCursor, previousCursor, hasNextPage}. Each item carries its article (title, previewText, coverImageUrl, publishedAt). Schema.

{
  "data": {
    "user": {
      "result": {
        "__typename": "User",
        "timeline": {
          "timeline": {
            "instructions": [
              {
                "entries": [
                  {
                    "content": {
                      "__typename": "TimelineTimelineItem",
                      "entryType": "TimelineTimelineItem",
                      "itemContent": {
                        "__typename": "TimelineTweet",
                        "itemType": "TimelineTweet",
                        "tweetDisplayType": "Tweet",
                        "tweet_results": {
                          "result": {
                            "__typename": "Tweet",
                            "article": {
                              "article_results": {
                                "result": {
                                  "cover_media": {
                                    "id": "QXBpTWVkaWE6DAAFCgABHFP2rhVaIAEKAAIAAAAAhc/ngQAA",
                                    "media_id": "2041246283671937025",
                                    "media_info": {
                                      "__typename": "ApiImage",
                                      "color_info": {
                                        "palette": [
                                          {
                                            "percentage": 94.58,
                                            "rgb": {
                                              "blue": 15,
                                              "green": 15,
                                              "red": 15
                                            }
                                          },
                                          {
                                            "percentage": 4.67,
                                            "rgb": {
                                              "blue": 116,
                                              "green": 116,
                                              "red": 116
                                            }
                                          },
                                          {
                                            "percentage": 0.49,
                                            "rgb": {
                                              "blue": 191,
                                              "green": 191,
                                              "red": 191
                                            }
                                          }
                                        ]
                                      },
                                      "original_img_height": 640,
                                      "original_img_url": "https://pbs.twimg.com/media/HFP2rhVaIAEfQkI.jpg",
                                      "original_img_width": 1600
                                    },
                                    "media_key": "3_2041246283671937025"
                                  },
                                  "id": "QXJ0aWNsZUVudGl0eToyMDQxMjI1NjYzMDQ3MTUxNjE2",
                                  "lifecycle_state": {
                                    "modified_at_secs": 1775517828
                                  },
                                  "metadata": {
                                    "first_published_at_secs": 1775517828
                                  },
                                  "preview_text": "We've been busy...\n \n \n \nMajor Upgrades to X API (and much more coming 🚀)\n \nPay-Per-Use API is Here!\nWe’ve officially launched our new Pay-Per-Use pricing model to all developers worldwide. Unlock",
                                  "rest_id": "2041225663047151616",
                                  "title": "X API Major Upgrades "
                                }
                              }
                            },
                            "card": {
                              "rest_id": "https://t.co/R92Vd7IICI"
                            },
                            "core": {
                              "user_results": {
                                "result": {
                                  "__typename": "User",
                                  "affiliates_highlighted_label": {
                                    "label": {
                                      "badge": {
                                        "url": "https://pbs.twimg.com/profile_images/1955359038532653056/OSHY3ewP_bigger.jpg"
                                      },
                                      "description": "X",
                                      "url": {
                                        "url": "https://twitter.com/X",
                                        "urlType": "DeepLink"
                                      },
                                      "userLabelDisplayType": "Badge",
                                      "userLabelType": "BusinessLabel"
                                    }
                                  },
                                  "avatar": {
                                    "image_url": "https://pbs.twimg.com/profile_images/1683501992314798080/xl1POYLw_normal.jpg"
                                  },
                                  "core": {
                                    "created_at": "Sat Dec 14 04:35:55 +0000 2013",
                                    "name": "Developers",
                                    "screen_name": "XDevelopers"
                                  },
                                  "dm_permissions": {
                                    "can_dm": true
                                  },
                                  "follow_request_sent": false,
                                  "has_graduated_access": true,
                                  "id": "VXNlcjoyMjQ0OTk0OTQ1",
                                  "is_blue_verified": true,
                                  "legacy": {
                                    "default_profile": false,
                                    "default_profile_image": false,
                                    "description": "The voice of the X Dev team and your official source for updates, news, and events, related to the X API.",
                                    "entities": {
                                      "description": {},
                                      "url": {
                                        "urls": [
                                          {
                                            "display_url": "docs.x.com",
                                            "expanded_url": "https://docs.x.com/",
                                            "indices": [
                                              0,
                                              23
                                            ],
                                            "url": "https://t.co/NIwHVIVyrN"
                                          }
                                        ]
                                      }
                                    },
                                    "fast_followers_count": 0,
                                    "favourites_count": 2758,
                                    "follow_request_sent": false,
                                    "followers_count": 698074,
                                    "friends_count": 770,
                                    "has_custom_timelines": true,
                                    "is_translator": false,
                                    "listed_count": 2977,
                                    "media_count": 832,
                                    "needs_phone_verification": false,
                                    "normal_followers_count": 698074,
                                    "notifications": false,
                                    "pinned_tweet_ids_str": [
                                      "2019881223666233717"
                                    ],
                                    "possibly_sensitive": false,
                                    "profile_banner_url": "https://pbs.twimg.com/profile_banners/2244994945/1690213128",
                                    "profile_interstitial_type": "",
                                    "statuses_count": 4376,
                                    "time_zone": "",
                                    "translator_type": "regular",
                                    "url": "https://t.co/NIwHVIVyrN",
                                    "utc_offset": 0,
                                    "want_retweets": false,
                                    "withheld_description": "",
                                    "withheld_scope": ""
                                  },
                                  "location": {
                                    "location": "127.0.0.1"
                                  },
                                  "media_permissions": {
                                    "can_media_tag": true
                                  },
                                  "parody_commentary_fan_label": "None",
                                  "privacy": {
                                    "protected": false
                                  },
                                  "professional": {
                                    "category": [
                                      {
                                        "icon_name": "IconBriefcaseStroke",
                                        "id": 1009,
                                        "name": "Community"
                                      }
                                    ],
                                    "professional_type": "Business",
                                    "rest_id": "1516891231749517312"
                                  },
                                  "profile_bio": {
                                    "description": "The voice of the X Dev team and your official source for updates, news, and events, related to the X API."
                                  },
                                  "profile_description_language": "en",
                                  "profile_image_shape": "Square",
                                  "relationship_perspectives": {
                                    "blocked_by": false,
                                    "blocking": false,
                                    "followed_by": false,
                                    "following": false,
                                    "muting": false
                                  },
                                  "rest_id": "2244994945",
                                  "super_follow_eligible": false,
                                  "super_followed_by": false,
                                  "super_following": false,
                                  "verification": {
                                    "verified": false,
                                    "verified_type": "Business"
                                  }
                                }
                              }
                            },
                            "edit_control": {
                              "edit_tweet_ids": [
                                "2041295840325636551"
                              ],
                              "editable_until_msecs": "1775521428000",
                              "edits_remaining": "5",
                              "is_edit_eligible": false
                            },
                            "grok_analysis_button": true,
                            "grok_annotations": {
                              "is_image_editable_by_grok": false
                            },
                            "is_translatable": false,
                            "legacy": {
                              "bookmark_count": 202,
                              "bookmarked": false,
                              "conversation_id_str": "2041295840325636551",
                              "created_at": "Mon Apr 06 23:23:48 +0000 2026",
                              "display_text_range": [
                                0,
                                23
                              ],
                              "entities": {
                                "urls": [
                                  {
                                    "display_url": "x.com/i/article/2041…",
                                    "expanded_url": "http://x.com/i/article/2041225663047151616",
                                    "indices": [
                                      0,
                                      23
                                    ],
                                    "url": "https://t.co/R92Vd7IICI"
                                  }
                                ]
                              },
                              "favorite_count": 519,
                              "favorited": false,
                              "full_text": "https://t.co/R92Vd7IICI",
                              "id_str": "2041295840325636551",
                              "is_quote_status": false,
                              "lang": "zxx",
                              "possibly_sensitive": false,
                              "possibly_sensitive_editable": true,
                              "quote_count": 21,
                              "reply_count": 60,
                              "retweet_count": 83,
                              "retweeted": false,
                              "user_id_str": "2244994945"
                            },
                            "rest_id": "2041295840325636551",
                            "unmention_data": {},
                            "views": {
                              "count": "85361",
                              "state": "EnabledWithCount"
                            }
                          }
                        }
                      }
                    },
                    "entryId": "tweet-2041295840325636551",
                    "sortIndex": "2109014686744707071"
                  },
                  {
                    "content": {
                      "__typename": "TimelineTimelineCursor",
                      "cursorType": "Top",
                      "entryType": "TimelineTimelineCursor",
                      "value": "DAAJAAA"
                    },
                    "entryId": "cursor-top-2109014686744707073",
                    "sortIndex": "2109014686744707073"
                  },
                  {
                    "content": {
                      "__typename": "TimelineTimelineCursor",
                      "cursorType": "Bottom",
                      "entryType": "TimelineTimelineCursor",
                      "value": "DAABCgABHUS5rv1___sKAAIAAAAAAAAAAAgAAwAAAAIAAA"
                    },
                    "entryId": "cursor-bottom-2109014686744707069",
                    "sortIndex": "2109014686744707069"
                  }
                ],
                "type": "TimelineAddEntries"
              }
            ]
          }
        }
      }
    }
  }
}

In the raw format, field names and nesting come from X and can change without notice. See Response format; the simple format keeps a fixed schema.

Errors

  • 422userId is not numeric, or the username lookup failed.
  • 400userId is -1 and username is missing, the username contains characters X blocks, or the user could not be found.

Errors every endpoint can return (401, 402, 403, 404, 408, 409, 429, 5xx), and which of them are charged, are on the Errors page. Calls that fail with 400, 408, 409 or a 5xx error are refunded.