Sources › Social media › X (Twitter) › User Tweets

X (Twitter) User Tweets API

Latest posts of a public X account (or its media tab), 20 per page with cursor pagination. Text, media, likes, replies, reposts, quotes, bookmarks, views.

X (Twitter)GET /user-tweetsAll plans1 Zap

Request

GET
https://api.zapi.ink/v1/social-media:x-scraper/user-tweets

Send your key in the x-api-key header. The response is JSON in the { project, data, timestamp } envelope, and an identical request is served from cache for 5 minutes.

Parameters

NameTypeInRequiredDescription
usernamestringqueryYesX username (with or without @) or profile URL Example: elonmusk
typeenum: tweets | mediaqueryNotweets = latest posts & reposts (default), media = media tab only Example: tweets
cursorstringqueryNoPagination cursor — pass nextCursor from the previous response

Code examples

cURL
curl -X GET "https://api.zapi.ink/v1/social-media:x-scraper/user-tweets?username=elonmusk&type=tweets&cursor=" \
  -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
JavaScript
const res = await fetch("https://api.zapi.ink/v1/social-media:x-scraper/user-tweets?username=elonmusk&type=tweets&cursor=", {
  method: "GET",
  headers: {
    "x-api-key": "zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
  },
});
const data = await res.json();
console.log(data);
Python
import requests

res = requests.get(
    "https://api.zapi.ink/v1/social-media:x-scraper/user-tweets",
    params={"username":"elonmusk","type":"tweets","cursor":""},
    headers={"x-api-key":"zpi_xxxxxxxxxxxxxxxxxxxxxxxx"},
)
print(res.json())

Frequently asked questions

How do I call the X (Twitter) User Tweets API?

Send a GET request to https://api.zapi.ink/v1/social-media:x-scraper/user-tweets?username=elonmusk with your Zapi key in the x-api-key header. Parameters — required: username; optional: type, cursor. The response is JSON in the { project, data, timestamp } envelope.

What does the X (Twitter) User Tweets API return?

Latest posts of a public X account (or its media tab), 20 per page with cursor pagination.

Is the X (Twitter) User Tweets API free?

Yes. It is on the Zapi free tier: 600 Zap a month with one API key and no credit card. Each call costs 1 Zap. Paid plans raise the limits.

Can an AI assistant call the X (Twitter) User Tweets API?

Yes. Add the Zapi MCP server (https://mcp.zapi.ink/mcp) to Claude, Cursor or another MCP client and ask in plain words; it calls run_scraper with scraper "x-scraper" and endpoint "user-tweets".

What other X (Twitter) API endpoints are there?

It has 3 endpoints. Besides User Tweets: Tweet Detail, Tweet Replies.