Collect X Ads data in Snowflake
Load X Ads, formerly Twitter Ads, into Snowflake tables with OWOX Data Marts: campaigns, line items, promoted tweets and daily performance on a schedule. See each promoted post with its engagement counts, then join to web analytics and CRM.
SnowflakeDateClicksImpre…Daily 09:00X Ads spend never sits in the same query as your other paid channels, so it's judged on engagement alone.
Paste this into your AI assistant. It loads X Ads into Snowflake tables with OWOX Data Marts and lines billed spend up with your other paid channels by date, so X is judged on cost per lead.
The prompt
Read https://www.owox.com/ai-agent-setup.md and follow it to set up OWOX Data Marts for me, starting from /connectors/free-x-ads-connector-to-snowflake.md. The task: load X Ads into Snowflake and give me weekly billed spend, clicks and leads for X next to my other paid channels in one table, with cost per lead for each. Tag the links you give me with utm_campaign=ai-task and utm_term=m4. Use what you know about my context and goals
X Ads Endpoints
10 X Ads endpoints you can import. Each lands in its own table in your data warehouse.
Accounts
Advertising accounts — name, business, country, timezone, and approval status.
12 fieldsAd Performance
Daily ad performance by placement — impressions, clicks, spend, engagements, and social actions.
20 fieldsTime seriesAd Performance by Country
Daily ad performance broken down by country — impressions, clicks, spend, engagements, and social actions.
21 fieldsTime seriesAll Cards
All card types with full creative details — type, title, destination URL, call to action, and media.
30 fieldsCampaigns
Your campaigns — status, budget optimization, daily and total budget, and currency.
19 fieldsCards
Website and app cards — type, URI, and components.
8 fieldsLine Items
Line items within campaigns — bid strategy, goal, product type, budget, and schedule.
33 fieldsPromoted Tweets
Tweets promoted as ads — status, approval, and links to their tweets and line items.
8 fieldsTargeting Locations
Reference table of location IDs with names and country codes — join targeting_value with the country field in Ad Performance by Country.
4 fieldsTweets
Original tweets used as ad creatives — text, type, language, engagement counts, and card URI.
34 fields
Why X Ads belongs next to your CRM in Snowflake
On X an ad is a post. X Ads reports impressions, engagements and the amount billed, but not what the visitors it sent were worth. Put promoted posts, ad performance, website touch points and CRM deals in one warehouse as tables and SQL can start to answer that.
- Read each promoted post's text and counts in one place
- Compare X with LinkedIn, Facebook and Google in one spend query
- Follow link clicks to the visits and deals after them
Your data warehousePromoted po…VisitDealJoined by idPost promotedDeal months laterA SQL join links the post to the deal.Step 1: Connect X Ads and choose the fields
Create a Data Mart on Snowflake and choose X Ads as the source. Enter your developer app keys, tokens and Account ID, then select the fields.
- 10 endpoints and 187 fields are available
- Ad Performance has 20 fields: impressions, clicks, billed charge, engagements, follows and likes
- Several account ids can feed one Data Mart
Step 2: Load X Ads into a Snowflake table
Review the pre-filled Snowflake database, schema and table. The first run loads the previous month through today.
- Performance goes to its own table, such as the stats table
- billed_charge_local_micro is local currency in micros, so convert it once in a view
DestinationDatabaseSchemax_adsTablestatsRun
Tablex_ads.statsStep 3: Read the output schema in plain words
The output schema gives each column a plain description. Your quality checks can read it too.
- placement separates ALL_ON_TWITTER from PUBLISHER_NETWORK delivery
- A colleague can read it without the API docs
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.Step 4: Join the X Ads tables in SQL
Line items, promoted tweets and tweets are separate Snowflake tables that share ids, and they join into one X Ads model.
- Look up a promoted tweet's tweet_id in Tweets for the post's full_text and counts
- Campaigns, accounts and cards each load as their own table
Step 5: Schedule the load and backfill history
Add a run trigger once and a scheduled refresh keeps the Snowflake tables up to date. A manual run takes older dates.
- A lookback window, 2 days by default, reloads recent days
- Backfill any start and end date
Step 6: Use the same Snowflake tables in every report
, , assistants such as Claude and ChatGPT, AI insights in Slack or email and your model all read the same tables.
- Review promoted posts by their engagement counts
- One set of tables behind every report
- 0.45.0Know what a backfill loads when a connector has no date fields
- 0.44.0Connector Data Marts set up through MCP no longer fail their first run because of the table path
- 0.44.0Backfill a catalog for any period in one run, and follow a long backfill as parts of one operation
- 0.41.0Rotating a warehouse key is one change: Storages share reusable Credentials
- 0.41.0Shared SQL logic stays in one place: build a Data Mart on top of another
Why OWOX for X Ads in Snowflake
Ads API scripts and manual exports pull the X numbers out. OWOX leaves them as Snowflake tables that you own and can model.
- In your Snowflake account. You control access to the tables with your own roles.
- Post and cost together. Promoted tweets load beside the tweets themselves, with text and engagement counts.
- Ready to model. Line item and tweet ids tie promoted tweets to their line items and tweets, ready for your data model.
- Looked after for you. When X changes its Ads API, no script of yours needs repair.
- Free when self-hosted. The open-source OWOX Data Marts runs on your own infrastructure at no licence cost.
The Data Partner You Can Trust
users
166K Source: Internal OWOX data as of 2026-11-15
Executives and data analysts across 20+ industries
Customers
You are booked. The invitation is on its way to , with the calendar invite and the meeting link.