Connector

Read X Ads data in AWS Athena

Load X Ads, formerly Twitter Ads, into Athena tables with OWOX Data Marts: campaigns, line items, promoted tweets and daily performance, refreshed on a schedule. Query each promoted post beside its cost, then join it with web analytics and CRM.

X AdsConnectedAccountsAd PerformanceAd Performance b…All Cards
Data MartPublishedone definition
AWS AthenaDateClicksImpre…Daily 09:00
Refreshed on a schedule. No exports, no copy-paste.

Get Started Free

Endpoints

S00 · Why

Why query X Ads with your web analytics and CRM in Athena

On X, an ad is a post. X Ads reports its impressions, engagements and the amount billed, but not what the visitors it sent were worth. To see that, the promoted post, its cost, website touch points and CRM deals have to be tables in one data warehouse where an Athena query can join them.

  • Read the promoted post's text and counts beside what it cost
  • Compare X with LinkedIn, Facebook and Google in one spend table
  • Query link clicks against the visits and deals that followed
X AdsPromoted post spend
Web analyticsVisits, sign-ups
CRMDeals
Your data warehouseAWS AthenaPromoted po…Touch pointDealJoined by idPost promotedDeal months laterOne Athena query links the ad to the deal.

S01 · Step 1

Step 1: Connect X Ads and pick the fields

Create a Data Mart on your Athena data storage and choose X Ads as the data source. Enter your developer app keys and tokens and the Account ID, and tick only the fields you need.

  • 10 endpoints and 187 fields to choose from
  • Ad Performance has 20 fields: impressions, clicks, billed charge, engagements, follows, likes
  • Several account ids can load into one Data Mart
New Data MartChoose a sourceLinkedIn AdsX AdsReddit AdsAuthorizeConnectedEndpointAd PerformanceAccountsAd Performance by…All Cards
Ad Performance20 fieldsdateplacementimpressionsclicksbilled_engagementsbilled_charge_local_micro

S02 · Step 2

Step 2: Load X Ads into an Athena database and table

Choose the Athena database and table, or keep the pre-filled ones. Run it and the first load, from the start of the previous month through today, lands in your own AWS account.

  • Performance goes to a table such as x_ads_stats
  • The billed amount is in micros of local currency (billed_charge_local_micro); convert it once in your model
  • Query results go to the S3 output bucket you set up for Athena
DestinationAWS AthenaDatabasex_adsTablestatsRun
Run HistoryPendingRunningSuccessIncremental load
Tablex_ads.stats

S03 · Step 3

Step 3: Know every column before you write the query

Once the first run finishes, the output schema lists every field with a plain-words description, not an API identifier. Your data quality checks can read it too.

  • placement tells ALL_ON_TWITTER from PUBLISHER_NETWORK
  • Anyone on the team can read the table
x_ads.statsOutput schemaFieldDescriptiondateThe date for which the…placementThe placement type (ALL_ON_TWITT…impressionsNumber of impressions.clicksNumber of clicks.billed_engagementsNumber of billed engagements.billed_charge_local_microBilled amount in micros.

S04 · Step 4

Step 4: Connect the X Ads tables in Athena

Line items, promoted tweets and tweets are separate Athena tables, joined by ids. Join them and they form one X Ads data model.

  • A promoted tweet's tweet_id finds the post's full_text and counts in Tweets
  • Campaigns, accounts and cards load as tables of their own
Line Itemsidnamecampaign_id
Tweetstweet_idfull_textretweet_count
Promoted Tweetsidline_item_idtweet_id

S05 · Step 5

Step 5: Schedule the Athena load and backfill history

Set it up once. A scheduled refresh keeps the Athena tables current, and a manual backfill brings in any period you missed.

  • Add a run trigger once; a lookback window, 2 days by default, reloads recent days
  • Backfill a custom start and end date
ScheduleRun on a scheduleDaily 09:00
BackfillRun backfill
Run HistoryDaily scheduleManual backfillDaily schedule

S06 · Step 6

Step 6: Use the same Athena tables in every tool

The same tables feed your data model, spreadsheets, dashboards, AI assistants like Claude and ChatGPT, and scheduled AI insights in Slack or email.

  • See which promoted posts earned their cost
  • All reports read the same Athena tables
X AdsData MartPublished
Your data model
Google Sheets
Data Studio dashboards
Claude, ChatGPT
Slack, email

Recent updates

Why OWOX

Why OWOX for X Ads in AWS Athena

Hand-built Ads API scripts, a generic ETL tool or manual exports each get X data out. OWOX also lands it in your AWS account, readable and ready to model.

  • You own the data. It lands in your own AWS account, in tables you control.
  • The post and its cost together. Promoted tweets load next to the tweets themselves, with text and engagement counts you can join to spend.
  • Ready for a data model. Separate Athena tables joined by line item and tweet ids, built to connect to web analytics and CRM.
  • Maintained for you. No API scripts for you to patch when X changes its Ads API.
  • Free to self-host. The open-source OWOX Data Marts runs in your own infrastructure, with Athena as its data storage.

Book a callGet Started Free

Trust

The Data Partner You Can Trust

users

176K Source: Internal OWOX data as of 2026-10-02

Executives and data analysts across 20+ industries

G2 rating

4.9★2

“A trusted data analytics partner” — verified review

npm installs

165K3

In Open Source We Trust

Customers