Introduction

Introduction

Liking Posts is one of the core features people use to engage in the public conversation on  X. With endpoints in our Likes lookup endpoint group, you can see a list of accounts that have liked a given Post, or which Posts a given account has liked. You could use these endpoints to understand what kind of content a specified account or group of accounts likes. 

 

Likes lookup

With endpoints in the Likes lookup group, you can retrieve a list of accounts that have liked a Post, or a list of Posts that an account has liked. These endpoints include:

  • Posts liked by a user - GET /2/users/:id/liked_tweets
  • Users who have liked a Post - GET /2/tweets/:id/liking_users

You can authenticate these endpoints with either OAuth 1.0a User Context or OAuth 2.0 Bearer Token. For the liked Posts endpoints, pagination tokens will be provided for paging through large sets of results.

The liking users endpoint limits you to a total of 100 liking accounts per post for all time.  Additionally, the liked Posts endpoint is also subject to the monthly Post cap applied at the Project level.
 

Manage Likes

The manage Likes endpoints enable you to like or unlike a specified Post on behalf of an authenticated account. For this endpoint group, there are two methods available POST and DELETE. The POST method allows you to like a Post, and the DELETE method will enable you to unlike a Post.

Since you are making requests on behalf of a user, you must authenticate these endpoints with OAuth 1.0a User Context and use the Access Tokens associated with the user, which can be generated using the 3-legged OAuth flow. You can like a Post from your account or an account of an authenticated user. With both endpoints, there is a user rate limit of 50 requests per 15 minutes per endpoint. 
 

To access these endpoint, you must have an approved developer account. When authenticating, you must use keys and tokens from a developer App that is located within a Project

Learn more about getting access to the X API v2 endpoints in our getting started page.