Twitter (X) Data in Tableau: a Python Extract Job and a Dashboard Layout

By TwitterAPI.io Team•16 min read
Diagram: TwitterAPI.io search pages flow into a Python job that writes a Google Sheet, a CSV file or a .hyper extract, each read by Tableau Public, Desktop or Cloud
One Python job, three file routes into Tableau. Measured: 598 unique posts across six Tableau-topic searches in 7 days, collected in 2026.
TL;DR
  • No X connector in Tableau. WDC 2.0 is retired and WDC 3.0 is deprecated (its repository is removed with Tableau 26.3), per Tableau's docs.
  • Write a file instead: Google Sheet for Tableau Public (auto refresh every 24 hours), CSV for any edition, .hyper via tableauhyperapi for Desktop / Server / Cloud.
  • Real volume is small: six Tableau-topic searches returned 598 unique posts in 7 days, from 67.6 a day (keyword) down to 0.1 a day (#TableauPublic).
  • Refresh cost: all six queries once a day about $0.47 a month; hourly about $1.09, because each run ends with a 15-credit empty request.
  • Chart the median: in the keyword search the mean post had 20.4 likes but the median had 1; the top 1% of posts held 61.2% of all likes.
  • We built the extract: 598 rows x 17 columns as CSV (526,465 bytes) and .hyper (655,360 bytes), read back with tableauhyperapi 0.0.27579.

This page is the Tableau member of a small set. If your dashboards live in Power BI, the Twitter API Power BI guide does the same job with a Power Query M function that calls the API on each refresh; if you are on the Google stack, the Looker Studio guide routes posts through Google Sheets or BigQuery. Tableau is different in one way that shapes everything below: it has no general way to call a cursor-paged HTTP API on a schedule, so the practical design is a small job outside Tableau that writes a file, and Tableau reads the file.

We could not run Tableau Desktop for this guide, so every statement about Tableau's behavior is per Tableau's documentation, fetched for this page (help.tableau.com, tableau.github.io and Tableau Exchange). What we did run is everything on the data side: the searches against our API, the flattening into a 17-column table, and a real .hyper file written with Tableau's tableauhyperapi Python package in a throwaway virtual environment, then read back to confirm the row count. The numbers on this page come from that run.

You will get the job (Python, about 100 lines), the extract schema with the types Tableau should see, a dashboard layout with the calculated fields to paste, a week of real Tableau-topic volume so you can size refreshes before you build, and the cost of each schedule next to the official X API.

Six Tableau-topic X searches refreshed daily for a month

$0.47

01 — Section

Is there a Twitter (X) connector for Tableau?

No. Tableau's list of connectors for web authoring on Server, Cloud and Public names databases, cloud drives and SaaS tools such as Salesforce and SharePoint Lists; there is no Twitter or X entry. We also found no record of a built-in Twitter connector in Tableau's help pages. The Twitter integrations people used in the past were web data connectors: small web pages, written against Tableau's WDC JavaScript framework, that fetched data and handed it to Tableau as an extract.

WDC 2.0 is gone. Tableau's Web Data Connector 2.0 page now says the framework "has been retired and is no longer available". Any old Twitter WDC built on it will not load in a current Tableau release.

WDC 3.0 is deprecated. WDC 3.0 shipped with Tableau 2022.3, is extract-only, and installs as a .taco file. Tableau's WDC documentation now carries the notice that the framework "is deprecated and will not receive further updates" and that the repository "will be removed with the Tableau 26.3 release". It also says only Tableau-managed connectors can be deployed to Tableau Cloud. Building a new X connector on it today would be building on a framework its owner has scheduled for removal.

The REST API Connector is close, but not a fit for search. Tableau recommends migrating to its REST API Connector on Tableau Exchange (built by Tableau, version 1.0.1 at the time of writing). It fetches JSON or CSV over HTTP GET, supports custom HTTP headers (so an X-API-Key header is possible), runs on Tableau 2023.3 and later, needs a JDBC driver installed, and is extract-only. Its listing names pagination as offset/limit. X search results do not page that way: each response carries a next_cursor you pass back to get the next 20 posts. A single-page pull would work; a full day of a busy query would not.

Commercial drivers exist. Several data-integration vendors sell Tableau drivers for X data. They are an option if you would rather not run a job. This guide covers the do-it-yourself route, where the only running cost is the data itself.

02 — Section

Pick the route by Tableau product

The route depends less on the data and more on which Tableau you publish to. Tableau Public, the free edition, is the strictest: per Tableau's Public FAQ it "only supports extracted data sources, and does not support live connections to data", it refreshes Google Sheets data sources automatically every 24 hours, and "for all other data sources (for example, Excel or a CSV), automatic refresh on Tableau Public is not supported". Everything you publish there is public, and a workbook is capped at 15M rows.

Tableau productWhat it can read hereRefresh without youRoute
Tableau Publicextracts only (no live connections)Google Sheets only, every 24 hoursjob writes to a Google Sheet
Tableau DesktopCSV, Excel, .hyper, Google Sheetsno, you refreshCSV or .hyper
Tableau Server or Cloudpublished data sourcesyour own schedulejob builds .hyper; you publish it

Tableau Public: a Google Sheet. Point the job at a sheet instead of a CSV (the Google Sheets guide shows an Apps Script version that needs no server), connect to it from Tableau Public, and tick the option to keep the data in sync when you save. Tableau then pulls the sheet once a day. Because Public refreshes daily, there is no point polling X more often than that for a Public dashboard.

Tableau Desktop: CSV first, .hyper when it grows. A CSV is the fastest way to see your data; Tableau reads delimited text files directly. Move to .hyper when you want typed columns that survive a reload (booleans stay booleans, timestamps stay timestamps) or when you want to hand the extract to someone else as one file. Since Tableau 2024.3, .hyper is the only extract format; the older .tde is no longer supported, per the same FAQ.

Tableau Server or Cloud. Here the job builds the .hyper and you publish it as a data source on your own schedule. We did not run a Server or Cloud site for this guide, so the publishing step is left to your setup; the extract it receives is the same file shown below.

03 — Section

The extract schema: 17 columns, one row per post

Tableau works best with a flat, long table: one row per post, one column per attribute, no nested JSON. The API returns each post as an object with an author object, an entities object and an optional extendedEntities.media array; the job flattens the parts a dashboard uses. The last column shows how often each number was zero across the posts we pulled, which tells you which measures will look empty on a small sample.

ColumnTableau typeRead fromZero in our sample
tweet_idStringidn/a
created_at_utcDate & TimecreatedAt parsed to UTCn/a
queryStringthe search that found itn/a
author_handleStringauthor.userNamen/a
author_followersNumber (whole)author.followers0.5%
langStringlangn/a
is_replyBooleanisReplyn/a
is_quoteBooleanquoted_tweet presentn/a
has_mediaBooleanextendedEntities.median/a
has_urlBooleanentities.urlsn/a
like_countNumber (whole)likeCount37.0%
retweet_countNumber (whole)retweetCount66.6%
reply_countNumber (whole)replyCount64.7%
quote_countNumber (whole)quoteCount89.0%
view_countNumber (whole)viewCount0.0%
bookmark_countNumber (whole)bookmarkCount81.4%
textStringtextn/a

Two things stand out. First, no column came back null: every post carried a view count, a language code and an author follower count, so you do not need null handling beyond Tableau's defaults. Second, zeros dominate the secondary counts: 89.0% of posts had no quotes and 81.4% had no bookmarks. On a dashboard, those two measures are better as a total for the period than as a per-post chart.

Keep tweet_id as a string. Post IDs are 19-digit numbers, larger than a double can hold exactly. If Tableau infers them as a number, distinct counts can merge different posts. The job writes them as text and the .hyper types them as text.

Store time in UTC and convert in Tableau. createdAt is a string such as "Thu Oct 16 12:34:56 +0000 2026". Parse it once in the job, store UTC, and shift to a local time zone in a calculated field if your audience needs it.

04 — Section

The Python job: one closed day per run, deduplicated by tweet_id

The full job is in the code block at the end of this page. Its design choices matter more than its length, so here they are in order.

One UTC day per run. Each run asks for yesterday only, written into the query as since_time:<unix> until_time:<unix>. A closed day does not gain new posts, so you never re-download what you already have, and a failed run is easy to repeat for a specific date.

Follow the cursor to the end. /twitter/tweet/advanced_search returns up to 20 posts per page with has_next_page and next_cursor. The loop stops when has_next_page is false or the cursor is empty. In every window we collected, the last request returned nothing, which is billed at the 15-credit minimum ($0.00015); the cost math below counts it.

Deduplicate across queries. A post can match several queries: #datafam and the keyword search overlapped. In our week, 689 rows from six queries held 598 unique posts, so 91 rows (13.2%) would have been double-counted without a tweet_id check. The job keeps the first query that matched; if you need every query a post matched, write a second, narrow table (tweet_id, query) and relate it in Tableau.

Counts are a snapshot. Likes and views keep growing after a post is published. A row written the next day captures the post's first day or so. If you need settled numbers, re-fetch posts a week later by ID with /twitter/tweets (comma-separated tweet_ids) and overwrite the counts; each post returned costs the same 15 credits.

Fixed pacing. The loop waits one second between pages and five seconds after a 429. Before your first payment the key is limited to 0.2 requests per second; once paid it is 20 per second, so a daily job of a few dozen requests finishes in seconds either way.

05 — Section

Write the .hyper extract with tableauhyperapi (what we ran)

Tableau's Hyper API is the supported way to create .hyper files outside Tableau. Per its install page the Python package is tableauhyperapi, installed with pip, and needs Python 3.11 or newer on macOS, Windows or Linux. Our system Python was 3.9, so we created a throwaway virtual environment with Python 3.12, installed the package (version reported by pip: 0.0.27579), and ran the same flattening code over the study rows.

Result. The script created schema Extract and table x_posts with 17 typed columns, inserted 598 rows with the Inserter, and a SELECT COUNT(*) on the new file returned 598. The .hyper file was 655,360 bytes; the same rows as CSV were 526,465 bytes. At a few hundred rows the .hyper is larger, because the format reserves space in blocks; its advantage at this size is types, not size.

The code below reads the CSV the daily job writes and rebuilds the extract from it. Rebuilding (CREATE_AND_REPLACE) is simpler than appending to a .hyper and is fast at dashboard scale. The file holds one table, Extract.x_posts, so Tableau opens it as a single-table data source.

python
# pip install tableauhyperapi   (Python 3.11 or newer, per Tableau's install page)
import csv
from pathlib import Path

from tableauhyperapi import (Connection, CreateMode, HyperProcess, Inserter, SqlType,
                             TableDefinition, TableName, Telemetry)

INT_COLS = {"author_followers", "like_count", "retweet_count", "reply_count",
            "quote_count", "view_count", "bookmark_count"}
BOOL_COLS = {"is_reply", "is_quote", "has_media", "has_url"}


def sql_type(col):
    if col == "created_at_utc":
        return SqlType.timestamp()
    if col in INT_COLS:
        return SqlType.big_int()
    if col in BOOL_COLS:
        return SqlType.bool()
    return SqlType.text()


def csv_to_hyper(csv_path="x_posts.csv", hyper_path="x_posts.hyper"):
    with open(csv_path, newline="", encoding="utf-8") as f:
        reader = csv.DictReader(f)
        cols = reader.fieldnames
        rows = list(reader)
    table = TableDefinition(TableName("Extract", "x_posts"),
                            [TableDefinition.Column(c, sql_type(c)) for c in cols])

    def cast(c, v):
        if v == "":
            return None
        if c in INT_COLS:
            return int(float(v))
        if c in BOOL_COLS:
            return v == "True"
        if c == "created_at_utc":
            from datetime import datetime
            return datetime.strptime(v, "%Y-%m-%d %H:%M:%S")
        return v

    with HyperProcess(telemetry=Telemetry.DO_NOT_SEND_USAGE_DATA_TO_TABLEAU) as hyper:
        with Connection(hyper.endpoint, hyper_path, CreateMode.CREATE_AND_REPLACE) as con:
            con.catalog.create_schema("Extract")
            con.catalog.create_table(table)
            with Inserter(con, table) as ins:
                for r in rows:
                    ins.add_row([cast(c, r[c]) for c in cols])
                ins.execute()
            n = con.execute_scalar_query('SELECT COUNT(*) FROM "Extract"."x_posts"')
    print(f"{hyper_path}: {n} rows")


csv_to_hyper()
06 — Section

What a week of Tableau-topic posts looks like

Before building a dashboard, it helps to know how many rows it will hold. We ran six searches about Tableau itself over the same 7-day window: brand mentions of the @tableau account, four hashtags, and the plain keyword in English. These are the volumes a Tableau team or a Tableau community account would actually chart.

QueryPosts in 7 daysPosts per dayMedian likesDaily refresh, per month
tableau lang:en -from:tableau47367.61$0.309
#Tableau12618.07$0.085
#datafam679.64$0.048
@tableau -from:tableau192.71$0.017
#MakeoverMonday30.410$0.006
#TableauPublic10.10$0.005

Hashtags are thinner than you might expect. #TableauPublic had 1 post and #MakeoverMonday 3 in the whole week. A dashboard built on one of those will show empty days far more often than full ones; combine several queries or widen the window.

The language filter matters. 67.5% of #Tableau posts were tagged Japanese (lang = ja). Without a lang:en operator in the query, or a lang filter in Tableau, two in three posts on an English-language dashboard would be in a language its viewers may not read.

A few authors carry the small queries. In @tableau mentions, 10 accounts wrote all 19 posts; in #datafam the top 10 authors wrote 76.1% of posts; in the keyword search, with 332 distinct authors, the top 10 wrote 22.8%. A "top accounts" sheet is informative on broad queries and almost a list of names on narrow ones.

For comparison, the @tableau account's own timeline averaged 1.56 posts a day over its latest 100 posts (64.1 days), with median 11 likes and 1,997 views per post; 95.0% carried media and none were replies.

Horizontal bar chart of posts per day for six Tableau-topic X searches: keyword tableau 67.6, #Tableau 18.0, #datafam 9.6, @tableau mentions 2.7, #MakeoverMonday 0.4, #TableauPublic 0.1
Posts per day for six Tableau-topic searches over a 7-day window, with the monthly cost of a once-a-day refresh. 689 posts (598 unique), collected in 2026.
07 — Section

A dashboard layout: volume over time, top accounts, engagement

Three sheets cover the questions a social dashboard is usually asked to answer: how much was said, who said it, and what landed. Below are the fields to build and the traps our data showed.

Sheet 1, volume over time. DATETRUNC('day', [created_at_utc]) on Columns, COUNTD([tweet_id]) on Rows, query on Color. Use COUNTD rather than a row count so a post pulled twice is counted once. Our week, all queries combined and deduplicated, looked like this:

UTC dayUnique posts
Thu80
Fri52
Sat82
Sun88
Mon79
Tue110
Wed107

Sheet 2, top accounts. author_handle on Rows, COUNTD([tweet_id]) on Columns, sorted descending, with a Top N filter. Add MAX([author_followers]) as a label for context. If the dashboard is public (every Tableau Public workbook is), think before you list private individuals by handle; aggregating to follower bands is a safer public view.

Sheet 3, engagement: use the median. Engagement on X is skewed. In the keyword search, the mean post had 20.4 likes while the median had 1, and the top 1% of posts held 61.2% of all likes; one post alone reached 2,325 likes and another 80,083 views. An AVG or SUM view of that query is a chart of one or two posts. Tableau's MEDIAN aggregate works on extracts, per Tableau's aggregate function reference, so put MEDIAN([like_count]) on the sheet and keep the average as a tooltip.

Engagement rate as a ratio of sums. If you compute an engagement rate, compute it at the aggregate level: SUM(interactions) / SUM(views). A per-row rate averaged across rows gives a post with 10 views the same weight as one with 10,000. The calculated fields below are ready to paste.

text
// Day (UTC) for the volume sheet: drag to Columns as a continuous date
DATETRUNC('day', [created_at_utc])

// Posts: count rows once, even if the same post was pulled twice
COUNTD([tweet_id])

// Typical post: put this on the engagement sheet instead of SUM or AVG
MEDIAN([like_count])

// Engagement per view, computed at the aggregate level (ratio of sums, not a sum of ratios)
SUM([like_count] + [retweet_count] + [reply_count] + [quote_count]) / SUM([view_count])

// Original posts only (filter): replies and quotes counted separately
NOT [is_reply] AND NOT [is_quote]
Grouped bar chart of mean versus median likes per post: keyword tableau mean 20.4 median 1; #datafam mean 10.8 median 4; #Tableau mean 8.2 median 7; @tableau mentions mean 1.8 median 1
Mean versus median likes per post in four Tableau-topic searches with at least 10 posts. The gap is the reason to chart the median. Collected in 2026.
08 — Section

Refresh schedule and cost, next to the official X API

TwitterAPI.io bills search results at 15 credits per post returned, which is $0.15 per 1,000 posts, with a 15-credit minimum on a request that returns nothing ($0.00015). There is no per-request cap and no monthly plan required; you pay only for the data returned, from credits that never expire once purchased. New accounts that pass the automatic bot check get free starter credits (no card, one per person or network, expiring after 31 days); the current amount is on the pricing page.

Using the measured volumes, here is what refreshing all six queries costs a month at three schedules. The post count is the same at every schedule (a post is fetched once); what grows is the number of runs, and each run of each query ends with one empty request.

Refresh schedule (all six queries)Runs per dayClosing empty requests per dayPer month
Once a day16$0.47
Every 6 hours424$0.55
Every hour24144$1.09

Match the schedule to the product. Tableau Public reads a Google Sheet once every 24 hours, so a daily job is the natural fit and costs about $0.47 a month for these six queries. Desktop or Server dashboards that people check during the day can justify every 6 hours ($0.55). Hourly ($1.09) only makes sense when someone looks at the dashboard hourly.

Next to the official X API. The official X API's pay-per-usage rate card on docs.x.com lists $0.005 per post read and $0.010 per user read, capped at 3 million post reads per monthly billing cycle, with Enterprise above that (and $20 of credits for saving a first card, plus a match of the first auto-recharge up to $50). At $5.00 per 1,000 posts versus $0.15, that is about 33x per post. For the roughly 2,563 unique posts these six queries return in a month, the post reads alone come to about $12.81 on the official rate card and $0.38 here, before the empty-request minimum.

Scaling up. A busier query, a brand with thousands of daily mentions, scales linearly: 10,000 posts a day is $1.50 a day either way you schedule it. At that size, keep the .hyper route and partition the CSV by month so each rebuild stays quick.

09 — Section

How we collected this

Question. What does a Tableau dashboard of X posts actually contain once a Python job pulls the data into an extract: daily volume, author concentration, engagement skew, empty columns, file size, and the cost of each refresh schedule?

Queries and accounts. Six searches on /twitter/tweet/advanced_search with queryType=Latest: @tableau -from:tableau, #TableauPublic, #MakeoverMonday, #Tableau, #datafam, and tableau lang:en -from:tableau (the last split into seven 1-day windows). Plus the latest 100 posts of the @tableau organization account from /twitter/user/last_tweets. The first three searches were planned; after they returned 23 posts for the week, the other three were added before any analysis, and the protocol file records that change.

Window and size. One fixed 7-day window, written into each query as since_time and until_time, collected in 2026. 689 search rows (598 unique posts) plus 100 timeline posts, from 62 requests costing about $0.12. No query hit its page cap.

Extract. The unique rows were flattened to the 17-column schema above and written to CSV and to .hyper with tableauhyperapi in a temporary Python 3.12 virtual environment. Tableau itself was not run: what Tableau does with the file is per Tableau's docs.

What the sample cannot show. One week is one week: launches, conferences or a viral post would change every number. Like and view counts are a snapshot at collection time and keep growing. Searches return what X search returns, which is not every post ever written. Volumes for other brands or topics will differ, so run the job for a day before you size anything.

Privacy. Aggregates only. Search results include posts by private individuals, so raw search pages were kept out of the repository; the committed sample is de-identified (no IDs, URLs, text or handles). Only the @tableau organization timeline is stored raw. Study files: data/studies/twitter-api-tableau/.

python
"""Pull X (Twitter) posts into a file Tableau can read: CSV (any edition) and, optionally, .hyper.

Run it once a day (cron, Task Scheduler, GitHub Actions). Each run pulls yesterday's UTC day for
every query, appends new rows to x_posts.csv (deduplicated by tweet_id) and rebuilds x_posts.hyper.
"""
import csv
import os
import time
from datetime import datetime, timedelta, timezone
from pathlib import Path

import requests

BASE = "https://api.twitterapi.io"
KEY = os.environ["TWITTERAPI_IO_KEY"]           # from your dashboard; never commit it
QUERIES = ["@tableau -from:tableau", "#datafam", "tableau lang:en -from:tableau"]
CSV_PATH = Path("x_posts.csv")
FMT = "%a %b %d %H:%M:%S %z %Y"                # createdAt, e.g. "Thu Oct 16 12:34:56 +0000 2026"
COLUMNS = ["tweet_id", "created_at_utc", "query", "author_handle", "author_followers", "lang",
           "is_reply", "is_quote", "has_media", "has_url", "like_count", "retweet_count",
           "reply_count", "quote_count", "view_count", "bookmark_count", "text"]


def search_day(query, day_start):
    """Every page of one Latest search for a single UTC day [day_start, day_start + 1 day)."""
    since, until = int(day_start.timestamp()), int((day_start + timedelta(days=1)).timestamp())
    q = f"{query} since_time:{since} until_time:{until}"
    cursor, posts = "", []
    while True:
        r = requests.get(
            f"{BASE}/twitter/tweet/advanced_search",
            headers={"X-API-Key": KEY},
            params={"query": q, "queryType": "Latest", "cursor": cursor},
            timeout=60,
        )
        if r.status_code == 429:                # rate limited: wait a fixed 5 s and retry the same page
            time.sleep(5)
            continue
        r.raise_for_status()
        body = r.json()
        posts.extend(body.get("tweets") or [])
        cursor = body.get("next_cursor") or ""
        if not body.get("has_next_page") or not cursor:
            return posts
        time.sleep(1)                           # fixed pacing between pages


def to_row(t, query):
    a = t.get("author") or {}
    media = (t.get("extendedEntities") or {}).get("media") or []
    urls = (t.get("entities") or {}).get("urls") or []
    created = datetime.strptime(t["createdAt"], FMT).astimezone(timezone.utc)
    return {
        "tweet_id": t["id"],
        "created_at_utc": created.strftime("%Y-%m-%d %H:%M:%S"),
        "query": query,
        "author_handle": a.get("userName"),
        "author_followers": a.get("followers"),
        "lang": t.get("lang"),
        "is_reply": bool(t.get("isReply")),
        "is_quote": bool(t.get("quoted_tweet")),
        "has_media": bool(media),
        "has_url": bool(urls),
        "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,
        "text": (t.get("text") or "").replace("\r", " ").replace("\n", " "),
    }


def main():
    seen = set()
    if CSV_PATH.exists():
        with CSV_PATH.open(newline="", encoding="utf-8") as f:
            seen = {row["tweet_id"] for row in csv.DictReader(f)}
    today = datetime.now(timezone.utc).replace(hour=0, minute=0, second=0, microsecond=0)
    yesterday = today - timedelta(days=1)       # a closed day: its counts will not grow further
    new_rows = []
    for query in QUERIES:
        for t in search_day(query, yesterday):
            if t["id"] not in seen:             # one post can match several queries: keep the first
                seen.add(t["id"])
                new_rows.append(to_row(t, query))
    write_header = not CSV_PATH.exists()
    with CSV_PATH.open("a", newline="", encoding="utf-8") as f:
        w = csv.DictWriter(f, fieldnames=COLUMNS)
        if write_header:
            w.writeheader()
        w.writerows(new_rows)
    print(f"{len(new_rows)} new rows, {len(seen)} total, about ${len(new_rows) * 0.00015:.4f} for the posts")


if __name__ == "__main__":
    main()

Researching this?Free starter credits cover end-to-end testing — Google sign-in, no card. Get a key.

10 — Questions

Questions readers ask

Can Tableau connect to Twitter (X) directly?

Not with a built-in connector: Tableau's connector lists have no Twitter or X entry. The web data connector frameworks people used for Twitter are retired (WDC 2.0) or deprecated (WDC 3.0, removed with Tableau 26.3), per Tableau's docs. The reliable route is a scheduled job that writes a CSV, a Google Sheet or a .hyper extract that Tableau reads.

How do I get Twitter data into Tableau Public?

Write the posts into a Google Sheet and connect Tableau Public to it. Per Tableau's Public FAQ, Tableau Public supports only extracts, refreshes Google Sheets sources automatically every 24 hours, and does not refresh Excel or CSV sources. Remember that everything published to Tableau Public is public.

Can I use Tableau's REST API Connector with an X data API?

Partly. Tableau's REST API Connector (Tableau 2023.3 and later) fetches JSON over HTTP GET and supports custom headers, so an X-API-Key header works. Its listing names offset/limit pagination, while X search results page with a next_cursor value, so it suits single-page pulls rather than a full day of results. It is also extract-only and needs a JDBC driver.

What is a .hyper file and how do I create one in Python?

A .hyper file is Tableau's extract format, and since Tableau 2024.3 the only one Desktop supports. Install Tableau's tableauhyperapi package (Python 3.11 or newer), define a table with TableDefinition, and insert rows with Inserter or COPY from CSV. We did this for 598 posts and read the row count back from the file.

How much does it cost to keep a Tableau Twitter dashboard updated?

It depends on how many posts your queries return. Six Tableau-topic searches returned 598 unique posts in a week; refreshing all six once a day costs about $0.47 a month at $0.15 per 1,000 posts, and hourly about $1.09, because each run ends with a minimum-charge empty request.

Should a Tableau Twitter dashboard use SUM or AVG for likes?

Neither as the headline. Engagement is heavily skewed: in our keyword sample the mean post had 20.4 likes and the median 1, with the top 1% of posts holding 61.2% of likes. Use MEDIAN, which Tableau supports on extracts, and compute engagement rate as a ratio of sums.

Do I need an X developer account to build this?

No. The job reads public posts through TwitterAPI.io with an API key in the X-API-Key header; no X account and no X developer app are needed for reads. If you prefer the official X API, the same job works with its endpoints and its own pay-per-usage prices.

11 — Further reading

Continue

Sources & further reading
More from this series

Writing about something you built with TwitterAPI.io? Our community rewards program pays API credits for honest tutorials, build logs and videos.

Build it

Stop reading. Start building.

Starter credits cover real testing on real data. Google sign-in, no card, no application queue.

Get an API key

Already building with TwitterAPI.io? Publish an honest tutorial or build log about it and earn up to $200 a month in API credits.