Data to AI™ / Gemini/X Ads

Query X Ads from Gemini CLI and Code Assist

Pull X Ads data into scripts, notebooks and pull requests from the terminal, so naming mistakes and broken conversion tracking show up before a release, not in next month's report.

Better answers, fewer tokens.

  • Lower AI costs for the same work
  • More accurate, reliable answers
  • Read-only
  • Uses the X Ads data you already sync
  • SOC 2 Type II certified
Gemini CLI
Connected to Dataddo

Which X Ads campaigns got the cheapest link clicks last week?

Gemini Answer · X Ads

Spring Webinar Promo had the cheapest link clicks at $0.41 each, on less than a quarter of the spend. Brand Awareness Q2 took the most budget but cost $1.12 per URL click.

Campaign NameSpendURL ClicksImpressions
Spring Webinar Promo Campaign Analytics $1,2303,000184,500
Product Launch Retarget Campaign Analytics $2,0503,420142,800
Brand Awareness Q2 Campaign Analytics $4,4804,000611,200

Spend is Billed Charge Local Micro divided by 1,000,000, in the ad account's currency, for placements on X itself.

source
X Ads · as of Mon 06:40 UTC
covers
Last 7 days
Example answer · fictional account and figures
X Ads in Gemini

Questions Gemini can answer from your X Ads data

X Ads (formerly Twitter Ads) extracts paid and organic performance from an X ads account: campaign spend and engagement, promoted post results with web conversions and video completion, post text, and campaign budgets and status.

Conversion tracking check after a site release

Ask Gemini

Using the dataddo server, list each Tweet Id in Promoted Tweets for the last 7 days with Clicks above 0 but Conversion Site Visits Order Quantity at 0.

A developer who changed the landing page template runs this the next day. An empty list means site visits are still attributed; any rows go straight into the bug ticket.

Campaign naming lint

Ask Gemini

Read Name from Campaigns and check each one against the pattern in config/naming.yml. Write the names that do not match to reports/x-ads-naming.md.

A marketing ops engineer runs the check in Gemini Code Assist before merging a reporting change, so campaigns with broken names do not fall out of the dashboards.

Sign-up value into a notebook

Ask Gemini

Query Promoted Tweets for the last 7 days and save Tweet Id, Spend, Conversion Sign Ups Order Quantity and Conversion Sign Ups Sale Amount to data/x-signups.parquet.

A growth analyst loads the file in a notebook next to the repo, joins it with Full text from Promoted Tweets Metadata and models cost per sign-up by message.

X Ads datasets and the questions they answer in Gemini →
Pricing

Priced per seat.

Data to AI™ is priced per seat, like the AI assistants your team already uses, with ~25% off on annual billing. Need tailored contracts or volume pricing? Talk to us about Enterprise.

Data to AITM

Serve governed business data to Claude, ChatGPT and other AI tools over MCP.

$10.49/month

per seat

3 seats minimum

Enterprise

Flexibly deploy Dataddo in any cloud or hybrid environment.

Custom

We have a payment model that works for you

See all plans and features →
Setup

Connect X Ads to Gemini step by step

  1. 1
    Connect Gemini to Dataddo Add the Dataddo server to settings.json in Gemini CLI, restart it and run /mcp auth dataddo to sign in. Gemini Code Assist in VS Code reads the same file.
  2. 2
    Connect X Ads to Dataddo Sign in with your X Ads account in Dataddo and choose the datasets to sync, such as Campaign Analytics and Promoted Tweets.
  3. 3
    Choose what Gemini can see Select the X Ads data Gemini may query. Access is read-only, and data you don't select stays out of reach.
Gemini setup guide →
With vs. without

X Ads in Gemini, with and without Dataddo

Without Dataddo With Dataddo Outcome for you
Ad data in code Every script needs its own X Ads API client, signed requests and a batch limit of 20 entity IDs per stats call. Gemini CLI queries the extracted datasets by entity and field name through one MCP server, with no X API code in the repo. Checks without API plumbing
Snapshots before data expires A forgotten pull means the week is gone, because the X API only allows extraction up to 7 days back. The flow extracts on schedule, and a script in the repo can ask Gemini to write a dated CSV after each run. Weekly files kept in Git
Control over each call A script with stored X credentials can call any endpoint, and nobody reviews what it requested. Gemini CLI asks you to confirm each Dataddo tool call, and you decide per tool whether to choose Always allow. Every lookup visible
Token consumption Gemini spends tokens exploring raw X Ads columns, sampling rows and retrying until it understands the data. Field definitions and relations are supplied up front, so the model skips the exploration and goes straight to the answer. Fewer tokens per answer
Answer quality Prone to wrong joins, invented fields and numbers that are hard to check. Answers grounded in defined fields. In the Dataddo benchmark, 78.5% of questions were answered correctly, against 65.5% with plain CSV files. Better answers
Datasets

X Ads datasets and the questions they answer in Gemini

The X Ads datasets marketing teams use most, with their real field names. Gemini queries them by name through the Dataddo semantic layer.

Dataset Metrics and attributes Ask Gemini
Campaign Analytics
  • Date Start
  • Spend
  • Clicks
  • URL Clicks
  • Campaign Name
  • + others
Which campaigns had Spend but no URL Clicks on a given Date Start?
Promoted Tweets
  • Tweet Id
  • Billed Engagements
  • Spend
  • Conversion Purchases Sale Amount
  • Conversion Site Visits Order Quantity
  • + others
What did we pay per Billed Engagements on each promoted post by Tweet Id this week?
Promoted Tweets Metadata
  • Tweet type
  • Tweet ID
  • Full text
  • Tweet language
  • Created at
  • + others
How is our promoted content split by Tweet type?
Campaigns
  • Entity Status
  • Effective Status
  • Name
  • Daily Budget Amount Local Micro
  • Start Time
  • + others
Which campaigns show an Effective Status that differs from their Entity Status?
Organic Tweets
  • Likes
  • Tweet Id
  • Full Text
  • Impressions
  • Engagements
  • + others
Which organic posts earned more Likes than our best promoted post?
Account Analytics
  • Account ID
  • Engagements
  • Date Start
  • Impressions
  • Follows
  • + others
Which ad Account ID had the highest Engagements in the last 7 days?
See all X Ads datasets, metrics and attributes on the connector page →
Benchmark

More right answers. Half the confident mistakes.

We asked 43 pre-registered questions of three real datasets - Google Search Console, HubSpot deals and Google Ads - and delivered the same rows to the same model in four ways. Only the data layer changed.

78.5%

of questions answered correctly - the best of the four delivery methods tested

2x

fewer confidently wrong answers - 14.0% of runs against 24.0% and 26.3%

2.8x

more correct answers on messy CRM data - better on 8 questions, worse on none

Answered correctly All 43 questions - higher is better
Wrong, but stated as fact Share of runs - lower is better

Same model, prompts and rows in every condition; 759 graded runs, ground truth frozen before any run. On Google Search Console alone, documented CSV files did as well as Data to AI™ - the advantage comes from messier data such as HubSpot deals.

Read the benchmark →
FAQ

X Ads and Gemini: FAQ

How do I connect X Ads to Gemini?

Extract X Ads datasets such as Promoted Tweets and Campaigns in Dataddo and attach them to a Google Gemini destination or AI Model. Add Dataddo under mcpServers in ~/.gemini/settings.json with httpUrl https://headless.dataddo.com/mcp-data, restart Gemini CLI, run /mcp auth dataddo and sign in.

Does Gemini have a built-in X Ads connection?

No. Dataddo extracts the X Ads datasets into a flow, and Gemini CLI reads that flow through the Dataddo MCP server. The setup is the same as for any other Dataddo source.

Gemini CLI does not list the Dataddo server. What should I check?

Use the httpUrl key, not url, because url falls back to SSE, which Dataddo does not support. Leave out headers and oauth blocks, restart Gemini CLI and check /mcp.

Can I use the X Ads data in IntelliJ?

Yes, through Gemini Code Assist. In IntelliJ it uses its own mcp.json, so add the Dataddo server there. Agent mode in VS Code reads the same settings.json as Gemini CLI.

Which data can Gemini reach after I sign in?

Every flow or Context attached to an AI destination or AI Model in your Dataddo account, not only the Google Gemini ones. Keep Twitter Ads accounts out of AI destinations if Gemini should not see them.

What happens when my Gemini CLI session expires?

Credentials are stored in ~/.gemini/mcp-oauth-tokens.json and renewed automatically. If a session expires or is revoked, run /mcp auth dataddo again and sign in.

Can Gemini CLI change X Ads campaigns?

No. Gemini queries extracted data through the semantic layer by entity and field name. Dataddo never accepts SQL from the model, and nothing is written back to X.

New from Dataddo · Data to AI™

Ask Claude or ChatGPT about your ads, analytics and CRM

“What did a new lead cost us last week, by paid channel?”

Connect 400+ sources once and get the answer right in your AI chat, without building a report. Better answers: your metrics are defined once, so the AI doesn't have to guess.