Skip to main content

Like / Unlike

Like / Unlike

Like or unlike tweets from your connected X account. Each operation consumes 100 flat credits.

POST/v2/tweets/:tweetId/likeLike a tweet.
ParameterTypeRequiredDefaultDescription
tweetIdstringrequired—The numeric tweet ID to like (path parameter)
BASH
curl -X POST https://xcrop.io/api/v2/tweets/1893045621038174208/like \
  -H "Authorization: Bearer $XCROP_API_KEY"
ResponseJSON
{
  "success": true,
  "data": {
    "tweet_id": "1893045621038174208",
    "liked": true
  },
  "meta": { "latency_ms": 342 }
}
DELETE/v2/tweets/:tweetId/likeUnlike a previously liked tweet.
BASH
curl -X DELETE https://xcrop.io/api/v2/tweets/1893045621038174208/like \
  -H "Authorization: Bearer $XCROP_API_KEY"
ResponseJSON
{
  "success": true,
  "data": {
    "tweet_id": "1893045621038174208",
    "unliked": true
  },
  "meta": { "latency_ms": 287 }
}

More in Write API

Full documentation with search: xcrop.io/docs