Twitter (X) in Looker Studio: Build the Dashboard Without a Paid Connector

- No Google-built X connector. The gallery lists paid partner connectors; Looker Studio was renamed Data Studio on April 16, 2026 (Google release notes).
- The free route: API → flat table in Google Sheets (Apps Script) or BigQuery (load +
MERGE) → Data Studio data source. - Real dataset: 7 developer-tool brands gave 301 rows in 30 days, 99 KB of CSV with post text, 25 KB without.
- Refresh cost: newest page once a day $0.63/month; re-pulling all 30 days daily $1.71/month (official X API: $45.15).
- Formula trap: @Docker's scorecard ratio was 0.17% while its median post was 0.55%: one post held 71% of its views.
- Keep
tweet_idas text in Sheets (19 digits) and upsert on it, so counters refresh instead of duplicating rows.
Searching for a Twitter Looker Studio connector usually ends on a vendor page that sells a monthly subscription. That is one valid route, but it is not the only one, and for a public-post dashboard (your brand, competitors, an ecosystem of developer tools) you can build the whole thing yourself in an afternoon with a small script, a Google Sheet or a BigQuery table, and a handful of calculated fields.
This guide does it end to end and shows the actual data. We pulled 30 days of posts from seven developer-tool brands (@github, @vercel, @supabase, @stripe, @nodejs, @Docker and @code), flattened them into the exact table the report reads, and measured the row counts, file sizes, refresh cost and the medians you would chart. The numbers below come from that dataset, collected in 2026.
One naming note before we start: Google's own release notes say Looker Studio was rebranded as Data Studio on April 16, 2026, so the product's help pages and menus may now say Data Studio. The steps are the same; this page uses both names.
$1.71
Is there a Twitter (X) connector for Looker Studio?
Not one built by Google. Google's Data Studio documentation separates connectors built and supported by Google (Google Sheets, BigQuery, Google Analytics and similar) from partner connectors built by third parties, which, in Google's words on the data sources page, may cost money and are supported by their developer, not by Google. X data falls into the second group.
A web search for the keyword returns partner connector pages from vendors such as Supermetrics, Windsor.ai, Porter Metrics, Dataslayer, Coupler.io, Improvado and Two Minute Reports. Their pages describe different data types (organic account analytics, ads account data, insights, public post data), so check which X data a connector actually covers, which X account it needs you to log in with, and how it is priced before you subscribe. Google's release notes list one partner connector named X Ads (by Two Minute Reports, added March 20, 2025); no gallery entry with Twitter in its name appears there.
The alternative is to skip the connector layer: write the posts into a source Data Studio already reads natively, then connect that. You own the schema, choose the refresh schedule, and pay only for the data returned by the API you pull from.
Refresh intervals come from Google's Manage data freshness page: the Sheets connector offers 15 minutes (its default), 1 hour, 4 hours or 12 hours, and BigQuery offers 1 to 50 minutes or 1 to 12 hours. Data Studio also re-checks a sheet for new rows and changed values each time a report query runs.
The schema: 14 columns that cover a public-post dashboard
Every chart in the report reads one flat table with one row per post. Nested JSON (author objects, media arrays, quoted posts) is flattened at pull time, so Data Studio only sees plain columns with stable types. These are the 14 columns used in every code sample on this page, with the API field each one comes from.
Why tweet_id is text. Post ids are 19-digit numbers. Google Sheets stores numbers with about 15 significant digits, so an id typed as a number loses its last digits and two posts can collide. Format the column as plain text before writing (the Apps Script below does it) and keep it STRING in BigQuery.
Why type matters. In our sample, reposts were up to 47% of a brand's feed (@stripe) and 41% of @supabase's. A repost's counters belong to the reposted post, not to the brand, so filter type to original and quote before computing any engagement figure. The study numbers below do exactly that.
Why flatten at all. The raw JSON for one post averaged 8,492 bytes in our pull; the flat row averaged 330 bytes with the post text and 82 bytes without it. Storing raw JSON in a sheet would be about 26 times larger and still unusable as chart fields.
Step 1, Google Sheets route: an Apps Script that upserts by tweet_id
If a sheet is enough, one Apps Script function and a daily time-driven trigger keep it current. Our Google Sheets guide covers the general Apps Script setup (storing the key, triggers, follower snapshots); the version below is specific to a Data Studio source: it writes the 14-column layout and upserts on tweet_id, so each run refreshes the views and likes of posts already in the sheet instead of appending duplicates that would double-count in every chart.
Add the key under Project Settings → Script properties as TWITTERAPI_IO_API_KEY, run refreshPosts once to authorize it, then add a daily time-driven trigger. Each account costs one request per run (20 posts, $0.003). The pause between accounts respects the 0.2 requests per second limit that applies before the first payment; once paid, the limit is 20 requests per second and the pause can go.
Apps Script quotas are generous for this job: Google lists 20,000 URL Fetch calls a day for consumer accounts (100,000 for Workspace), a 6-minute limit per execution and 90 minutes of total trigger runtime a day on consumer accounts. Seven accounts take well under a minute.
In Data Studio, choose Create → Data source → Google Sheets, pick the posts tab, keep Use first row as headers on, and check that created_at was detected as Date & Time. If it shows as Text, either change the type in the field list or use the PARSE_DATETIME field from the modeling section.
// Code.gs - upsert X (Twitter) posts into a "posts" tab that Data Studio (Looker Studio) reads.
// Script property: TWITTERAPI_IO_API_KEY. Trigger: time-driven, once a day.
const ACCOUNTS = ['github', 'vercel', 'supabase', 'stripe', 'nodejs', 'Docker', 'code'];
const HEADERS = ['tweet_id', 'created_at', 'account', 'type', 'text', 'lang', 'has_media',
'like_count', 'retweet_count', 'reply_count', 'quote_count', 'view_count', 'bookmark_count', 'url'];
function toRow(account, t) {
const type = t.retweeted_tweet ? 'repost' : t.quoted_tweet ? 'quote' : t.isReply ? 'reply' : 'original';
const media = ((t.extendedEntities || {}).media || []).length > 0 ? 1 : 0;
return [String(t.id), Utilities.formatDate(new Date(t.createdAt), 'UTC', 'yyyy-MM-dd HH:mm:ss'),
account, type, (t.text || '').replace(/\n/g, ' '), t.lang || '', media,
t.likeCount || 0, t.retweetCount || 0, t.replyCount || 0, t.quoteCount || 0,
t.viewCount || 0, t.bookmarkCount || 0, t.url || ''];
}
function refreshPosts() {
const key = PropertiesService.getScriptProperties().getProperty('TWITTERAPI_IO_API_KEY');
const ss = SpreadsheetApp.getActive();
const sheet = ss.getSheetByName('posts') || ss.insertSheet('posts');
sheet.getRange('A:A').setNumberFormat('@'); // keep 19-digit ids as text
const data = sheet.getLastRow() ? sheet.getDataRange().getValues() : [HEADERS];
const rowOf = new Map(data.slice(1).map((r, i) => [String(r[0]), i + 1]));
for (const account of ACCOUNTS) {
const url = 'https://api.twitterapi.io/twitter/user/last_tweets?userName=' + encodeURIComponent(account);
const res = UrlFetchApp.fetch(url, { headers: { 'X-API-Key': key }, muteHttpExceptions: true });
if (res.getResponseCode() !== 200) {
console.warn(account, res.getResponseCode(), res.getContentText().slice(0, 200));
continue;
}
const body = JSON.parse(res.getContentText());
const tweets = (body.data && body.data.tweets) || [];
for (const t of tweets) {
const row = toRow(account, t);
if (rowOf.has(row[0])) data[rowOf.get(row[0])] = row; // refresh counters in place
else { rowOf.set(row[0], data.length); data.push(row); }
}
Utilities.sleep(5000); // 0.2 requests/s before the first payment; 20/s once paid
}
sheet.getRange(1, 1, data.length, HEADERS.length).setValues(data);
}Step 1, BigQuery route: load to staging, then MERGE
BigQuery is the better store once you track many accounts, want more than a few months of history, or need to join posts with other data (sign-ups, releases, ad spend). The pattern is the same upsert as in Sheets, in SQL: load today's pull into a staging table, then MERGE it into the main table on tweet_id.
The Python script at the end of this page does the load with --bigquery <project.dataset.posts_staging> using the client library's load_table_from_json and an explicit schema (STRING ids, TIMESTAMP created_at, INT64 counters). Run it on a daily schedule (Cloud Scheduler with Cloud Run, a cron host, or any CI runner), then run the MERGE below as a BigQuery scheduled query.
In Data Studio, add the BigQuery connector and pick the posts table. Google's freshness page lists BigQuery refresh intervals from 1 to 50 minutes or 1 to 12 hours; since the table only changes once a day, a 12-hour interval is enough and keeps query costs down.
-- 1) the Python script below loads today's pull into posts_staging (WRITE_TRUNCATE)
-- 2) this MERGE keeps one row per post and refreshes its counters
MERGE `myproject.social.posts` AS p
USING `myproject.social.posts_staging` AS s
ON p.tweet_id = s.tweet_id
WHEN MATCHED THEN UPDATE SET
like_count = s.like_count, retweet_count = s.retweet_count, reply_count = s.reply_count,
quote_count = s.quote_count, view_count = s.view_count, bookmark_count = s.bookmark_count
WHEN NOT MATCHED THEN INSERT ROW;Step 2: calculated fields, and the SUM()/SUM() trap
With the table connected, add calculated fields in the data source editor. Google's calculated-fields page distinguishes row-level formulas (computed per row, then summed by the chart) from aggregated formulas such as SUM(Profit) / SUM(Revenue), which return one ratio for whatever the chart groups by. Engagement per view needs both versions, and they answer different questions.
Ratio of sums (scorecards). (SUM(like_count) + SUM(retweet_count) + SUM(reply_count)) / SUM(view_count) weights every post by its views. It answers: of all the views this account got, how many turned into an action?
Median of per-post ratios (typical post). A row-level field divided by view_count, then summarized with MEDIAN, answers: how does a normal post perform? Data Studio's function list includes MEDIAN, PERCENTILE, CASE, NULLIF and PARSE_DATETIME; there is no SAFE_DIVIDE, so guard the division with CASE.
In our dataset these two numbers diverged sharply whenever one post dominated an account's views. @Docker's scorecard ratio was 0.17% while its median post scored 0.55%, because a single post held 71% of its 30-day views and pulled the weighted ratio toward its own low rate. @supabase went the other way: 2.11% on the scorecard against 1.17% for the median post. A dashboard that shows only the scorecard would rank these brands differently from one that shows the typical post.
Practical rule. Put the ratio-of-sums field on scorecards and time series (it moves with real reach), and the median field in the per-account comparison table (it is not hijacked by one viral post). Label which is which on the chart.
-- Data Studio (Looker Studio) calculated fields, added in the data source editor
-- Scorecards and per-account tables: ratio of sums (formula aggregates itself)
Engagement per view =
(SUM(like_count) + SUM(retweet_count) + SUM(reply_count)) / SUM(view_count)
-- Per-post value; chart it with MEDIAN, not the default SUM
Post engagement per view =
CASE WHEN view_count > 0
THEN (like_count + retweet_count + reply_count) / view_count
END
-- Typical post for an account (use in a table with account as the dimension)
Median post engagement per view = MEDIAN(Post engagement per view)
-- Only needed if created_at arrives as Text
Posted at = PARSE_DATETIME("%Y-%m-%d %H:%M:%S", created_at)
-- Share of posts with a photo or video (has_media is 1 or 0)
Media share = SUM(has_media) / COUNT(tweet_id)
What the 30-day dataset looks like (the numbers you would chart)
This is the table behind the report: 301 rows from seven developer-tool brands over 30 days. Medians use each brand's own posts and quotes (reposts excluded), so they describe what the brand itself published.
Posting volume varies about sevenfold across the group: @github and @supabase published around 80 times in the window, @nodejs 12 times. The 30-day file for all seven is 99,395 bytes as CSV with post text and 24,602 bytes without the text and URL columns, or 4,214 cells a month. Size is not the constraint at this scale; even a year of history for these seven brands stays small for a sheet.
Engagement per view sits in a narrow band for developer brands: the median post across all seven scored 0.77%, and 90% of posts stayed under 1.55%. Treat these as reference points for this group only; consumer brands, creators and news accounts sit on a different scale, so calibrate against your own captured data.
Charts that work on this table. A time series of view_count by day with account as the breakdown dimension; a table with account, row count, median views and the median engagement field; a bar chart of type share per account; and a date range control so the whole page follows one window.

Refresh schedule and cost: append versus re-pull
Views and likes keep growing for days after a post goes out, so the refresh choice decides whether the report shows final numbers or first-day numbers. There are two reasonable schedules.
Append the newest page daily. One request per account per day returns the 20 newest posts, which is far more than any brand in this group posted on an average day (the busiest averaged about 2.8 posts a day). The upsert also refreshes those 20 posts' counters, so recent posts settle over the following days.
Re-pull the full 30-day window daily. Page back until the posts are older than 30 days. Every post's counters are current every morning; this costs more requests because older pages are re-read.
TwitterAPI.io bills 15 credits per tweet returned, which is $0.15 per 1,000 tweets or $0.003 for a full 20-post page; our figures assume full pages, including the older posts on each account's last page. The official X API column uses X's pay-per-usage rate card on docs.x.com ($0.005 per post read, with each post billed once per UTC day thanks to its 24-hour deduplication window) for the same posts. On the rate cards alone that is $5.00 versus $0.15 per 1,000 posts, about 33 times; on this dataset the re-pull schedule came out about 26 times apart because our cost counts whole pages.
Reads need no X account on our side. For a quick look before paying, 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 current amount. Purchased credits never expire.
To refresh counters on a fixed list of posts (for example, a campaign you are reporting on), the /twitter/tweets endpoint takes comma-separated tweet_ids and returns the same tweet fields, billed per tweet returned. That keeps the cost proportional to the posts you care about rather than to how much the accounts posted since.
Beyond brand timelines: hashtags, keywords and competitors
The same table works for keyword or hashtag dashboards. Swap the timeline call for /twitter/tweet/advanced_search with a query such as #buildinpublic lang:en or from:github OR from:vercel, store the matching posts with the same 14 columns, and set account to the post author's handle (author.userName). Data Studio does not care where the rows came from.
Keep author data at the aggregate level. A keyword search returns posts from private individuals. For a report you share, chart counts, medians and shares by day or by topic; do not build per-person tables of people who are not public figures or organizations.
Add follower context separately. Follower counts change slowly and belong in their own daily snapshot table (one /twitter/user/info call per account, $0.18 per 1,000 profiles), joined to posts on account and date. Blending a snapshot table with the posts table in Data Studio lets you chart engagement per follower next to engagement per view.
Mind the page size. Timelines return up to 20 posts per page. During our collection one timeline request returned an empty page with has_next_page false; repeating the call returned full pages. Log the row count per account on every run so a short pull is visible, and let the next run's upsert fill the gap.
How we collected this
Question. What does a 30-day Looker Studio dataset of developer-tool brand posts look like in practice: rows per account, bytes per row, the per-account medians a report would chart, and the request cost of a daily refresh?
Accounts. @github, @vercel, @supabase, @stripe, @nodejs, @Docker and @code (Visual Studio Code), each confirmed first with /twitter/user/info. Organization accounts only.
Method and window. /twitter/user/last_tweets with default settings (replies excluded), newest first, paging back until each account's oldest post was older than 30 days. Collected in 2026. 38 requests in total (7 profile checks, 31 timeline pages) returned 580 unique posts, of which 301 fell inside the 30-day window. The study cost about $0.09 in credits.
Metrics. Engagement per view = (likes + reposts + replies) / views, on posts with a view count, reposts excluded. Byte sizes are measured on the CSV the scripts on this page produce. Refresh costs assume 15 credits per tweet returned on full 20-post pages; the X API figure uses $0.005 per post read with one read per post per UTC day.
What this sample cannot show. Seven developer-tool brands over one 30-day window are not a benchmark for other industries or account sizes. Because replies were excluded, conversation-heavy accounts look quieter than they are. View counts are the values X reported at collection time and keep rising for recent posts.
Privacy. Aggregates only. Reposted and quoted authors were not analyzed, raw pages were not published, and the shared sample keeps one row per post with counters and post type but no ids, URLs or text.
"""looker_posts.py - the last 30 days of X (Twitter) posts as a flat table for Data Studio (Looker Studio).
pip install requests # plus google-cloud-bigquery for --bigquery
export TWITTERAPI_IO_API_KEY=... # twitterapi.io dashboard
python looker_posts.py github vercel supabase > posts.csv
python looker_posts.py github vercel --bigquery myproject.social.posts_staging
"""
import csv
import os
import sys
import time
from datetime import datetime, timedelta, timezone
import requests
BASE = "https://api.twitterapi.io"
KEY = os.environ["TWITTERAPI_IO_API_KEY"]
DAYS = 30
MAX_PAGES = 10 # 20 posts per page, newest first
FMT = "%a %b %d %H:%M:%S %z %Y"
FIELDS = [
("tweet_id", "STRING"), ("created_at", "TIMESTAMP"), ("account", "STRING"), ("type", "STRING"),
("text", "STRING"), ("lang", "STRING"), ("has_media", "INT64"), ("like_count", "INT64"),
("retweet_count", "INT64"), ("reply_count", "INT64"), ("quote_count", "INT64"),
("view_count", "INT64"), ("bookmark_count", "INT64"), ("url", "STRING"),
]
def tweet_type(t):
if t.get("retweeted_tweet"):
return "repost"
if t.get("quoted_tweet"):
return "quote"
return "reply" if t.get("isReply") else "original"
def flat(account, t):
media = (t.get("extendedEntities") or {}).get("media") or []
return {
"tweet_id": str(t["id"]),
"created_at": datetime.strptime(t["createdAt"], FMT).strftime("%Y-%m-%d %H:%M:%S"),
"account": account,
"type": tweet_type(t),
"text": (t.get("text") or "").replace("\n", " "),
"lang": t.get("lang") or "",
"has_media": 1 if media else 0,
"like_count": t.get("likeCount") or 0,
"retweet_count": t.get("retweetCount") or 0,
"reply_count": t.get("replyCount") or 0,
"quote_count": t.get("quoteCount") or 0,
"view_count": t.get("viewCount") or 0,
"bookmark_count": t.get("bookmarkCount") or 0,
"url": t.get("url") or "",
}
def last_30_days(account):
cutoff = datetime.now(timezone.utc) - timedelta(days=DAYS)
cursor, rows = "", []
for _ in range(MAX_PAGES):
r = requests.get(
f"{BASE}/twitter/user/last_tweets",
headers={"X-API-Key": KEY},
params={"userName": account, "cursor": cursor},
timeout=30,
)
r.raise_for_status()
body = r.json()
if body.get("status") == "error":
sys.exit(f"{account}: {body.get('msg')}")
tweets = (body.get("data") or {}).get("tweets", [])
stamps = [datetime.strptime(t["createdAt"], FMT) for t in tweets]
rows += [flat(account, t) for t, ts in zip(tweets, stamps) if ts >= cutoff]
if not body.get("has_next_page") or not stamps or min(stamps) < cutoff:
break
cursor = body["next_cursor"]
time.sleep(5) # 0.2 requests/s before the first payment; 20/s once paid
return rows
def load_bigquery(rows, table):
from google.cloud import bigquery
client = bigquery.Client()
config = bigquery.LoadJobConfig(
schema=[bigquery.SchemaField(name, kind) for name, kind in FIELDS],
write_disposition="WRITE_TRUNCATE", # staging table; MERGE into posts afterwards
)
client.load_table_from_json(rows, table, job_config=config).result()
print(f"loaded {len(rows)} rows into {table}", file=sys.stderr)
if __name__ == "__main__":
args = sys.argv[1:]
table = None
if "--bigquery" in args:
i = args.index("--bigquery")
table = args[i + 1]
args = args[:i] + args[i + 2:]
rows = []
for account in args:
rows += last_30_days(account)
print(f"{account}: {len(rows)} rows so far", file=sys.stderr)
if table:
load_bigquery(rows, table)
else:
w = csv.DictWriter(sys.stdout, fieldnames=[name for name, _ in FIELDS])
w.writeheader()
w.writerows(rows)
Researching this?Free starter credits cover end-to-end testing — Google sign-in, no card. Get a key.
Questions readers ask
Does Looker Studio have a free Twitter connector?
Not from Google. X data reaches Looker Studio (now called Data Studio) through partner connectors, which are usually paid, or through a source Data Studio reads natively. Writing posts to Google Sheets or BigQuery with a small script and connecting that source is the no-connector route; the only cost is the data API itself.
Is Looker Studio the same as Data Studio?
Yes. Google's release notes say Looker Studio was rebranded as Data Studio on April 16, 2026, and Google's help pages for connectors, data freshness and calculated fields now use the Data Studio name. The steps on this page apply under either name.
Can I connect my own X Analytics export to Looker Studio?
You can upload an exported CSV or paste it into a Google Sheet and connect that sheet, but it will not refresh on its own. For a report that updates daily, pull the posts through an API on a schedule as shown on this page.
How do I calculate engagement rate in Looker Studio?
Add a calculated field. For scorecards use (SUM(like_count) + SUM(retweet_count) + SUM(reply_count)) / SUM(view_count). For a typical-post figure, create a per-post ratio with a CASE guard against zero views and summarize it with MEDIAN. Exclude reposts first, since their counters belong to the reposted post.
Why do my tweet ids end in zeros in Google Sheets?
Post ids have 19 digits and Sheets keeps about 15 significant digits for numbers, so it rounds them. Format the id column as plain text before writing, or prefix the value, and keep it as STRING in BigQuery.
How often should the dashboard refresh?
Once a day is enough for brand reporting. In our sample the busiest brand posted about 2.8 times a day, so one 20-post page per account per day caught every new post for $0.63 a month across seven accounts. In Data Studio, a Sheets source re-checks for new rows on each query, with a 15-minute default freshness.
Can I chart competitors' posts, or only my own account?
Public posts from any public account can be read through the API without an X account, so brand and competitor timelines work the same way. If you evaluate a partner connector instead, check whether it reads only the accounts you log in with.
Continue
- Google Data Studio release notes: Looker Studio rebranded as Data Studio (April 16, 2026); X Ads partner connector (March 20, 2025)
- Google: Connect to Google Sheets (headers option, hidden cells, range, new rows picked up on each query)
- Google: Manage data freshness (Sheets 15 min default; BigQuery 1-50 min or 1-12 h)
- Google Apps Script quotas (URL Fetch calls per day, runtime per execution and per day)
- twitterapi.io API reference: user last tweets (20 per page, newest first, cursor, billed per tweet returned)
- X API pay-per-usage pricing ($0.005 per post read, 24-hour dedup), the official and pricier route
- X (Twitter) API overview and endpoints
- Twitter (X) data in Google Sheets with Apps Script
- Twitter (X) analytics: what to measure and how
- Hashtag analytics with the Twitter (X) API
- Twitter analytics report template
- Twitter engagement rate calculator
- Pay-per-use pricing: $0.15 per 1,000 tweets
- 01Twitter (X) Account Locked: Why It Happens and How to Unlock It
- 02The Library of Congress Twitter (X) Archive: What Happened and Can You Access It?
- 03Databricks Twitter (X) Pipeline: Load Tweets into a Delta Table in 2026
- 04Twitter (X) CRM: Sync X Profiles and Buying Signals into HubSpot or Salesforce
- 05Twitter (X) Likes API: What You Can Read, Like and Unlike in 2026
- 06Google AI Studio Free Tier Limits: What the Gemini API Allows in 2026
- 07LM Studio MCP: Connect MCP Servers (and Live Twitter (X) Data) to a Local Model
- 08Twitter (X) Creator Subscriptions API: see which creators an account subscribes to
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.