You need to ship a social media integration this week that pulls reliable Twitter/X profile details, who a user follows, and the user’s recent replies. By the end of this guide, you’ll make a working first request to the Twitter Data All-in-One API on Zyla API Hub with curl, inspect a real JSON payload, and have a short Python snippet you can drop into your service.
What this API delivers and why developers use it
The Twitter Data All-in-One API exposes social media data you can wire into dashboards, CRM enrichment, moderation queues, research scripts, and analytics jobs. It provides:
- Profile “about” information: verified status, avatar, affiliations, and account metadata.
- Following list: who a user follows, with basic profile stats per account.
- User replies: the user’s recent replies, with tweet-level counters and author context.
Everything is available behind a single Zyla API Hub subscription and Authorization: Bearer YOUR_API_KEY header, so you avoid juggling multiple providers or keys. Browse the marketplace listing here: Twitter Data All-in-One API. You can also explore other social media APIs on Zyla API Hub when you’re ready to expand coverage.
Getting started on Zyla API Hub
To call any endpoint, you need an API key from Zyla API Hub:
- Open the API page: Twitter Data All-in-One API.
- Click Subscribe (or Start Free Trial when available), then generate your API key.
- Authenticate with the header Authorization: Bearer YOUR_API_KEY on every request.
Billing is subscription + quota (not pay-per-call). For this API, expect a 7-day trial or 50 requests for first access. There is no Free Plan. Always check the API page for current access options and pricing.
Authentication and request conventions
- Base: Requests go to the Hub endpoint URLs listed below (all start with https://zylalabs.com/api/... ).
- Auth: Include Authorization: Bearer YOUR_API_KEY.
- Parameters: Only use parameters documented for each endpoint; do not add extras.
- Responses: JSON. Timestamps use Twitter/X’s standard format with timezone offsets when present.
Endpoint 1: About profile
Returns the additional information about a profile. Useful for user lookup, account enrichment, or displaying verified state and business affiliations.
- Method: GET
- URL: https://zylalabs.com/api/3399/twitter-data-all-in-one-api/22582/about-profile
- Required params: screenname=elonmusk
cURL
curl -s -X GET "https://zylalabs.com/api/3399/twitter-data-all-in-one-api/22582/about-profile?screenname=elonmusk" \
-H "Authorization: Bearer YOUR_API_KEY"
JSON (sample response)
{"status":"active","profile":"elonmusk","rest_id":"44196397","blue_verified":true,"affiliates":{"label":{"badge":{"url":"https:\/\/pbs.twimg.com\/profile_images\/1955359038532653056\/OSHY3ewP_bigger.jpg"},"description":"X","url":{"url":"https:\/\/twitter.com\/X","urlType":"DeepLink"},"userLabelDisplayType":"Badge","userLabelType":"BusinessLabel"}},"business_account":null,"verified_since":"-156836000000000","avatar":"https:\/\/pbs.twimg.com\/profile_images\/2008546467615580160\/57KcqsTA_normal.jpg","name":"Elon Musk","protected":false,"about":{"account_based_in":"United States","location_accurate":false,"learn_more_url":"https:\/\/help.twitter.com\/managing-your-account\/about-twitter-verified-accounts","affiliate_username":"X","source":"United States App Store","username_changes":{"count":"0"}},"id":"44196397"}
Field highlights you’ll commonly use:
- status: API status for the lookup.
- profile and id/rest_id: stable identifiers to store in your DB.
- blue_verified: boolean for badge display and trust heuristics.
- avatar and name: render user cards and leaderboards.
- affiliates.label: shows a business relationship, including a badge and an outbound URL.
- about.account_based_in and source: metadata for regional or store-source analytics.
Python example: fetch About profile and read key fields
This snippet calls the same endpoint and parses a few fields you’re likely to display. Adjust error handling to your production standards.
import os
import requests
API_KEY = os.getenv("ZYLA_API_KEY", "YOUR_API_KEY")
url = "https://zylalabs.com/api/3399/twitter-data-all-in-one-api/22582/about-profile"
params = {"screenname": "elonmusk"}
headers = {"Authorization": f"Bearer {API_KEY}"}
resp = requests.get(url, headers=headers, params=params, timeout=20)
resp.raise_for_status()
data = resp.json()
user = {
"screenname": data.get("profile"),
"id": data.get("id"),
"name": data.get("name"),
"blue_verified": data.get("blue_verified"),
"avatar": data.get("avatar"),
"country": (data.get("about") or {}).get("account_based_in"),
}
print(user)
Endpoint 2: Following
Get the list of accounts a user is following, including counts that help with scoring, segmentation, and discovery tools.
- Method: GET
- URL: https://zylalabs.com/api/3399/twitter-data-all-in-one-api/3679/following
- Required params: screenname=elonmusk
cURL
curl -s -X GET "https://zylalabs.com/api/3399/twitter-data-all-in-one-api/3679/following?screenname=elonmusk" \
-H "Authorization: Bearer YOUR_API_KEY"
JSON (sample response)
{"following":[{"user_id":"1671483632551186433","screen_name":"TechMine_Mw","description":"Malawi’s premier SAAS firm 🌐 | Leaders in digital transformation, website development, design, and marketing 🖥️🎨 | Shaping Malawi’s tech future 🇲🇼","profile_image":"https:\/\/pbs.twimg.com\/profile_images\/1847661011731431425\/FNhbpOqP_normal.jpg","statuses_count":5,"followers_count":6,"friends_count":10,"media_count":3,"name":"TechMine INC."},{"user_id":"44196397","screen_name":"elonmusk","description":"","profile_image":"https:\/\/pbs.twimg.com\/profile_images\/1874558173962481664\/8HSTqIlD_normal.jpg","statuses_count":65409,"followers_count":210941749,"friends_count":926,"media_count":3038,"name":"Elon Musk"}],"status":"ok","more_users":false}
What to note:
- following: array of accounts with user_id, screen_name, name, and lightweight stats (followers_count, friends_count, statuses_count, media_count).
- more_users: boolean flag that indicates whether there may be additional results beyond this set. The listing here does not define pagination parameters; check the API page for any updates if you need deeper traversal.
Endpoint 3: User replies
Retrieve the list of a user’s replies (including retweets that the timeline may represent). This is helpful for monitoring engagement, building activity feeds, or training lightweight classifiers.
- Method: GET
- URL: https://zylalabs.com/api/3399/twitter-data-all-in-one-api/3682/user-replies
- Required params: screenname=elonmusk
cURL
curl -s -X GET "https://zylalabs.com/api/3399/twitter-data-all-in-one-api/3682/user-replies?screenname=elonmusk" \
-H "Authorization: Bearer YOUR_API_KEY"
JSON (sample response excerpt)
{"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…
Key fields to wire up:
- tweet_id and conversation_id: correlate threads and deduplicate.
- created_at: timestamp (UTC +0000 in this example); convert to your preferred timezone in your UI.
- text and lang: content and language for moderation or indexing.
- favorites, replies, retweets, quotes: engagement counters.
- author: compact user object with rest_id, screen_name, avatar, and blue_verified.
- retweeted and retweeted_tweet: if present, represent retweet relationships.
Practical implementation notes (save yourself an hour)
- Caching: Profile “about” data changes less frequently than timelines. Cache About profile responses for minutes to hours; refresh following lists and replies more often if your UI is real-time sensitive.
- Identifiers: Store both id/rest_id and screen_name. Usernames can change; numeric IDs are steadier anchors.
- Timestamps: created_at values include timezone information in the string. Normalize to UTC in your backend to simplify querying and sorting.
- Rate consumption: Since access is subscription + quota (not pay-per-call), centralize calls to avoid duplicated fetches across services.
- Pagination: If more_users is true in Following responses, plan for iterative fetch patterns. The parameters for deeper pagination are not defined in the listing shown here—monitor the API page for updates before implementing page-walking logic.
- Error handling: Treat non-2xx responses as transient where appropriate and retry with exponential backoff. Always log the requested URL and screenname to replicate issues quickly.
Call this API from an AI agent over MCP
If you’re using an MCP-compatible client (such as Claude Code, Cursor, or Windsurf), you can route calls through Zyla’s MCP service. Point your tool at:
Supply your Zyla API key (apikey query parameter on the MCP endpoint). Your agent can then invoke the Twitter Data All-in-One API via tool calls without embedding raw HTTP logic. Keep the same Authorization: Bearer YOUR_API_KEY pattern when configuring your tool’s calls.
Common real-world use cases
- CRM and enrichment: Use About profile to verify business affiliation and badge status before assigning lead tiers.
- Audience discovery: Pull Following to map interests and identify potential partners or influencers followed by your target account.
- Engagement dashboards: Combine User replies with profile avatars and names to populate live-feed widgets.
- Moderation queues: Filter by lang and engagement counters to prioritize high-visibility interactions for review.
- Research scripts: Snapshot Following or recent replies nightly to a data lake and analyze change over time.
End-to-end: your first request and next steps
Start with the About profile lookup to validate your key and wire up headers. Then expand to Following and User replies based on your product needs. You’ll be done faster if you build a small internal CLI or script that:
- Accepts a screenname and the endpoint (about-profile, following, user-replies).
- Calls the URL with Authorization: Bearer YOUR_API_KEY and logs JSON to disk.
- Prints the few fields your service consumes (e.g., id, blue_verified, counts).
When you’re ready, subscribe on the API page: Twitter Data All-in-One API. Explore more social media integrations across categories on Zyla API Hub.
FAQ
How do I authenticate?
Include the HTTP header Authorization: Bearer YOUR_API_KEY on every request to the Hub URLs.
Is there a free plan?
No Free Plan. For this API, expect a 7-day trial or 50 requests when you first subscribe. Check the API page for current access options and pricing.
Do I need more parameters than screenname?
For the endpoints shown here, the only required parameter is screenname with a value like elonmusk. Do not add extra parameters.
How do I handle pagination for Following?
The response includes more_users to indicate if more results may exist. Pagination parameters are not defined in the listing shown here; consult the API page for updates before implementing additional fetches.
Can I call this via an AI coding agent?
Yes. Use Zyla’s MCP endpoint and your Zyla API key to enable MCP-compatible tools to call the Twitter Data All-in-One API as a tool.
Ready to implement? Create your Zyla account, subscribe to the API, and get your key now: Register.