# X (Twitter) Scraper — Zapi reference > Tweet detail (text, author, media, likes/reposts/quotes/replies/bookmarks/views) and top replies. Public, no login. **Base URL:** `https://api.zapi.ink` **Auth:** Send `x-api-key: YOUR_KEY` header on every request. Get a free key at https://zapi.ink/dashboard/keys. **Response envelope:** success `{ project, data, timestamp }` (`data` is the payload); errors `{ content, message, errors }` **Rate limit:** free tier 100 req/min and 600 req/month; paid plans at https://zapi.ink/pricing. **Related:** - Detail page: https://zapi.ink/api/social-media/x-scraper - Category in the catalog: https://zapi.ink/?cat=social-media - Category reference: https://zapi.ink/category/social-media/llms.txt - Concise index: https://zapi.ink/llms.txt - Full reference: https://zapi.ink/llms-full.txt --- ## X (Twitter) Scraper **Category:** social-media · **Slug:** `x-scraper` **Detail page:** https://zapi.ink/api/social-media/x-scraper Tweet detail (text, author, media, likes/reposts/quotes/replies/bookmarks/views) and top replies. Public, no login. **Tags:** x, twitter, social-media ### Tweet Detail Tweet by URL or id: text, author, media, metrics, createdAt. viewCount null for pre-2023 tweets. - **Method:** `GET` - **Endpoint:** `https://api.zapi.ink/v1/social-media:x-scraper/post` - **Cache TTL:** 300s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `url` | string | query | no | Tweet URL (x.com / twitter.com). | | `id` | string | query | no | Tweet id (alternative to url). | | `fresh` | enum(true|false) | query | no | Skip cache (impact rounds). | **cURL:** ```bash curl "https://api.zapi.ink/v1/social-media:x-scraper/post?url=https%3A%2F%2Fx.com%2FSpaceX%2Fstatus%2F1732824684683784516&id=1732824684683784516&fresh=false" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zapi.ink/v1/social-media:x-scraper/post?url=https%3A%2F%2Fx.com%2FSpaceX%2Fstatus%2F1732824684683784516&id=1732824684683784516&fresh=false", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zapi.ink/v1/social-media:x-scraper/post?url=https%3A%2F%2Fx.com%2FSpaceX%2Fstatus%2F1732824684683784516&id=1732824684683784516&fresh=false", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` --- ### Tweet Replies Top replies (first page, ~18-35) of a tweet by URL or id, with total reply count. - **Method:** `GET` - **Endpoint:** `https://api.zapi.ink/v1/social-media:x-scraper/replies` - **Cache TTL:** 300s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `url` | string | query | no | Tweet URL. | | `id` | string | query | no | Tweet id (alternative to url). | | `fresh` | enum(true|false) | query | no | Skip cache (impact rounds). | **cURL:** ```bash curl "https://api.zapi.ink/v1/social-media:x-scraper/replies?url=https%3A%2F%2Fx.com%2FSpaceX%2Fstatus%2F1732824684683784516&id=1732824684683784516&fresh=false" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zapi.ink/v1/social-media:x-scraper/replies?url=https%3A%2F%2Fx.com%2FSpaceX%2Fstatus%2F1732824684683784516&id=1732824684683784516&fresh=false", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zapi.ink/v1/social-media:x-scraper/replies?url=https%3A%2F%2Fx.com%2FSpaceX%2Fstatus%2F1732824684683784516&id=1732824684683784516&fresh=false", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` --- _Generated: 2026-10-10T21:02:34.586Z_