Analyze Twitter (X) Data with pandas: A Worked Example on 1,800 Real Posts

- Flatten once:
pd.json_normalize(tweets, sep="_")turns each tweet's nestedauthor{...}into columns likeauthor_followers; counts (likeCount,viewCount, ...) are already top-level. There is nopublic_metricskey in this JSON. - Parse the timestamp explicitly:
createdAtlooks like "Fri Jun 30 12:00:00 +0000 2023"; passformat="%a %b %d %H:%M:%S %z %Y"andutc=Truesoresample("h")and.dt.hourwork. - Cap loud accounts first: two accounts wrote 33.2% of 1,800
#Pythonposts;df.groupby("author_id").head(5)left 981 rows and turned the hashtag top 10 from one repeated hashtag block into the topic. - Medians, not means: median engagement was 2 interactions, the mean 9.5; the top 1% of posts held 24.1% of all engagement and 30.8% had none.
- Hourly resample is sparse: 1,107 clock hours, 59.4% empty, a peak of 44 posts in one hour; the busiest UTC hour was 16:00 in both raw and capped data.
- Save Parquet: 13.4 MB of raw JSON pages became a 354 KB Parquet file (23 columns, pyarrow). Pulling 1,800 posts cost $0.27 at $0.15 per 1,000 tweets vs $9.00 on X's $0.005-per-read card; see /pricing.
This page starts where collection ends. You already have X (Twitter) posts as JSON, from a search, a user timeline or a mentions feed, and you want answers: when does a topic post, which hashtags travel with it, does engagement track follower count, and how do you store the result so the next notebook does not re-download it. If you still need the data, the Python collection tutorial linked below covers keys, pagination and saving to CSV; here we go straight into the DataFrame.
Everything below was run, not sketched. We pulled 1,800 recent posts for the query #Python lang:en through the twitterapi.io search endpoint (90 pages of 20), then analyzed them in pandas 3.1.1 with pyarrow for Parquet. Every code block in the steps is copied from the study's analyze.py, and every number on the page comes from its results.json. The same script gave identical aggregates on pandas 2.3.3, so the code works on both major versions.
The headline is not a pandas trick. It is a data-quality step: on a hashtag search, a handful of accounts can write a third of what you collect, and if you summarize before you look at who wrote the rows, your top-hashtag chart describes those accounts, not the topic.
33.2% of 1,800 posts (collected in 2026). Capping each author at five rows cut posts with 10+ hashtags from 37.3% to 7.3% and reshuffled the hashtag top 10.
What the tweet JSON looks like before pandas touches it
The search endpoint, /twitter/tweet/advanced_search, returns a page object with three keys you care about: a top-level tweets list (up to 20 posts per page), has_next_page and next_cursor. Timeline reads (/twitter/user/last_tweets) wrap the list one level deeper, in data.tweets. Mentions (/twitter/user/mentions) and tweets by ID (/twitter/tweets) use a top-level tweets list like search. Check which one you have before writing the list comprehension that collects rows.
Each tweet is a flat-ish dictionary. The engagement counts are top-level integers: likeCount, retweetCount, replyCount, quoteCount, viewCount and bookmarkCount. That differs from X's own API v2, where counts arrive in a nested public_metrics object; code written for the official API that reads public_metrics.like_count will find nothing here. The nested parts are author (a full profile: id, userName, followers, following, isBlueVerified, createdAt and more), entities (hashtags, urls, user_mentions, each a list of dictionaries), extendedEntities.media (photos and videos), and the optional quoted_tweet and retweeted_tweet objects.
Keep IDs as strings. Tweet and user IDs are 64-bit snowflakes; they arrive as strings, and you should leave them that way. Casting to float silently rounds the last digits, and two different posts can then share an ID after a merge. If you need the post time from an ID, the snowflake decoding is covered by the timestamp tool linked at the end of this page.
Lists stay lists. json_normalize flattens dictionaries, not lists. entities_hashtags stays a column of Python lists; that is what you want, because explode() turns it into one row per hashtag only at the moment you need it.
Step 1: Load the pages and flatten them with json_normalize
The first function reads the saved page bodies, concatenates their tweets lists, and flattens the result. sep="_" gives column names you can type as attributes (author_followers instead of author.followers). The keep list does two jobs: it drops the dozens of profile columns you will never chart (banner URLs, profile picture, pinned IDs) and it makes the frame stable across batches. A column like retweeted_tweet_id only exists after flattening if at least one row carried a repost, so the loop adds any missing column as pd.NA instead of failing with a KeyError on the next batch.
On our 1,800 posts the fully flattened frame had 196 columns before the selection, because every nested author, entity and quoted-post field becomes its own column. After keep, it had 20, and the steps below add a few derived ones. Passing max_level=1 to json_normalize stops the expansion one level down (111 columns on the same posts), which helps when deep objects such as quoted_tweet would otherwise explode into dozens of columns you never read.
Why not pd.read_json? read_json expects a table-shaped document. A list of API pages is not one, and even a list of tweets would leave author as a column of dictionaries. json_normalize is the function the pandas documentation describes for exactly this case: semi-structured JSON into a flat table.
import json
import pandas as pd
def load_frame(path):
pages = json.load(open(path))
tweets = [t for page in pages for t in page.get("tweets", [])]
df = pd.json_normalize(tweets, sep="_")
keep = [
"id", "createdAt", "lang", "text",
"likeCount", "retweetCount", "replyCount", "quoteCount",
"viewCount", "bookmarkCount", "isReply", "isQuote",
"author_id", "author_userName", "author_followers",
"author_isBlueVerified", "entities_hashtags", "entities_urls",
"extendedEntities_media", "retweeted_tweet_id",
]
for col in keep: # a column is missing when no row in the batch has it
if col not in df.columns:
df[col] = pd.NA
return df[keep].copy(), len(tweets)Step 2: Parse createdAt, fix the types, drop duplicates and reposts
X's timestamp format is the Ruby-style string "Fri Jun 30 12:00:00 +0000 2023". Pandas can sometimes guess it, but guessing is slow and, from pandas 2.0 on, it infers one format from the first value and applies it to the rest. Passing format="%a %b %d %H:%M:%S %z %Y" is explicit and fast, and utc=True gives you a timezone-aware column that resample and .dt.hour handle correctly. Convert to a local zone later with .dt.tz_convert("America/New_York") if your readers think in local time.
The count columns go through pd.to_numeric(errors="coerce") and fillna(0) before astype("int64"), so a missing or null count in one row does not turn the whole column into floats. Then come the two filters that change row counts. drop_duplicates(subset="id") removes posts you fetched twice, which happens when you re-run a search with overlapping windows or append a new pull to an old file. The repost filter drops rows that carry a retweeted_tweet object, so a viral post reposted 200 times counts once, through its original.
What our sample showed: 0 duplicate IDs and 0 reposts in 1,800 rows. A Latest search on a hashtag returned original posts, replies (4.7%) and quotes (3.4%), but no plain reposts, and one continuous cursor walk did not repeat a post. Keep both filters anyway: the first time you merge two pulls, or switch to a timeline read where reposts do appear, they will matter, and they cost nothing when there is nothing to remove.
Derived columns belong here. engagement (likes + reposts + replies + quotes), has_media, has_link and n_hashtags are computed once, right after cleaning, so every later step reads the same definitions. Views are kept separate because they are an exposure count, not an interaction.
def clean(df):
df["createdAt"] = pd.to_datetime(df["createdAt"], format="%a %b %d %H:%M:%S %z %Y", utc=True)
counts = ["likeCount", "retweetCount", "replyCount", "quoteCount",
"viewCount", "bookmarkCount", "author_followers"]
df[counts] = df[counts].apply(pd.to_numeric, errors="coerce").fillna(0).astype("int64")
before = len(df)
df = df.drop_duplicates(subset="id", keep="first")
dupes = before - len(df)
is_repost = df["retweeted_tweet_id"].notna()
reposts = int(is_repost.sum())
df = df[~is_repost].copy()
df["engagement"] = df[["likeCount", "retweetCount", "replyCount", "quoteCount"]].sum(axis=1)
df["has_media"] = df["extendedEntities_media"].apply(lambda m: isinstance(m, list) and len(m) > 0)
df["has_link"] = df["entities_urls"].apply(lambda u: isinstance(u, list) and len(u) > 0)
df["n_hashtags"] = df["entities_hashtags"].apply(lambda hs: len(hs) if isinstance(hs, list) else 0)
return df.sort_values("createdAt").reset_index(drop=True), dupes, repostsStep 3: Resample by hour and read the time profile honestly
With createdAt as a proper datetime, set_index("createdAt").resample("h") buckets the posts into clock hours, including the empty ones, which a plain groupby on an hour column would skip. The lowercase "h" is the current hourly alias in the pandas time-series guide; the old uppercase "H" still runs with a FutureWarning on pandas 2.3.3 and raises ValueError: Invalid frequency: H on 3.1.1 (we tried both). For a daily profile use "D"; for the hour-of-day shape across all days, group on df["createdAt"].dt.hour and reindex(range(24), fill_value=0) so quiet hours show as zeros instead of disappearing.
Our window covered 46 days, which resample("h") turned into 1,107 clock hours. 59.4% of them had no post at all; the mean was 1.63 posts an hour and the busiest single hour had 44. The hour-of-day profile peaked at 16:00 UTC and bottomed out at 03:00 UTC, in the raw data and after capping each author at five posts (Step 4), so that shape is not an artifact of a single scheduler.
Check the far end of the window. 78.9% of the posts fell in the last eight days of the 46-day window: the median day held 11 posts across the whole span, while the recent days held between 114 and 228. When a Latest search pages backward, older days can come back thinner than recent ones, and a cursor walk of a fixed number of pages always ends somewhere inside a day. Our sample cannot tell you whether the jump is real activity or search depth. For a daily trend, request each day separately with since: and until: operators in the query, so every day gets the same treatment, and cut the oldest partial day before you plot.
def time_profile(df):
hourly = df.set_index("createdAt").resample("h")["id"].count()
by_hour = df.groupby(df["createdAt"].dt.hour)["id"].count().reindex(range(24), fill_value=0)
daily = df.set_index("createdAt").resample("D")["id"].count()
return hourly, by_hour, daily
Step 4: Look at who wrote the rows before you summarize
This is the step that decided our results. df.groupby("author_id")["id"].count() showed 609 distinct authors behind 1,800 posts. 71.6% of those authors appeared exactly once, but the top two accounts wrote 33.2% of all rows (the single largest wrote 380) and the top ten wrote 42.8%. Their posts shared a pattern you can see without reading any text: 37.3% of all rows carried ten or more hashtags, the same block of tags repeated post after post.
None of that is unusual on a hashtag search; scheduled accounts post into popular tags around the clock. The problem is what it does to a summary. Any count-based chart (top hashtags, posting hours, link share) mostly measures the two or three loudest accounts. We do not name those accounts, because the question is not who they are but how to stop them from setting your results; the API also exposes author.isAutomated, which was false for every row here, so you cannot rely on a self-declared label to find them.
The fix is one line: keep no more than N rows per author with groupby("author_id").head(n), sorted by time so the cap keeps each author's first posts in the window. N = 5 kept every author and cut the heaviest down to a voice among many. Report both versions when the difference matters, and say which one a chart uses.
Some numbers barely moved: media share (57.5% vs 58.0%) and median engagement (2 vs 2). Others changed a lot: link share fell from 61.7% to 38.9%, the hashtag-stuffing share from 37.3% to 7.3%, and median views from 84.5 to 49. That split is the reason to compute both: it tells you which findings belong to the topic and which belong to a few accounts.
def cap_per_author(df, n=5):
return df.sort_values("createdAt").groupby("author_id").head(n).copy()Step 5: Top hashtags with explode and value_counts
Hashtags arrive as entities.hashtags, a list of {"text": ..., "indices": [...]} dictionaries per post. The function maps each list to lower-cased tag strings, explode()s the column so every tag becomes its own row (the index repeats, so you can still join back to the post), drops posts without tags, removes the query tag itself and counts. Lower-casing matters: #Python, #python and #PYTHON are the same tag to a reader and three tags to value_counts().
Run on all 1,800 posts, the top of the list was #100daysofcode (631 posts), #linux (593), #programming (509), #datascience, #coding, #ai, #bigdata, #analytics, #javascript and #rstats, all between 396 and 631 posts. Counts that close together are a tell in themselves: they come from the same posts carrying the same block. On the capped frame, #ai led with 111 of 981 posts (11%), followed by #programming, #coding, #buildinpublic, #machinelearning and #datascience, and topic tags such as #dsa, #java and #fastapi entered the top twelve. #linux, #bigdata, #analytics, #javascript, #rstats, #iot and #tensorflow all fell out of the top twelve.
Count posts, not tag mentions, when you rank. value_counts() after explode() counts tag occurrences. A post that repeats a tag twice counts twice. If that matters for your topic, deduplicate with explode() followed by reset_index().drop_duplicates() on the index and tag before counting.
QUERY_TAG = "python"
def top_hashtags(df, n=12):
tags = (df["entities_hashtags"]
.apply(lambda hs: [h["text"].lower() for h in hs] if isinstance(hs, list) else [])
.explode()
.dropna())
tags = tags[tags != QUERY_TAG]
return tags.value_counts().head(n)
Step 6: Engagement per follower with pd.cut
Raw engagement favors big accounts, so a fair comparison divides by audience size. The function bins author_followers with pd.cut into four bands, computes engagement per 1,000 followers per post (clip(lower=1) avoids division by zero for brand-new accounts), and aggregates with named aggregations, so the output columns have readable names. observed=False keeps empty bands in the table instead of dropping them, which keeps tables comparable across runs.
Use medians. Across all 1,800 posts the median post drew 2 interactions and the mean was 9.5; the 90th percentile was 23, the single highest post had 1,453, the top 1% of posts collected 24.1% of all engagement, and 30.8% of posts got none. Views behave the same way: median 84.5, mean 469.7. A mean on data shaped like this is a statement about a few posts.
Absolute engagement rises with audience (a median of 1 interaction under 1,000 followers, 17 above 100,000) while engagement per follower falls by more than two orders of magnitude, from 14.3 to 0.07 per 1,000 followers. Part of that is arithmetic: one like on a 200-follower account is already 5 per 1,000. The 100k+ band is also small after capping (10 authors), so treat its median as indicative. Compare like with like: rank posts against others in the same band, not against the whole frame.
The cap matters here too. Uncapped, the 100k+ band held 451 posts from 10 authors, with a median of 9 interactions and 439 views; capped, 29 posts with a median of 17 and 2116 views. One prolific large account was pulling the whole band down.
def engagement_by_band(df):
bins = [-1, 999, 9_999, 99_999, float("inf")]
labels = ["<1k", "1k-10k", "10k-100k", "100k+"]
df["band"] = pd.cut(df["author_followers"], bins=bins, labels=labels)
per_k = df["engagement"] / df["author_followers"].clip(lower=1) * 1000
df["eng_per_1k_followers"] = per_k
out = (df.groupby("band", observed=False)
.agg(posts=("id", "count"),
authors=("author_id", "nunique"),
median_engagement=("engagement", "median"),
median_views=("viewCount", "median"),
median_eng_per_1k=("eng_per_1k_followers", "median")))
return out
Step 7: Save to Parquet, and what changes in pandas 3
Before saving, drop the list columns (entities_hashtags, entities_urls, extendedEntities_media) or convert them to strings; Parquet can store nested lists through pyarrow, but a flat file reads back faster and opens in every tool. Our 1,800-row frame with 23 columns was 354 KB as Parquet and 1.3 MB as records-oriented JSON, against 13.4 MB for the raw API pages it came from. Parquet also keeps the types: createdAt comes back as a UTC datetime and the counts as int64, with no re-parsing step in the next notebook.
Keep the raw pages too, once. Write the untouched page bodies to disk (or object storage) before any cleaning, and treat the Parquet file as a derived product. When you change a cleaning rule, such as the author cap, you re-run the script instead of re-downloading and paying for the same posts twice. For a growing dataset, partition by day (df.to_parquet("posts/", partition_cols=["day"]) after adding a day column) so each new pull adds a folder instead of rewriting the file.
pandas 3 notes. pandas 3.0 (released January 21, 2026; the current release is 3.1.1, which needs Python 3.11 or newer) changes two defaults that touch this workflow. Text columns now get a dedicated str dtype, backed by PyArrow when it is installed, instead of object; code that checks dtype == object to find text columns needs updating, while list columns like entities_hashtags stay object. Copy-on-Write is always on, so chained assignment such as df[df.isReply]["x"] = 1 no longer modifies df; assign through df.loc[mask, "x"] = 1 instead. The code on this page avoids both patterns, which is why the same script produced identical aggregates on pandas 2.3.3 and 3.1.1.
Pick the engine on purpose. to_parquet uses pyarrow when it is installed and falls back to fastparquet. Install pyarrow explicitly (pip install pyarrow); with pandas 3 it also backs the new string dtype, so one dependency covers both.
os.makedirs("/tmp/pandas-study", exist_ok=True)
flat = df.drop(columns=["entities_hashtags", "entities_urls", "extendedEntities_media"])
flat.to_parquet("/tmp/pandas-study/tweets.parquet", index=False)
flat.to_json("/tmp/pandas-study/tweets.json", orient="records", date_format="iso")
raw_bytes = os.path.getsize(RAW)
pq_bytes = os.path.getsize("/tmp/pandas-study/tweets.parquet")
js_bytes = os.path.getsize("/tmp/pandas-study/tweets.json")What this dataset cost, and how we collected it
Cost of the pull. 1,800 posts at 15 credits per tweet returned is 27,000 credits, or $0.27 on twitterapi.io ($0.15 per 1,000 tweets; you pay only for the data returned, with a 15-credit minimum per request). On the official X API's pay-per-use rate card at docs.x.com, a post read is $0.005, so the same 1,800 reads would cost $9.00, about 33x more per 1,000 posts. X's pay-per-use plan is capped at 3 million post reads a month, with Enterprise above that. Reads on twitterapi.io need no X account, only an API key; new accounts that pass the automatic bot check get free starter credits (no card, one per person or network, expiring after 31 days), and purchased credits never expire. Before the first payment the rate limit is 0.2 requests per second, and 20 once paid, so a 90-page pull like ours takes minutes on a paid key.
How we collected this. Question: what does a real pandas workflow find on one developer hashtag once duplicates, reposts and loud accounts are handled? Query: #Python lang:en on /twitter/tweet/advanced_search with queryType=Latest, following next_cursor for 90 pages. Sample: 1,800 posts from 609 authors covering about 46 days, collected in 2026. Analysis: pandas 3.1.1 with pyarrow 26 (and re-run on pandas 2.3.3 with identical aggregates), using the code shown in the steps above.
What the sample cannot show. It is one hashtag and one language filter, so it says nothing about Python discussion that does not use the tag, or about other languages. A Latest search is ordered by time, not relevance, and the far end of a cursor walk can be thinner than recent days (Step 3), so do not read the daily counts as a trend. Engagement counts are snapshots at collection time, and recent posts had less time to collect interactions than older ones. Follower bands are wide and the top band is small after capping.
Privacy. The authors of hashtag posts are overwhelmingly private individuals. The raw pages stayed on a local machine and were not published; the study folder holds only aggregates (results.json) and a de-identified row sample (sample.json: hour of posting, counts, follower count, flags; no IDs, URLs, text or handles). No author is named on this page, and concentration is reported as counts and shares only.
"""Pull X (Twitter) search results into pandas, clean them, summarize, save Parquet.
pip install requests pandas pyarrow (pandas 3.x needs Python 3.11+; 2.3 also works)
"""
import json
import os
import time
import pandas as pd
import requests
API_KEY = os.environ["TWITTERAPI_IO_KEY"]
BASE = "https://api.twitterapi.io"
def fetch_pages(query, max_pages=10):
"""Follow next_cursor; each page holds up to 20 posts in a top-level tweets[] list."""
pages, cursor = [], ""
for _ in range(max_pages):
r = requests.get(
f"{BASE}/twitter/tweet/advanced_search",
headers={"X-API-Key": API_KEY},
params={"query": query, "queryType": "Latest", "cursor": cursor},
timeout=30,
)
if r.status_code == 503: # temporary; retry after a pause
time.sleep(5)
continue
r.raise_for_status()
body = r.json()
pages.append(body)
if not body.get("has_next_page") or not body.get("next_cursor"):
break
cursor = body["next_cursor"]
return pages
if __name__ == "__main__":
pages = fetch_pages("#Python lang:en", max_pages=10)
json.dump(pages, open("pages.json", "w"))
tweets = [t for page in pages for t in page.get("tweets", [])]
df = pd.json_normalize(tweets, sep="_")
df["createdAt"] = pd.to_datetime(df["createdAt"], format="%a %b %d %H:%M:%S %z %Y", utc=True)
counts = ["likeCount", "retweetCount", "replyCount", "quoteCount", "viewCount", "author_followers"]
df[counts] = df[counts].apply(pd.to_numeric, errors="coerce").fillna(0).astype("int64")
df = df.drop_duplicates(subset="id").sort_values("createdAt").reset_index(drop=True)
df["engagement"] = df[["likeCount", "retweetCount", "replyCount", "quoteCount"]].sum(axis=1)
capped = df.groupby("author_id").head(5) # one loud account cannot dominate
print(len(df), "posts,", df["author_id"].nunique(), "authors,", len(capped), "after the cap")
print("median engagement", df["engagement"].median(), "mean", round(df["engagement"].mean(), 1))
print(df.set_index("createdAt").resample("h")["id"].count().describe())
tags = (capped["entities_hashtags"]
.apply(lambda hs: [h["text"].lower() for h in hs] if isinstance(hs, list) else [])
.explode().dropna())
print(tags[tags != "python"].value_counts().head(10))
keep = ["id", "createdAt", "lang", "likeCount", "retweetCount", "replyCount",
"quoteCount", "viewCount", "author_id", "author_followers", "engagement"]
df[keep].to_parquet("tweets.parquet", index=False)
Researching this?Free starter credits cover end-to-end testing — Google sign-in, no card. Get a key.
Questions readers ask
How do I convert tweets JSON to a pandas DataFrame?
Collect every page's tweet list into one Python list and call pd.json_normalize(tweets, sep="_"). Nested author fields become columns such as author_followers and author_userName; lists like entities_hashtags stay as list columns. For timeline reads the list sits under data.tweets instead of a top-level tweets.
What format string parses the Twitter createdAt field in pandas?
Use pd.to_datetime(df["createdAt"], format="%a %b %d %H:%M:%S %z %Y", utc=True). The field looks like "Fri Jun 30 12:00:00 +0000 2023". The explicit format is faster than letting pandas guess and gives a UTC-aware column that works with resample("h") and .dt.hour.
Where are like and retweet counts, is there a public_metrics column?
In twitterapi.io responses the counts are top-level fields on each tweet: likeCount, retweetCount, replyCount, quoteCount, viewCount and bookmarkCount. There is no public_metrics object; that nesting belongs to X's official API v2. After json_normalize the columns keep the same names.
How do I count posts per hour in pandas?
Set the parsed timestamp as the index and resample: df.set_index("createdAt").resample("h")["id"].count(). That includes empty hours, unlike a plain groupby. For an hour-of-day profile, group on df["createdAt"].dt.hour and reindex(range(24), fill_value=0). Use lowercase "h": the uppercase alias warns on pandas 2.3 and raises a ValueError on pandas 3.
How do I get the top hashtags from a tweets DataFrame?
Map entities_hashtags to lower-cased tag strings, explode() the column, drop missing values and the query tag, then value_counts(). Cap rows per author first (df.groupby("author_id").head(5)): in our #Python sample the uncapped ranking was dominated by a block of tags repeated by a couple of accounts.
Should I save tweets as CSV or Parquet?
Parquet, for anything you will reload in pandas. It keeps datetimes and integer types and is far smaller: our 1,800-row, 23-column frame was 354 KB as Parquet vs 1.3 MB as JSON. Use CSV only for hand-off to a spreadsheet, and keep the raw API pages once so you can re-run cleaning without paying for the data again.
Does this code work with pandas 3?
Yes. We ran it on pandas 3.1.1 and 2.3.3 with identical results. pandas 3 makes text columns a str dtype and turns Copy-on-Write on permanently, so avoid chained assignment and checks for object dtype; the code here uses neither. pandas 3 needs Python 3.11 or newer.
How much does it cost to pull tweets for a pandas analysis?
On twitterapi.io, $0.15 per 1,000 tweets returned: our 1,800-post dataset cost $0.27. The official X API pay-per-use card charges $0.005 per post read, $9.00 for the same posts. See the pricing page for plans and current details.
Continue
- pandas documentation: pandas.json_normalize (signature, sep and max_level)
- pandas user guide: time series, offset aliases ('h' for hourly) and resample
- pandas 3.0.0 release notes: str dtype, Copy-on-Write, Python 3.11+
- pandas on PyPI (current release and Python requirement)
- twitterapi.io docs: advanced search parameters, pagination and response fields
- X API pricing on docs.x.com: pay-per-use rate card (post read $0.005)
- X (Twitter) API overview and endpoints
- Get Twitter (X) data in Python: keys, pagination, CSV
- Twitter JSON format explained, field by field
- Tweet metadata fields reference
- Build a Streamlit dashboard on X (Twitter) data
- Tweet ID to timestamp converter
- TwitterAPI.io pricing per 1,000 tweets
- 01How to Translate Tweets on Twitter (X): Auto-Translate, the Gear Icon and Language Settings
- 02How to Turn Off Autoplay on Twitter (X): App, Web and Auto-Advance
- 03Twitter (X) and the EU Digital Services Act (DSA): What the Commission Found, and What It Means for X Data
- 04Twitter (X) and Firebase: store posts in Firestore with a scheduled Cloud Function
- 05Twitter (X) Network Analysis with Python and networkx: A Real #reInvent Graph
- 06Brand24 vs Mention — the X (Twitter) Data Cost Perspective
- 07Get Twitter (X) Data in Python (2026 Tutorial)
- 08Historical Twitter (X) Data + Archive API — Complete Guide
Writing about something you built with TwitterAPI.io? Our community rewards program pays API credits for honest tutorials, build logs and videos.
Stop reading. Start building.
Starter credits cover real testing on real data. Google sign-in, no card, no application queue.
Get an API keyAlready building with TwitterAPI.io? Publish an honest tutorial or build log about it and earn up to $200 a month in API credits.