You need reliable, up-to-date Twitter profile context, follower graphs, and reply timelines for a feature shipping this week. By the end of this guide you will be able to fetch a user’s profile, additional profile metadata, who they follow, and their recent replies using the Twitter Data All-in-One API on Zyla API Hub, with copy-pasteable curl and Python examples you can drop into your service today.
What this API delivers
The Twitter Data All-in-One API provides programmatic access to public Twitter (X) data points you typically need in social features:
- Profile: core account attributes (name, avatar, counts, created_at).
- About profile: additional metadata such as blue verification, affiliate label info, and location context.
- Following: the list of accounts a user follows with follower/friend/media counts.
- User replies: the user’s recent reply timeline with tweet-level engagement metrics and entities.
These endpoints power common Social Media use cases like influencer vetting, community automation, customer support triage, and analytics dashboards.
Getting started on Zyla API Hub
Open the API page and subscribe to get your key. Zyla API Hub uses a subscription + quota model (not pay-per-call). For a first API, you can start a 7-day trial or 50 requests—check the listing for the current access options. Once subscribed, you’ll receive one API key that works across the marketplace.
Start 7-day trial on Twitter Data All-in-One API
Authentication
Send your key in the Authorization header on every request:
- Authorization: Bearer YOUR_API_KEY
Endpoints you can ship with this week
Profile
Return core profile attributes for a given screen name.
- Method: GET
- URL: https://zylalabs.com/api/3399/twitter-data-all-in-one-api/3673/profile
- Required query param: screenname
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"
{
"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"
}
Key fields you’ll likely use immediately: name, desc, avatar, header_image, blue_verified, counts (friends, sub_count, statuses_count, media_count), created_at (string in Twitter’s date format), and id/rest_id for cross-referencing. Use protected to flag restricted accounts in your UI logic.
About profile
Return additional metadata about the profile such as verification state, affiliate label, and account-level “about” attributes.
- Method: GET
- URL: https://zylalabs.com/api/3399/twitter-data-all-in-one-api/22582/about-profile
- Required query param: screenname
Use blue_verified and affiliates.label to surface verification or business affiliations. The about object includes high-signal metadata like account_based_in and username_changes.count for fraud checks and onboarding flows. Treat verified_since as a string unless you explicitly convert it.
Following
Return the list of accounts the user is following, including essential counts for each followed account.
- Method: GET
- URL: https://zylalabs.com/api/3399/twitter-data-all-in-one-api/3679/following
- Required query param: screenname
For growth and graph features, iterate over following to compute overlaps, display mutual interests, or to prefill “suggested follows.” Check more_users to know if there are additional pages to fetch when building paginated UIs.
User replies
Return the user’s recent replies timeline including tweet engagement metrics and referenced retweets where available.
- Method: GET
- URL: https://zylalabs.com/api/3399/twitter-data-all-in-one-api/3682/user-replies
- Required query param: screenname
{"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…
Use text, created_at, engagement counters (retweets, replies, favorites, quotes), and entities.user_mentions to power moderation, community replies dashboards, or to prioritize response queues. When present, retweeted and retweeted_tweet provide context for RTs you may need to render.
Python example: fetch and normalize a profile
This snippet calls the Profile endpoint, extracts key fields, and shows how to handle booleans and counts. Replace YOUR_API_KEY with your token.
import requests
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://zylalabs.com/api/3399/twitter-data-all-in-one-api/3673/profile"
def fetch_profile(screenname: str) -> dict:
resp = requests.get(
BASE_URL,
headers={"Authorization": f"Bearer {API_KEY}"},
params={"screenname": screenname},
timeout=20,
)
resp.raise_for_status()
data = resp.json()
# Normalize the fields your UI needs
return {
"id": data.get("id") or data.get("rest_id"),
"name": data.get("name"),
"username": data.get("profile"),
"avatar": data.get("avatar"),
"header_image": data.get("header_image"),
"bio": data.get("desc"),
"verified": bool(data.get("blue_verified")),
"friends": data.get("friends"),
"subscribers": data.get("sub_count"),
"statuses": data.get("statuses_count"),
"media": data.get("media_count"),
"created_at": data.get("created_at"),
"location": data.get("location"),
"protected": data.get("protected"),
}
if __name__ == "__main__":
profile = fetch_profile("elonmusk")
print(f"{profile['name']} (@{profile['username']}) — verified={profile['verified']}")
print(f"Tweets: {profile['statuses']}, Followers-like metric (subscribers): {profile['subscribers']}")
print(f"Avatar: {profile['avatar']}")
Practical implementation notes
- Auth header: always include Authorization: Bearer YOUR_API_KEY.
- Timestamps: created_at is a Twitter-style string (e.g., Thu Mar 12 02:45:15 +0000 2009). Parse cautiously if you need UTC epoch.
- Counters: counts are integers; treat missing fields as None to avoid coercion bugs.
- Booleans: blue_verified and protected are booleans when present; some fields may be null if unknown.
- Pagination: where a field like more_users is present (Following endpoint), use it to decide if more data is available. If you need deeper pagination, check the API page for options.
- Caching: profile and about-profile change less frequently; cache for minutes to hours depending on your SLA. Replies update rapidly; cache conservatively if you need freshness.
- Error handling: plan for network retries and JSON decoding errors; do not assume every field is always populated.
- Subscription model: Zyla uses subscription + quota. For your first API, you can start a 7-day trial or 50 requests—verify current terms on the API page before load testing.
Common Social Media use cases you can build now
- Influencer discovery: use Profile and About profile to rank candidates by verification, activity (statuses_count, media_count), and biography keywords.
- Community health: track Following to analyze interests and network clusters; compute shared follows across a cohort to suggest niche communities.
- Support triage: pull User replies to detect unresolved mentions and high-urgency threads; prioritize by replies and quotes counts.
- Enrichment for CRM: attach avatar, name, and verification status from Profile/About profile to user records for better support context.
- Content moderation queues: parse entities and language from User replies to route items to the right reviewers.
Call it from AI agents via MCP
You can also reach the same hub endpoints from AI coding agents that speak the Model Context Protocol. Point your MCP-compatible client (Claude Code, Cursor, Windsurf, etc.) at the MCP endpoint and pass your key as a query parameter.
Once configured, your agent can call the Profile, About profile, Following, and User replies URLs shown above with the Authorization header. This is useful for automations like “summarize the last five replies for @username” or “verify the account’s blue verification status.”
Endpoint references and examples
About profile (recap)
GET https://zylalabs.com/api/3399/twitter-data-all-in-one-api/22582/about-profile?screenname=elonmusk
Returns additional profile metadata including verification, affiliate labels, and location context.
Following (recap)
GET https://zylalabs.com/api/3399/twitter-data-all-in-one-api/3679/following?screenname=elonmusk
Returns a list of followed accounts, each with counts and profile image URLs. Use more_users to drive pagination logic in your UI.
User replies (recap)
GET https://zylalabs.com/api/3399/twitter-data-all-in-one-api/3682/user-replies?screenname=elonmusk
Returns a timeline of replies with engagement metrics and entities for downstream processing.
FAQ
How do I authenticate requests?
Include Authorization: Bearer YOUR_API_KEY in the header of every request you make to the hub URLs.
Which parameter is required to fetch user data?
All endpoints shown here require the screenname query parameter (e.g., screenname=elonmusk).
Is there pagination?
Where available, the response will include hints like more_users (as in the Following endpoint). For deeper pagination details or additional cursors, check the API page.
What are the current access options?
Zyla uses a subscription + quota model. For your first API, you can start a 7-day trial or 50 requests; see the API listing for current terms.
Can I use this from an AI agent?
Yes. Configure your MCP-compatible client to call the hub endpoints, using the MCP endpoint noted above and your API key.
Ready to wire this into your Social Media stack? Subscribe, get your key, and ship your integration using the examples above. The trial starts on the item page: Start 7-day trial on Twitter Data All-in-One API.