Your team needs reliable Twitter-style profile and activity data this week—no OAuth dance, no scraping, just clean endpoints you can ship. By the end of this guide you’ll know how to fetch profile metadata, following lists, and recent replies for any public screen name using the Twitter Data All-in-One API on Zyla API Hub, with ready-to-run curl and Python examples you can drop into your service.
What you can build with this API
The Twitter Data All-in-One API exposes key social signals developers typically need:
- Profile snapshots: account status, verification, avatar, basic counts, and metadata.
- Following lists: who a user follows, including bios and counts for quick ranking.
- Reply timelines: recent replies/retweets with engagement counters and author context.
Typical use cases include social signup enrichment, author pages in content apps, brand monitoring dashboards, and lightweight analytics pipelines—all without managing the underlying social network’s changing web surface.
Getting started on Zyla API Hub
The Twitter Data All-in-One API is available on Zyla API Hub, which provides one account, one API key, and a subscription + quota model across more than 10,000 public APIs. To get an API key:
- Open the listing and subscribe: Start 7-day trial on Twitter Data All-in-One API.
- Copy your API key from the dashboard.
- Send requests with the header Authorization: Bearer YOUR_API_KEY.
Access is subscription-based (not pay-per-call). Check the API page for current access options and pricing. The first integration can start on a 7-day trial from the listing page.
Endpoints overview
Below are the documented endpoints with methods, exact request URLs, and required parameters. All endpoints require the Authorization header with your key.
1) Profile
Returns a general profile snapshot for a given screen name.
- Method: GET
- URL: https://zylalabs.com/api/3399/twitter-data-all-in-one-api/3673/profile
- Required query params: screenname
Official example (copy-paste as-is):
curl -s -X GET "https://zylalabs.com/api/3399/twitter-data-all-in-one-api/3673/profile?screenname=elonmusk" \
-H "Authorization: Bearer YOUR_API_KEY"
Official JSON response (sample):
{
"status": "active",
"profile": "MikeCiesla",
"rest_id": "23880336",
"blue_verified": true,
"affiliates": [],
"business_account": [],
"avatar": "https://pbs.twimg.com/profile_images/1699329166234247168/G1W8YKJy_normal.jpg",
"header_image": "https://pbs.twimg.com/profile_banners/23880336/1695301088",
"desc": "Web3 at Google Cloud",
"name": "MikeCiesla",
"protected": null,
"location": "🦘🇦🇺",
"friends": 969,
"sub_count": 219,
"statuses_count": 48,
"media_count": 2,
"pinned_tweet_ids_str": [],
"created_at": "Thu Mar 12 02:45:15 +0000 2009",
"id": "23880336"
}
Notes you’ll likely use:
- status indicates account state.
- rest_id and id are string identifiers for the user.
- blue_verified is a boolean you can surface directly.
- avatar and header_image are ready-to-display image URLs.
- friends typically maps to following count; media_count and statuses_count are useful for ranking activity.
- created_at is a timestamp string; treat it as UTC.
2) About profile
Returns additional information about a profile, including verification context and account metadata.
- Method: GET
- URL: https://zylalabs.com/api/3399/twitter-data-all-in-one-api/22582/about-profile
- Required query params: screenname
Example request (copy-paste as-is):
Example response:
Highlights:
- affiliates.label contains a badge and descriptive link you can show alongside the profile.
- verified_since is a string; if you need to display it, handle as-is unless you transform it downstream.
- about fields help explain account origin, location accuracy, and affiliate username.
3) Following
Returns the list of accounts a user is following.
- Method: GET
- URL: https://zylalabs.com/api/3399/twitter-data-all-in-one-api/3679/following
- Required query params: screenname
Example request (copy-paste as-is):
Example response:
Implementation tips:
- Use followers_count and friends_count to score influence or filter noisy accounts.
- more_users indicates whether pagination is available for additional results; check this boolean to decide if you need to request more pages (if the API exposes pagination on your plan, see the listing docs for details).
4) User replies
Returns a timeline focused on a user’s replies (and may include retweets), with engagement counters and referenced tweet data.
- Method: GET
- URL: https://zylalabs.com/api/3399/twitter-data-all-in-one-api/3682/user-replies
- Required query params: screenname
Example request (copy-paste as-is):
Example response (truncated here as provided):
{"timeline":[{"tweet_id":"1867196702865674450","bookmarks":0,"created_at":"Thu Dec 12 13:15:59 +0000 2024","favorites":0,"text":"RT @cb_doge: Every citizen journalist who fought the legacy media narrative and spread the truth this election is the Person of the Year.…","lang":"en","in_reply_to_status_id_str":null,"views":null,"quotes":0,"replies":0,"retweets":10,"conversation_id":"1867196702865674450","media":[],"entities":{"user_mentions":[{"id_str":"1389913567671975937","name":"DogeDesigner","screen_name":"cb_doge"}],"urls":[],"hashtags":[],"symbols":[]},"author":{"rest_id":"44196397","name":"Elon Musk","screen_name":"elonmusk","followers_count":207267106,"favourites_count":99802,"avatar":"https:\/\/pbs.twimg.com\/profile_images\/1858316737780781056\/kPL61o0F_normal.jpg","blue_verified":true},"retweeted":{"id":"1867196122143563838"},"retweeted_tweet":{"tweet_id":"1867196122143563838","bookmarks":0,"created_at":"Thu Dec 12 13:13:41 +0000 2024","favorites":119,"text":"Every citizen journalist who fought the legacy media narrative and spread the truth this election is the Person of the Year. \n\n https:\/\/t.co\/B8boPofzKx","lang":"en","quotes":2,"replies":60,"retweets":10,"conv…
What to watch for:
- created_at fields are timestamp strings; normalize to UTC in storage if you aggregate.
- entities provide mentions/hashtags for downstream NLP or linkification.
- retweeted and retweeted_tweet give you context to render retweets distinctly from replies.
Authentication
Every request must include the header:
Authorization: Bearer YOUR_API_KEY
The API key is issued on subscription from the Zyla API Hub listing. Do not put the key in query parameters.
Copy-pasteable code you can ship
curl (official profile example)
Python: fetch “About profile” and read verification and affiliate badge
import requests
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://zylalabs.com/api/3399/twitter-data-all-in-one-api/22582/about-profile"
def get_about_profile(screenname: str):
url = f"{BASE_URL}?screenname={screenname}"
resp = requests.get(url, headers={"Authorization": f"Bearer {API_KEY}"}, timeout=20)
resp.raise_for_status()
return resp.json()
if __name__ == "__main__":
data = get_about_profile("elonmusk")
# Core fields you likely need
status = data.get("status")
rest_id = data.get("rest_id")
name = data.get("name")
blue_verified = data.get("blue_verified")
avatar = data.get("avatar")
# Optional affiliate badge URL if present
affiliates = data.get("affiliates") or {}
label = (affiliates.get("label") or {})
badge = (label.get("badge") or {})
badge_url = badge.get("url")
print("status:", status)
print("rest_id:", rest_id)
print("name:", name)
print("blue_verified:", blue_verified)
print("avatar:", avatar)
print("affiliate_badge_url:", badge_url)
This example calls the About profile endpoint for a single screen name, extracts the identifiers and verification flags, and safely accesses the nested affiliate badge URL if present.
Practical implementation notes
- Timestamps: created_at values are timestamp strings. Treat as UTC for storage and convert to local time in UI as needed.
- IDs: rest_id and id are strings—store as text to avoid precision issues.
- Caching: profiles change infrequently; a TTL of minutes to hours is common. Timelines and following lists may need shorter TTLs depending on your UI.
- Pagination: the Following response includes more_users to signal additional pages may be available. If true, check the listing docs on your plan for pagination usage.
- Error handling: treat non-2xx responses as transient or permission errors and log the request URL and correlation IDs your application uses. Retry conservatively to avoid throttling.
- Quotas: access is subscription + quota (not pay-per-call). Check your plan on the listing for request limits. When on trial, keep requests targeted (e.g., batch screen names client-side and deduplicate).
Real-world patterns you can implement quickly
- Profile enrichment on signup: call Profile then About profile to display avatar, name, verification badge, and location on user pages.
- Author page sidebar: fetch Following and highlight top accounts by followers_count with tooltips using description and profile_image.
- Reply feed module: use User replies to show the latest replies/retweets from a handle, displaying counters (replies, retweets, quotes) and entities for mentions.
- Verification banners: read blue_verified and affiliates.label.badge to conditionally render verification or business labels.
How to call this API from AI agents via MCP
If you orchestrate developer tools or AI coding agents, you can route calls through Zyla’s MCP endpoint. MCP-compatible clients (e.g., Claude Code, Cursor, Windsurf) can access marketplace APIs using your same key. Start with the docs here: MCP.
High-level flow:
- Provide the MCP endpoint and your Zyla API key to your MCP client.
- From the agent, invoke the specific Twitter Data All-in-One API endpoints with the required query parameter screenname and the Authorization header.
- Parse the JSON exactly as shown in the examples above; the same fields are returned whether you call directly or via MCP.
Endpoint-by-endpoint field checklists
Profile
- Identity: id, rest_id, name, profile
- Display: avatar, header_image, desc, location
- Verification: blue_verified
- Activity: statuses_count, media_count, friends, sub_count, pinned_tweet_ids_str
- Lifecycle: created_at, status
About profile
- Identity: id, rest_id, name, profile
- Verification and context: blue_verified, affiliates.label.badge.url, verified_since
- About: account_based_in, location_accurate, affiliate_username, source, username_changes.count
- Display: avatar
Following
- User entries: user_id, screen_name, name, description
- Display: profile_image
- Counters: followers_count, friends_count, statuses_count, media_count
- Pagination hint: more_users
User replies
- Tweet entries: tweet_id, text, created_at, lang, conversation_id
- Engagement: favorites, replies, retweets, quotes, bookmarks, views
- Entities: user_mentions, urls, hashtags, symbols
- Media array for attachments
- Context: author, retweeted, retweeted_tweet
Testing your integration step-by-step
1) Sanity-check auth
Run the official Profile curl (above). If you get JSON back, your Authorization header is valid.
2) Validate field mapping
Map avatar, name, blue_verified into your UI first; confirm text rendering and fallback logic for missing fields like header_image or desc.
3) Add following list
Fetch Following and display a short list sorted by followers_count. Use profile_image for inline avatars.
4) Add replies timeline
Render created_at in local time, show retweets differently if retweeted and retweeted_tweet are present.
5) Cache and observe
Apply TTLs appropriate to your feature. Start with 10–30 minutes for profiles and 1–5 minutes for timelines if you expect frequent page loads.
Security and operations
- Keep YOUR_API_KEY in server-side config or managed secrets, never in client JavaScript.
- Log request URLs (without tokens) and response HTTP codes for quick triage.
- Back off on consecutive non-2xx responses to avoid hitting plan limits.
- Build a minimal dead-letter queue for posts failing enrichment so you can retry later.
FAQ
Q: Which header do I use for authentication?
A: Authorization: Bearer YOUR_API_KEY.
Q: Do I need OAuth per user?
A: No. You call the marketplace endpoints directly with your Zyla API key and a screen name.
Q: How do I handle pagination on Following?
A: Check the more_users boolean. If true, consult the listing docs on your plan for how to fetch additional pages.
Q: What timezone are created_at timestamps in?
A: Treat created_at as UTC timestamp strings and convert client-side as needed.
Q: Is there a free plan?
A: No free plan. The API uses a subscription + quota model. A 7-day trial is available from the listing; check the page for current options.
Ready to wire this into your app? Subscribe and get your key on the listing: Start 7-day trial on Twitter Data All-in-One API. Build with a single key across Zyla’s marketplace and ship your social data integration this week.