All resources

Free X Ads (Twitter Ads) to BigQuery Connector by OWOX: Automate Your Campaign Reporting Workflow

Running ads on X (formerly Twitter) is easy. Getting clean, structured campaign data from X Ads to BigQuery? Not so much.

If you’ve ever tried exporting X (Twitter) to Google BigQuery for analysis, you know the pain: manual CSV exports, rate limits, incomplete fields, and clunky integrations.

We believe it shouldn’t be this hard.

Dashboard showing Facebook Ads data flowing into BigQuery storage and exporting to Google Sheets, Looker Studio, Excel, Tableau, and Power BI. i-shadow

With this free, no-code Twitter to BigQuery connector from OWOX Data Marts, you can automatically import and refresh raw performance data in minutes, not hours. And best of all? You keep full control and visibility into every metric, with the freedom to build your own BigQuery to Twitter reporting workflows.

Note: Twitter Ads has been rebranded to X Ads following the platform's name change in 2023. In this article, we use both terms interchangeably to help you familiarize yourself with either name.

Why We Made This Free Connector

At OWOX, we believe businesses shouldn’t have to rent access to their own data. That’s why we built this Twitter Ads to BigQuery connector – and made it 100% free. No upgrades, no hidden fees, no locked features.

Driven by our mission to make data ownership simple and accessible, we want marketers and analysts to move away from black-box tools. You deserve transparency, flexibility, and control – and this X (Twitter) to BigQuery connector gives you just that.

Whether you're a performance marketer, a startup founder, or a data analyst tired of repetitive workarounds, this tool helps you reclaim full access and control over your advertising data.

Join the Open-Source Movement

We’re not just releasing a free connector – we’re inviting you to help shape the future of data and marketing analytics tools.
At OWOX, we believe that data access and transparency should be a right, not a luxury. That’s why this connector is 100% open-source – giving you full control over how it works, what it does, and how far it can go.

If you like what we do, please ⭐ star our GitHub repo to show your support – it helps us reach more analysts and grow the number of available connectors.

Also, feel free to:

  • Explore the code and customize it to fit your needs.
  • Contribute to this data connectivity ecosystem: suggest new connectors, pull new connectors, and/or provide documentation to support the wider community.
  • Join our community & share your feedback.

We’ve built the core, the foundation – now it’s your turn to take it further. 

Why Bring Twitter Ads Data into BigQuery?

Twitter Ads Manager (X Ads) is great for launching campaigns, but falls short when it comes to custom reporting, large-scale data processing, or joining datasets across platforms.

❌ Reporting metrics are locked into pre-set views
CSV exports expire quickly and don’t scale
No built-in way to connect with CRM, or cost data systems

That’s why this free Twitter Ads to BigQuery connector exists.

Send raw campaign and performance data from X (Twitter) to Google BigQuery
Combine it with other datasets to build end-to-end marketing analysis
✅ Structure your own attribution models, LTV analysis, and custom ROAS logic

With full control over schema, filters, and refresh logic in BigQuery, digital analysts and marketing teams get exactly the data they need, without compromise. 

Discover more free connectors:
Liking the freedom of custom reports? Take it further with these plug-and-play integrations:

Twitter Ads → Google Sheets

Facebook Ads → BigQuery

TikTok Ads → BigQuery

LinkedIn Ads → BigQuery

No fees, no code—only faster, smarter reporting across every ad channel.
X Ads (Twitter Ads) Connector to Google BigQuery

Why Choose OWOX Free Connector for X (Twitter) Ads to BigQuery

For analysts managing Twitter (X) Ads at scale, OWOX offers a connector built on OWOX Data Marts that’s fully transparent and designed for control, not constraints.

  • Zero-cost and open-source: Unlike usage-priced tools, this connector is available free on GitHub as part of OWOX Data Marts. You can review, customize, and run it on your own terms.

  • Direct BigQuery write: Data flows straight from the TikTok Ads API into your BigQuery project – no CSVs, no staging layers, and no 3rd-party services in between.

  • Schema flexibility: Define your destination table schema, set up field aliases for clarity, and adapt the structure to match your reporting needs.

  • Refresh control: Automate data loads using scheduled jobs and keep your dataset updated when you need it – whether you want to append new rows or overwrite existing tables.

How the Connector Works

Built for modern data stacks, this connector puts your team in charge of how Twitter Ads data lands in BigQuery, enabling better joins, modeling, and analysis. 

This Twitter Ads to BigQuery connector from OWOX Data Marts delivers what most tools don’t – full control without the complexity.

The Twitter to BigQuery integration is built on an open-source framework you run yourself — no third-party platforms, no vendor lock-in, and no hidden limits.

Here’s how it works:

  • Connects directly to the X Ads (formerly Twitter Ads) API and sends structured data into your BigQuery project.
  • Supports custom selections of fields, metrics, dimensions, and time ranges, including control over data aggregation and time zones.
  • Data lands directly in your BigQuery tables, ready for querying, blending, and modeling.

Whether you're managing in-house analytics, building marketing dashboards, or powering campaign insights with SQL, this Twitter to Google BigQuery connector helps you:

  • Skip the vendor lock-in and API complexity
  • Automate data collection from X Ads at scale
  • Enable clean, flexible reporting in BigQuery

💡Check out this video for a step-by-step guide on setting up the OWOX Twitter (X) Ads to BigQuery connector. It walks you through authorization, configuration, and scheduling, perfect if you prefer a visual walkthrough.

Step-by-Step Guide: Import Twitter Ads Data to BigQuery with the OWOX Data Marts 

Set up a fully self-managed, SaaS-free pipeline to import Twitter Ads data directly into BigQuery using the OWOX Data Mart and a local server.

Step 1: Install Node.js and OWOX CLI ( ~2 min)

To run OWOX Data Mart locally, you’ll need to install Node.js and the OWOX CLI. This setup allows you to start a local server and work with the OWOX Data Mart effectively.

To get started, install the LTS version of Node.js from nodejs.org and use a version manager like nvm or nvm-windows to avoid permission issues. Once Node.js is set up, you can install the OWOX CLI globally and run ‘owox serve’ to launch the local server. 

💡 For detailed setup instructions and troubleshooting, check the official documentation.

Step 2: Connect Google BigQuery and Set Up Your Data Mart ( ~3 min)

Set up BigQuery as your destination and link it to a new Twitter Ads (X Ads) data mart in OWOX.

  1. Open your browser and go to http://localhost:3000.
Local host being redirected to the home page of OWOX Data Marts. i-shadow
💡 Follow our guide, where you’ll find easy-to-follow instructions on how to configure your storage in OWOX Data Marts.

2. Create and paste your Service Account JSON Key.

Navigation panel in Google Cloud Console showing the path to access service accounts by going to IAM and then selecting the Service Accounts section. i-shadow

3. Paste it into the ‘OWOX Service Account JSON Field’

  • Don’t forget to click ‘Save’.
OWOX connector configuration labeled ‘OWOX Service Account JSON Field’ where users paste their service account key for authentication. i-shadow

4. Create your first Data Mart

  • Once storage is added, click on the Data Mart Tab, then on ‘New Data Mart’
OWOX Data Marts interface showing the main dashboard with the ‘New Data Mart’ button. i-shadow
  • Now, create the Data Mart, name the title as ‘ Twitter Data’, as the data source
  • Choose the storage named ‘Twitter Ads Storage’ you just created
  • Click ‘Create Data Mart’.
Create Data Mart screen with title set to " Twitter Data" and storage selected as "Twitter Ads Storage". i-shadow

Now we will do the Data Setup

5. Setup your Data Mart

  • Go to the Data Setup Tab and then select Connector
Input Setup section in OWOX Data Marts with 'Connector' selected as the definition type for the data source. i-shadow
  • Click on Setup Connector and Choose X Ads Connector
 Setup Connector panel in OWOX Data Marts with X Ads selected as the connector source. i-shadow

Step 3: Get X (Twitter) Ads Access Token ( ~5 minutes)

To connect your Twitter Ads account, you’ll need credentials. Here's how to generate them safely.

Prerequisites

  • An active X (Twitter) account with access to the X Developer Portal
  • A Developer App created in the X Developer Portal
  • Ads API access requested and approved through the official form
  • App permissions set to Read and write, with a valid Callback URL configured
  • Generated API credentials: API Key, API Secret, Access Token, and Access Token Secret

Steps to Obtain Credentials

  1. Visit the Twitter Developer Portal
X Developer Platform homepage. i-shadow
  • A default app is created for you automatically. 

Note:  If prompted to upgrade your account, choose the Free tier to proceed without charges.

Comparison chart of X API access tiers, Free, Basic, Pro, and Enterprise. i-shadow

  1. Request Ads API Access

You’ll need to request access to the X (Twitter) Ads API before using the connector.

X Developer Portal displaying the app details section for an app named "OWOX App," with the App ID highlighted.  i-shadow
  • In the form, describe how you’ll use the API. For example:

“We are advertisers looking to connect with the X Ads API to access campaign data for analysis and optimization. The data will be pulled via the OWOX Data Marts platform and used to support strategic decision-making across our marketing efforts.”

  • For “What level of Ads API access do you need?”, choose: Standard Ads API access. 
X Ads API request form showing fields for App ID, usage description, and selection of Standard Ads API access. i-shadow

  • After submitting, monitor your email inbox for approval. You’ll receive a confirmation once your X Ads API access is granted.
Email notification confirming Standard Ads API access approval for the submitted X Ads App ID. i-shadow
  1. Configure Your App
  • Navigate to the app’s User Authentication Settings.
  • Click Edit.
Developer Portal showing a default app under Projects & Apps.  i-shadow
  • Under App Permissions, select: Read and write.
User authentication settings in the X Developer Portal showing the selected "Read and write" app permission.  i-shadow
  • Set Callback URI to: http://localhost.
  • Leave all other fields as default.
  • Click Save.
App info configuration in the X Developer Portal with the Callback URI for OAuth setup. i-shadow
  1. Generate API Keys
    Navigate to the “Keys and Tokens” tab:
  • Click “Regenerate” under API Key and API Secret, then save both values.
    These are your Consumer Key and Consumer Secret 
Keys and tokens screen in the X Developer Portal showing options to regenerate API Key and generate Access Token.  i-shadow

  1. Get Request Token (via OAuth 1.0)

           Using a tool like Postman:

  1. Make a POST request to: https://api.twitter.com/oauth/request_token
  2. Use OAuth 1.0 in the Authorization tab:

  • Signature Method: HMAC-SHA1
  • Consumer Key 
  • Consumer Secret 
  • Callback URL: http://localhost
 Postman configuration screen for sending a request token to the X Ads API using OAuth 1.0 with consumer key, secret, and callback URL.  i-shadow
  1. Click Send.

The response will look like: 

oauth_token=E4MQKQAAAAAB1yCFAAABl2OHH80&oauth_token_secret=UlDQaqOoJHj1VvLQ8fQH6Iq686rEFww2&oauth_callback_confirmed=true
  1. From the response, copy the oauth_token  (E4MQKQAAAAAB1yCFAAABl2OHH80 )  and insert it into:
    https://api.twitter.com/oauth/authorize?oauth_token=YOUR_OAUTH_TOKEN

10. Open this URL in your browser and click Authorize App.

Authorization prompt screen asking the user to authorize the OWOX App to access and manage their X account data and campaigns.  i-shadow

11. You’ll be redirected to a new URL containing:

  • oauth_token
  • oauth_verifier
Browser error page showing "localhost refused to connect" after redirect from X Ads API authorization. i-shadow

12. Get Permanent Access Token

Back in Postman:

13. Make a POST request to: https://api.twitter.com/oauth/access_token

14. Use OAuth 1.0 with the following:

  • Consumer Key: your API Key
  • Consumer Secret:  your API Secret
  • Access Token: oauth_token
  • Access Token Secret: oauth_token_secret
  • Verifier: oauth_verifier 
  • Callback URL: http://localhost 
Postman configuration for making an access token request to the X Ads API with OAuth 1.0, including verifier and callback URL.  i-shadow

15. Click Send. 

16. You’ll get a response containing your final credentials.

  • oauth_token=1534231826281152515-kDGnM70as1fh6xoYWK9HvlwtDHHqe8&
  • oauth_token_secret=KiXVKSyHifVoVm7vq3iC7zjclE1ocqvgpouS95RuLXM61&user_id=1534231826281152213&screen_name=examplename

You now have all the required credentials:

  • Consumer Key (API Key)
  • Consumer Secret (API Secret)
  • Access Token (oauth_token)
  • Access Token Secret (oauth_token_secret)

Security Notes

  • Keep your access token and app secret secure
  • Don’t share credentials
  • For production environments, always implement secure token refresh logic 

Step 4: Configure Twitter Ads (X Ads) Connector and Run Your First Import ( ~2 min)

Now that you’ve retrieved your Twitter Ads Access token, Secret, and Keys, it’s time to configure the connector in OWOX.

  1. Add the following in their respective input box: 
    • Consumer Key (API Key)
    • Consumer Secret (API Secret)
    • Access Token
    • Access Token Secret
OWOX connector configuration panel with the Twitter Ads access token field filled in for authentication. i-shadow
  • Paste the Account ID
Account ID being pasted into the appropriate field. i-shadow

2. Start Date: 

  • Set the reporting start date (e.g., 2025-07-01). This determines how far back data will be fetched.
Connector configuration form with the Start Date field set to 2025-07-01 for fetching data from Twitter Ads. i-shadow

3. When you scroll down, you’ll see some more fields with parameters. For your first run, they are optional, and you can always come back and adjust them later.

4. Click 'Next'

5. Endpoint: Choose from the following valid endpoints::

    • X Ads Accounts – Account-level details such as account info, currency, and status.
    • X Ads Campaigns – Campaign objectives, budgets, pacing, and scheduling.
    • X Ads Line Items – Line-item settings: placements, bidding, and targeting.
    • X Ads Promoted Tweets – Tweets promoted within campaigns/line items.
    • X Ads Tweets – Organic tweet metadata available to reference in ads.
    • X Ads Stats – Performance metrics (impressions, clicks, spend, conversions) across entities.
    • X Ads Cards – Card creatives (website/app cards) and associated metadata.
    • X Ads All-Cards – Full list of available card creatives across the account.

👉Tip for first-time setup: If you’re starting out, begin with the X Ads Campaigns endpoint. It gives you the core structure of your ads—objectives, budgets, and timelines. Once that’s set, add line_items for targeting details and stats for performance metrics to build a complete picture of your X Ads campaigns in BigQuery.

Node selection menu for Twitter Ads with options like X ad-account. i-shadow

6. Select Fields for chosen node. 

  • Select all available fields or choose specific metrics based on your reporting needs.
List of available fields from Twitter Ads API to include in the connector. i-shadow

7. Name the Dataset:

  • Enter the BigQuery dataset name where the imported data should be stored.
Final setup screen showing the target dataset and table path in BigQuery with time triggers hint enabled. i-shadow

Note: If the dataset doesn't exist, OWOX will create it automatically during the import process.

8. Click Finish

9. In the Data Setup Tab, Click 'Save'.

 OWOX Data Marts configuration screen showing successful mapping between Twitter Ads and BigQuery table with a Save button. i-shadow

10. Click 'Publish Data Mart'.

OWOX Data Marts setup showing the 'Publish Data Mart ' button ready to be clicked to activate the data mart configuration. i-shadow

11. Click 'Manual Run' button or use the 3-dot menu.

OWOX Data Marts interface with the ‘Manual Run’ button visible and the 3-dot menu expanded. i-shadow

12. A configuration panel will appear to choose a Run Type. Select Backfill or Incremental Load. Then add the required start and end dates, then click Run to load the data. 

Please Note: If you are setting up this connector for the first time, you need to go with the Backfill Run Type.

Manual Run panel in OWOX Data Marts for Twitter Ads, showing start and end date selection for a backfill data load. i-shadow

13. Go to 'Run History' and confirm the message: 'Success'.

Run History tab in OWOX Data Marts displaying the status message ‘Import is finished’. i-shadow

Step 5: Schedule Automated Imports ( ~1 min)

Set up a trigger to pull data on a recurring schedule.

  1. Go to the 'Triggers' tab in the new Data Mart
  • Click 'Add Trigger'.
Triggers tab in OWOX Data Marts showing the option to add a new time trigger, with no scheduled triggers currently listed for the Twitter Data mart. i-shadow
  1. Configure:
  • Choose the Trigger Type as Connector Run and the Schedule Settings: Daily / Weekly / Monthly / Interval.
  • Set the Time (hour, minute, or second), days of the week, and choose your time zone.
Scheduled trigger setup screen in OWOX Data Marts showing trigger type and scheduling options for automating data runs. i-shadow
  1. Click 'Create Trigger'. Your data will now refresh automatically.
OWOX Data Marts time trigger setup showing schedule details and the 'Create trigger' button to automate data refresh based on the selected configuration.  i-shadow
  1. The trigger is now active and scheduled to run automatically on the defined days and at the defined time.
OWOX Data Marts trigger summary screen showing active time trigger details, including schedule, status, and upcoming run for Twitter Data. i-shadow

What’s Next?

This free X (Twitter) Ads to BigQuery connector from OWOX Data Marts brings us one step closer to making data ownership straightforward, transparent, and accessible for everyone, without costly tools or complex engineering.

Check out the additional resources below:
🔗 More free connectors – including Microsoft Ads and Reddit Ads Connector for BigQuery, so you can centralize all your paid media data in BigQuery without switching tools.
🎥 Step-by-step video tutorials – designed to walk you through setup and usage, whether you’re a beginner or a seasoned analyst.
📊 Prebuilt dashboards – so you can plug your Twitter Ads data into Google Sheets and Looker Studio, so teams get insights faster with less effort.

Explore our GitHub repo, leave us a ⭐ star, and join us in building a more open, analyst-friendly data stack.

X Ads (Twitter Ads) Connector to Google BigQuery

FAQ

What data can I import from Twitter Ads to BigQuery using this connector?
Is this Twitter to BigQuery connector really free?
Do I need coding skills to use this connector?
How often can I refresh Twitter Ads data in BigQuery?
Can I adjust the reporting date range?

You might also like

2,000 companies rely on us

Oops! Something went wrong while submitting the form...