Skip to main content
The Likes endpoints let you like and unlike Posts, see which users liked a Post, and get Posts liked by a user.

Overview

Like a Post

Like a Post on behalf of a user

Unlike a Post

Remove a like from a Post

Liking users

See who liked a Post

Liked Posts

Get Posts a user has liked

Endpoints

Likes lookup

MethodEndpointDescription
GET/2/tweets/:id/liking_usersGet users who liked a Post
GET/2/users/:id/liked_tweetsGet Posts liked by a user

Manage likes

MethodEndpointDescription
POST/2/users/:id/likesLike a Post
DELETE/2/users/:id/likes/:tweet_idUnlike a Post

Important notes

The liking users endpoint returns a maximum of 100 users per Post for all time, regardless of the actual number of likes.

Example: Get liking users

curl "https://api.x.com/2/tweets/1234567890/liking_users?\
user.fields=username,verified" \
  -H "Authorization: Bearer $BEARER_TOKEN"

Example: Like a Post

curl -X POST "https://api.x.com/2/users/123456789/likes" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"tweet_id": "1234567890"}'

Getting started

Prerequisites