Twitter (X) API to Excel: Power Query, Python and CSV, Tested on 1,361 Posts

- Three routes: Power Query
Web.Contentswith aHeadersrecord (Excel for Windows, refreshable), a Python script writing .xlsx withopenpyxl(any OS), or Data > From Text/CSV for a CSV you already have. - IDs must be Text. All 1,361 post IDs in our sample had 19 digits; Excel keeps 15, so 99.9% would change if stored as numbers.
- Messy text is normal: 62.5% of posts had line breaks, 67.7% a non-ASCII character and 21.8% an emoji. Turn on Wrap Text and import as UTF-8.
- Request by
userId. By screen name, 10.5% of returned rows repeated an earlier page; byuserIdthe repeat rate was 0.3% for the two accounts we rechecked. - Speed: a 10-page (up to 200 posts) pull took a median 35 s through our throttled client, and the .xlsx was about 37 KB.
- Cost: 15 credits per post returned, so 200 posts = $0.03 versus $1.00 on the official X API ($0.005 per post read), about 33x less.
This page is the Excel twin of our Google Sheets guide. The Sheets page runs an Apps Script inside a Google spreadsheet; this one covers Microsoft Excel, where the tools are different: Power Query's Web.Contents for a workbook that refreshes itself, a Python script that writes a real .xlsx file, and the Text/CSV importer for exports you already have. Excel also brings its own traps, starting with a 15-digit number limit that quietly rewrites every post ID.
We did not want to guess which traps matter, so we pulled 1,361 real posts from 10 organization accounts (Microsoft Excel, Microsoft 365, Power BI, Microsoft, GitHub, NASA, OpenAI Developers, Vercel, Docker and NVIDIA) through /twitter/user/last_tweets, wrote each account to .xlsx with openpyxl, and measured what would break: ID precision, text length, line breaks, emoji, nested media, repeated rows, fetch time and file size. Every number below comes from that study, collected in 2026.
What we ran and what we did not: the Python route ran end to end in this study (fetching through our rate-limited client, then writing workbooks with openpyxl). We did not have Excel available to run the Power Query route, so that section follows Microsoft's own documentation for Web.Contents, List.Generate and the Web connector, quoted where it matters, and says so.
99.9%
Which route fits: Power Query, Python or CSV
The three routes end in the same table. They differ in where the code lives, whether the workbook can refresh itself, and which Excel builds support them.
Power Query is the only route that keeps the API call inside the workbook. Microsoft's reference for Web.Contents says that "specifying this value as a record will supply additional headers to an HTTP request", which is exactly what an API that authenticates with an X-API-Key header needs. The catch is that the key then sits in the query text, readable by anyone who opens the Advanced Editor.
Python keeps the key out of the workbook and works on a Mac, a server or a scheduled job. It also gives you full control over cell types, which matters for the 19-digit IDs.
CSV import is for data you already have, for example a CSV produced by a script or another tool. The import dialog is where you stop Excel from converting IDs and dates on the way in.
What 1,361 real posts do to an Excel sheet
We checked every post in the sample against Excel's documented limits: 15 digits of number precision, 32,767 characters per cell and 253 line feeds per cell (Excel specifications and limits, support.microsoft.com). The chart shows how often each issue appeared.
The ID problem is total. Every ID in the sample had 19 digits. Microsoft's support article on large numbers says that "any numbers past the 15th digit are rounded down to zero", so a post ID typed or imported as a number keeps its first 15 digits and gets four zeros. That changed 1,360 of 1,361 IDs (99.9%); the one survivor happened to end in zeros already. In this sample the truncated IDs stayed distinct (0 collisions), but they no longer point at the right post, so lookups, joins and links built from them break.
Text is long and multi-line, but never too long. The median post had 140 characters, the 95th percentile 328 and the longest 924, far under the 32,767-character cell limit (0 posts over it). 14.0% ran past 280 characters, which is normal for long posts, so do not truncate the column to 280.
Dates parse cleanly. createdAt arrives as text such as Thu Oct 16 12:34:56 +0000 2026. The format %a %b %d %H:%M:%S %z %Y parsed 100% of the sample, and viewCount was present on every post (0 nulls).
A formula-looking post is rare but real. 1 post in 1,361 started with =, +, - or @. openpyxl stores a string that starts with = as a formula unless you mark the cell as text, which the script below does.

Route 1: a refreshable Power Query in Excel for Windows
Where it runs. Microsoft's table of Power Query data sources lists Web for Excel for Windows (Microsoft 365 and the perpetual versions), but not for Microsoft 365 for Mac, whose list starts at Text & CSV, Excel workbook, XML and JSON. Excel for the web lists a "Web API" source with User/Password authentication instead, which does not send a custom header. So build this query in Excel for Windows.
Why the From Web dialog is not enough. The Advanced view of Data > From Web has an "HTTP request header parameters" dropdown, but Microsoft's connector page lists the headers it offers: Accept, Accept-Charset, Accept-Encoding, Accept-Language, Cache-Control, Content-Type, If-Modified-Since, Prefer, Range and Referer. X-API-Key is not among them, and the dialog also cannot follow a cursor. Use Data > Get Data > From Other Sources > Blank Query, open the Advanced Editor, and paste the M code below.
How the query works. Web.Contents gets a static base URL plus RelativePath and Query, which Microsoft describes as the way to "dynamically query a static base URL" and to "add query parameters to the URL without having to worry about escaping". Headers carries the key. List.Generate requests the first page with an empty cursor, then keeps asking for the next page while has_next_page is true and next_cursor is not empty, up to MaxPages. The rest flattens data.tweets into a table, removes repeated IDs, parses createdAt with DateTime.FromText (format yyyy-MMM-dd HH:mm:ss, culture en-US) and sets id to text.
Credentials prompt. On first refresh Excel asks how to connect to https://api.twitterapi.io. Choose Anonymous: the key travels in the header you wrote, not in a credential. Microsoft's Web connector page lists Anonymous among the authentication kinds for Web.Contents.
Pacing. Power Query fires page requests back to back. Paid accounts allow 20 requests per second, so 10 pages are fine. Before your first payment the limit is 0.2 requests per second, so set Pause to 5 seconds; Function.InvokeAfter waits that long before each call.
Not run here. We could not run Excel for this page, so the query follows Microsoft's function reference (Web.Contents, List.Generate, Record.FieldOrDefault, Table.FromRecords, Table.Distinct, DateTime.FromText, Function.InvokeAfter) and the response shape our study recorded. If a step errors, open it in the Applied Steps pane; the API's own error text is in msg.
let
ApiKey = "YOUR_API_KEY", // stored in plain text inside the workbook
UserId = "11348282", // NASA; look an ID up once with /twitter/user/info
MaxPages = 10, // up to 20 posts per page, so up to 200 posts
Pause = #duration(0, 0, 0, 0), // set to 5 seconds before your first payment (0.2 requests/s)
GetPage = (cursor as text) as record =>
Function.InvokeAfter(
() => Json.Document(
Web.Contents(
"https://api.twitterapi.io",
[
RelativePath = "twitter/user/last_tweets",
Query = [userId = UserId, cursor = cursor],
Headers = [#"X-API-Key" = ApiKey],
Timeout = #duration(0, 0, 1, 0)
]
)
),
Pause
),
Pages = List.Generate(
() => [i = 1, page = GetPage("")],
each [page] <> null,
each
if [i] < MaxPages
and Record.FieldOrDefault([page], "has_next_page", false) = true
and Record.FieldOrDefault([page], "next_cursor", "") <> ""
then [i = [i] + 1, page = GetPage([page][next_cursor])]
else [i = [i], page = null],
each [page]
),
Tweets = List.Combine(List.Transform(Pages, each try _[data][tweets] otherwise {})),
AsTable = Table.FromRecords(
Tweets,
{"id", "createdAt", "text", "lang", "likeCount", "retweetCount", "replyCount",
"quoteCount", "viewCount", "bookmarkCount", "isReply", "url"},
MissingField.UseNull
),
Unique = Table.Distinct(AsTable, {"id"}),
Dated = Table.TransformColumns(Unique, {{"createdAt", each
let p = Text.Split(_, " ")
in DateTime.FromText(p{5} & "-" & p{1} & "-" & p{2} & " " & p{3},
[Format = "yyyy-MMM-dd HH:mm:ss", Culture = "en-US"]),
type datetime}}),
Typed = Table.TransformColumnTypes(Dated, {
{"id", type text}, {"text", type text}, {"lang", type text},
{"likeCount", Int64.Type}, {"retweetCount", Int64.Type},
{"replyCount", Int64.Type}, {"quoteCount", Int64.Type},
{"viewCount", Int64.Type}, {"bookmarkCount", Int64.Type},
{"isReply", type logical}, {"url", type text}})
in
TypedPagination, repeated rows and why userId beats userName
Across the 10 accounts, 160 of 1,521 returned rows (10.5%) repeated a post ID already seen on an earlier page, in 6 of the 10 accounts. In one account a whole 20-post page came back twice. Without a dedupe step those rows inflate every SUM and COUNT in the sheet.
The study requested timelines by screen name (userName). The endpoint documentation explains the difference: with userName the endpoint "is built on X search", while with userId it "reads the account's profile timeline directly, which is usually faster and more reliable". So we re-requested the same 10 pages for two accounts that had shown repeats, this time by userId.
The repeat rate fell from 10.0% to 0.3%. Two accounts is a small check, not a guarantee, so keep the dedupe step either way: Table.Distinct(AsTable, {"id"}) in Power Query, a seen set in Python. Note also that userId pages sometimes held fewer than 20 posts, which is expected; the loop must follow has_next_page, not a fixed count.
Getting the ID. Call /twitter/user/info with userName once; the numeric ID is data.id (18 credits for the profile). An unknown name still returns HTTP 200 with status: "error" and msg: "user not found", so check status, not only the HTTP code. Store the ID in the query; it does not change when the account renames itself.
Cursor format. On the userId path next_cursor values start with tl:. The docs say to pass the cursor back unchanged, which both code samples on this page do.
Route 2: a Python script that writes a real .xlsx
The script in the full example at the end of this page looks the account ID up, pages through /twitter/user/last_tweets by userId, dedupes on id, and writes one sheet with openpyxl. It handles the issues from the study at write time, so the workbook opens clean in any Excel build, including Mac and the web viewer.
ID as text. The API returns id as a JSON string, and openpyxl writes a Python string as a text cell. The script also sets the column's number format to @ (Text), so a user who retypes an ID does not get it rounded.
Dates as dates. createdAt is parsed with datetime.strptime(..., "%a %b %d %H:%M:%S %z %Y") and written as a naive UTC datetime with format yyyy-mm-dd hh:mm:ss, so filters, PivotTables and date grouping work. Excel has no time zone on a cell; label the column as UTC.
Readable text. The text column gets Wrap Text and top alignment, a width of 70, a frozen header row and an Excel Table (TableStyleMedium2), so sorting and filtering work without setup.
Flattened nested fields. Media types from extendedEntities.media[].type become a comma-separated column, link targets from entities.urls[].expanded_url a space-separated one, and retweeted_tweet becomes an isRepost flag. Keep the raw JSON elsewhere if you need the rest.
Formula guard. A text cell that starts with = is forced to type s (string), so a post like that is shown as text instead of being evaluated.
What we ran. The study wrote one .xlsx per account with openpyxl. Writing a full account file took a median of 16 ms and produced about 37 KB for up to 200 posts. We also ran the final script with its HTTP calls replaced by API responses recorded during the study (the NASA pages requested by userId), and opened the output with openpyxl to confirm the ID was stored as text, the date format, the frozen header, the table and the formula guard. We did not run it with a live key outside the study client.
Fetch time is dominated by the network, not by Excel. A 10-page pull took a median of 35 s, about 3.5 s per page, but our client spaces requests through a 5 requests per second limiter shared with other jobs, so treat these times as an upper bound.

Route 3: importing a CSV of tweets without losing the IDs
Double-clicking a CSV is the fastest way to damage it: Excel guesses each column's type, turns the 19-digit IDs into numbers in scientific notation and drops the last four digits. Microsoft's support article on keeping large numbers names this exact conversion, "truncating numerical data to 15 digits of precision", and recommends importing instead.
Step 1. Data > From Text/CSV, pick the file. In the preview, set File Origin to Unicode (UTF-8), otherwise the emoji and accented characters (67.7% of posts in our sample had a non-ASCII character) turn into mojibake.
Step 2. Choose Transform Data (Edit), which opens the Power Query Editor. Select the id column (and any conversationId, inReplyToId or author ID columns), then Transform > Data Type > Text, and pick Replace Current.
Step 3. Set createdAt to a date. If the CSV holds X's native format, split it with the same DateTime.FromText expression used in Route 1; if your exporter already wrote ISO 8601, Data Type > Date/Time is enough.
Step 4. Close & Load. Because the import is itself a Power Query, Refresh reloads the file after you overwrite it with a newer export, which turns a CSV-producing script into a semi-automatic feed.
If you are producing the CSV yourself, our guide to exporting tweets to CSV covers the writer side; on the Excel side the rules are the same: UTF-8, IDs as text, one row per post.
Refresh schedules and what each one costs
Excel's refresh options live under Data > Queries & Connections > right-click the query > Properties > Usage: Refresh every N minutes, Refresh data when opening the file, and Enable background refresh; Ctrl+Alt+F5 refreshes everything. Each refresh re-runs every page request, so the schedule sets the bill.
Our reads are billed per post returned: 15 credits per post ($0.15 per 1,000), with a minimum of 15 credits per request, so a full 20-post page costs $0.003. The official X API's pay-per-usage rate card (docs.x.com/x-api/getting-started/pricing) charges $0.005 per post read.
That is about 33x less per 1,000 posts ($0.15 against $5). The official pay-per-usage plan is also capped at 3 million post reads a month, with Enterprise above that.
Refresh only what is new. last_tweets always returns the newest page, so an hourly refresh re-reads posts you already have. To pull only new posts, switch to /twitter/tweet/advanced_search with from:NASA since_time:<unix>; an empty result costs the 15-credit minimum ($0.00015). As a reference point, a check that finds nothing every 5 minutes for a month costs $1.30. Load the new rows into a second query and append them to the archive table.
// Incremental variant: only posts newer than the last refresh (one page shown)
let
ApiKey = "YOUR_API_KEY",
Since = Number.ToText(Number.RoundDown(Duration.TotalSeconds(
DateTimeZone.UtcNow() - #datetimezone(1970, 1, 1, 0, 0, 0, 0, 0)) - 3600)),
Body = Json.Document(Web.Contents("https://api.twitterapi.io", [
RelativePath = "twitter/tweet/advanced_search",
Query = [query = "from:NASA since_time:" & Since, queryType = "Latest", cursor = ""],
Headers = [#"X-API-Key" = ApiKey]])),
Tweets = Record.FieldOrDefault(Body, "tweets", {})
in
Table.FromRecords(Tweets, {"id", "createdAt", "text", "likeCount", "viewCount", "url"}, MissingField.UseNull)Limits, versions and keeping the API key safe
Row limit. A worksheet holds 1,048,576 rows by 16,384 columns. At 20 posts per page that is far beyond any single account's reachable timeline; if you archive many accounts for years, load into the Data Model instead of a sheet.
Line feeds per cell. Excel allows 253 line feeds in a cell. Posts made of many short lines are the realistic way to hit it; if you see clipped cells, collapse repeated blank lines in Python before writing.
The key lives in the workbook. In the Power Query route the key is a literal string in the M code, so anyone you send the file to can read it in the Advanced Editor. Keep that workbook private, or share the output of the Python route instead, which reads the key from an environment variable and writes only data. Treat a leaked workbook as a leaked key.
ApiKeyName is not a header. Web.Contents has an ApiKeyName option, but Microsoft's reference describes it as the name of a key parameter "that must be used in the URL", with the value taken from the Web API credential. This API reads the key from the X-API-Key header, so use Headers as shown.
Power BI service. If you later move the same M code into Power BI, note that Microsoft says the Web API authentication type "isn't supported in the Power BI service"; the Anonymous plus header approach is the one to test there.
Write actions are separate. Everything on this page reads public data and needs no X account. Posting, liking or following from a spreadsheet would run through an authenticated session: one /twitter/user_login_v2 login ($0.10, with a proxy you supply) returns login_cookies, then each call such as /twitter/create_tweet_v2 is 60 credits ($0.0006) per successful call; calls that return status: error are not charged. Each call acts as that account, X can rate-limit, lock or suspend it, keep a normal human pace, and the session can need a re-login. A refreshing workbook is the wrong place for that.
How we collected this
Question. What happens to real Twitter (X) timeline posts when they land in an Excel worksheet: do the IDs survive, how long and messy is the text, which nested fields need flattening, how often do pages repeat rows, and how long does a 200-post pull take?
Accounts. 10 public organization accounts: msexcel, Microsoft365, MSPowerBI, Microsoft, github, NASA, OpenAIDevs, vercel, Docker and nvidia. No private individuals were profiled.
Method. /twitter/user/last_tweets by userName, default settings (replies excluded), newest first, up to 10 pages per account: 81 requests, 1,521 rows returned, 1,361 unique posts. A follow-up re-requested 10 pages each for NASA and Microsoft by userId (20 requests, 361 rows). Total: 101 requests, about $0.28. Each account was then written to .xlsx with openpyxl (IDs as text) to measure file size and write time. Collected in 2026.
Window. The latest posts of each account at collection time, so each account covers a different span: a busy account's 200 posts cover weeks, a quiet one's cover months.
What it cannot show. Some accounts returned few rows (Microsoft365 returned 1 post), so per-account figures are uneven. Fetch times include a shared 5 requests per second limiter and are an upper bound. The userId check covers two accounts only. We did not run Excel itself; Excel behavior on this page is taken from Microsoft's documentation, and the share of IDs that change is computed by applying Excel's documented 15-digit rule.
Privacy. Aggregates only. Raw pages stayed on the collecting machine and were not published; the committed sample holds de-identified per-post rows (no ID, URL, text or handle).
# tweets_to_excel.py: pull an account's recent posts from the X API and save them as .xlsx
# pip install requests openpyxl
import os
import time
from datetime import datetime
import requests
from openpyxl import Workbook
from openpyxl.styles import Alignment, Font
from openpyxl.utils import get_column_letter
from openpyxl.worksheet.table import Table, TableStyleInfo
API_KEY = os.environ["TWITTERAPI_IO_KEY"] # from your dashboard; never hard-code it
BASE = "https://api.twitterapi.io"
USER = "NASA" # any public account (screen name)
MAX_PAGES = 10 # 20 posts per page, so up to 200 posts
PAUSE_S = 0.1 # fixed pause between pages (paid tiers allow 20 req/s; use 5.0 before your first payment)
COLUMNS = ["id", "createdAt", "author", "text", "lang", "likeCount", "retweetCount",
"replyCount", "quoteCount", "viewCount", "bookmarkCount", "isReply",
"isRepost", "mediaTypes", "links", "url"]
def user_id(user):
"""Look the numeric ID up once (18 credits); the docs recommend userId for last_tweets."""
r = requests.get(
f"{BASE}/twitter/user/info",
headers={"X-API-Key": API_KEY},
params={"userName": user},
timeout=30,
)
r.raise_for_status()
body = r.json()
if body.get("status") == "error" or not body.get("data"):
raise SystemExit(f"API error: {body.get('msg')}")
return body["data"]["id"]
def fetch_posts(uid, max_pages):
"""Follow next_cursor through /twitter/user/last_tweets; dedupe on id."""
seen, posts, cursor = set(), [], ""
for _ in range(max_pages):
r = requests.get(
f"{BASE}/twitter/user/last_tweets",
headers={"X-API-Key": API_KEY},
params={"userId": uid, "cursor": cursor},
timeout=30,
)
r.raise_for_status()
body = r.json()
if body.get("status") == "error":
raise SystemExit(f"API error: {body.get('msg')}")
for t in (body.get("data") or {}).get("tweets") or []:
if t["id"] not in seen: # a later page can repeat a row
seen.add(t["id"])
posts.append(t)
cursor = body.get("next_cursor") or "" # pass it back unchanged
if not body.get("has_next_page") or not cursor:
break
time.sleep(PAUSE_S)
return posts
def to_row(t):
media = (t.get("extendedEntities") or {}).get("media") or []
links = (t.get("entities") or {}).get("urls") or []
return {
"id": t["id"], # keep as text: 19 digits > Excel's 15
"createdAt": datetime.strptime(t["createdAt"], "%a %b %d %H:%M:%S %z %Y").replace(tzinfo=None),
"author": (t.get("author") or {}).get("userName"),
"text": t.get("text") or "",
"lang": t.get("lang"),
"likeCount": t.get("likeCount"),
"retweetCount": t.get("retweetCount"),
"replyCount": t.get("replyCount"),
"quoteCount": t.get("quoteCount"),
"viewCount": t.get("viewCount"),
"bookmarkCount": t.get("bookmarkCount"),
"isReply": bool(t.get("isReply")),
"isRepost": bool(t.get("retweeted_tweet")),
"mediaTypes": ", ".join(m.get("type", "") for m in media),
"links": " ".join(u.get("expanded_url") or u.get("url") or "" for u in links),
"url": t.get("url"),
}
def write_xlsx(rows, path):
wb = Workbook()
ws = wb.active
ws.title = "tweets"
ws.append(COLUMNS)
for row in rows:
ws.append([row[c] for c in COLUMNS])
text_cell = ws.cell(row=ws.max_row, column=4)
if row["text"].startswith("="):
text_cell.data_type = "s" # openpyxl would otherwise save "=..." as a formula
for cell in ws["A"][1:]:
cell.number_format = "@" # Text format for the id column
for cell in ws["B"][1:]:
cell.number_format = "yyyy-mm-dd hh:mm:ss"
for cell in ws["D"][1:]:
cell.alignment = Alignment(wrap_text=True, vertical="top")
widths = {"A": 21, "B": 19, "C": 16, "D": 70}
for i, name in enumerate(COLUMNS, start=1):
letter = get_column_letter(i)
ws.column_dimensions[letter].width = widths.get(letter, 13)
ws.cell(row=1, column=i).font = Font(bold=True)
ws.freeze_panes = "A2"
ref = f"A1:{get_column_letter(len(COLUMNS))}{len(rows) + 1}"
table = Table(displayName="Tweets", ref=ref)
table.tableStyleInfo = TableStyleInfo(name="TableStyleMedium2", showRowStripes=True)
ws.add_table(table)
wb.save(path)
if __name__ == "__main__":
posts = fetch_posts(user_id(USER), MAX_PAGES)
rows = sorted((to_row(t) for t in posts), key=lambda r: r["createdAt"], reverse=True)
out = f"{USER}_tweets.xlsx"
write_xlsx(rows, out)
print(f"{len(rows)} posts -> {out}")
Researching this?Free starter credits cover end-to-end testing — Google sign-in, no card. Get a key.
Questions readers ask
Can Excel pull tweets directly from the Twitter (X) API?
Yes, in Excel for Windows. Power Query's Web.Contents accepts a Headers record, so a blank query can send X-API-Key to https://api.twitterapi.io/twitter/user/last_tweets and follow next_cursor. The From Web dialog alone cannot, because its header dropdown only offers standard headers such as Accept and Referer. We built the query from Microsoft's documentation and did not run it in Excel for this page.
Why do tweet IDs turn into numbers ending in 0000 in Excel?
Excel keeps 15 significant digits and rounds everything past the 15th digit down to zero. Post IDs have 19 digits (all 1,361 in our sample), so a numeric ID loses its last four digits. Load the column as Text in Power Query or the CSV importer, or write it as a string with openpyxl.
Does the Power Query method work on Excel for Mac or Excel for the web?
Microsoft's table of Power Query sources does not list Web for Microsoft 365 for Mac, and Excel for the web lists a Web API source with User/Password authentication rather than custom headers. On those platforms use the Python script, which writes an .xlsx you can open anywhere, or import a CSV.
How do I make the Excel sheet refresh automatically?
After loading the query, open Data > Queries & Connections, right-click the query, choose Properties, and on the Usage tab tick Refresh every N minutes and/or Refresh data when opening the file. Each refresh re-runs every page request, so one full page per hour costs $2.16 over 30 days.
How much does it cost to export tweets to Excel with an API?
Reads are 15 credits per post returned ($0.15 per 1,000), with a 15-credit minimum per request. 200 posts cost $0.03; the same 200 posts cost $1.00 at the official X API's $0.005 per post read. New accounts that pass the automatic bot check get free starter credits (no card, one per person or network, expiring after 31 days); see the pricing page for the amount.
Do I need an X developer account or my own X login?
No. Reading public posts needs only an API key in the X-API-Key header, with no X account. A login is needed only for write actions such as posting, which run through /twitter/user_login_v2 and act as that account.
Why does my sheet have duplicate tweets?
Pages can overlap. In our study 10.5% of rows requested by screen name repeated an earlier page; requesting by userId cut that to 0.3% for the two accounts we rechecked. Dedupe on id in every route: Table.Distinct in Power Query, a set in Python, Remove Duplicates on the id column in a plain sheet.
Will long tweets or emoji break Excel?
Not if you import correctly. The longest post in our sample had 924 characters against a 32,767-character cell limit. Emoji (21.8% of posts) and other non-ASCII text (67.7%) only break when a CSV is opened without UTF-8, so set File Origin to Unicode (UTF-8) in the import preview.
Continue
- Microsoft Learn: Web.Contents (Headers, Query, RelativePath, ApiKeyName, Timeout)
- Microsoft Learn: Power Query Web connector (authentication kinds, header dropdown)
- Microsoft Support: Excel specifications and limits (15-digit precision, 32,767 characters per cell)
- Microsoft Support: Power Query data sources in Excel versions (Windows, Mac, web)
- TwitterAPI.io docs: Get User Last Tweets (userId vs userName, cursor, 20 per page)
- X API docs: pay-per-usage pricing ($0.005 per post read)
- X (Twitter) API overview and endpoints
- Twitter to Google Sheets with Apps Script
- Power Automate Twitter (X) connector guide
- exporting tweets to CSV
- the Twitter (X) JSON response format explained
- downloading tweets in bulk with an API
- TwitterAPI.io pricing and free starter credits
- 01How to Mute a Conversation on Twitter (X): Mute This Conversation, Step by Step
- 02How to Hide Replies on Twitter (X), and What a Hidden Reply Still Shows
- 03Twitter (X) Ad Examples by Format, With Real Brand Data
- 04Twitter (X) Affiliate Marketing in 2026: Rules, Disclosure and What Link Posts Really Reach
- 05Tweets to CSV: Export Twitter (X) Posts to a Clean CSV File
- 06PhantomBuster Pricing: Plans, Execution Hours and What X (Twitter) Data Really Costs
- 07Composio Pricing in 2026: Plans, Tool Calls and the Twitter (X) Data Bill
- 08The X Developer Portal (X Developer Console) for the Twitter (X) API: Sign-Up, Apps and Keys, Billing, Limits, and When You Do Not Need It
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.