Skip to main content
This guide walks you through retrieving your bookmarked Posts using the X API.
PrerequisitesBefore you begin, you’ll need:
  • A developer account with an approved App
  • User Access Token with bookmark.read scope (OAuth 2.0 PKCE)

Get your bookmarks

1

Get your user ID

You need your authenticated user’s ID. You can find it using the /2/users/me endpoint or from the user lookup endpoint.
2

Request your bookmarks

cURL
curl "https://api.x.com/2/users/2244994945/bookmarks?\
tweet.fields=created_at,public_metrics,author_id&\
max_results=10" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN"
3

Review the response

{
  "data": [
    {
      "id": "1501258597237342208",
      "text": "Have you built a project using the X API you'd like to share with the community? We'd love to hear from you!",
      "created_at": "2024-01-15T10:30:00.000Z",
      "author_id": "2244994945",
      "public_metrics": {
        "retweet_count": 15,
        "reply_count": 8,
        "like_count": 89,
        "quote_count": 3
      }
    },
    {
      "id": "1501258542258348032",
      "text": "This is just one way developer innovation helps make X a better place...",
      "created_at": "2024-01-15T09:15:00.000Z",
      "author_id": "2244994945",
      "public_metrics": {
        "retweet_count": 22,
        "reply_count": 5,
        "like_count": 156,
        "quote_count": 7
      }
    }
  ],
  "meta": {
    "result_count": 2,
    "next_token": "7140dibdnow9c7btw4539n0vybdnx19ylpayqf16fjt4l"
  }
}

Include author information

Use expansions to get data about Post authors:
cURL
curl "https://api.x.com/2/users/2244994945/bookmarks?\
tweet.fields=created_at,author_id&\
expansions=author_id&\
user.fields=username,verified" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN"

Required scopes

When using OAuth 2.0 PKCE, your access token must have these scopes:
ScopeDescription
bookmark.readRead bookmarks
tweet.readRead Post data
users.readRead user data (for expansions)

Next steps