Overview

X Ads, previously known as Twitter Ads, is a self-service advertising platform designed for advertisers to promote content, products, and services to users on the X platform. The system facilitates the creation, management, and optimization of ad campaigns with diverse objectives, including increasing followers, driving website traffic, generating leads, and promoting app installs Business.X.com Help Center. The platform leverages X's extensive user base and real-time conversation data to offer granular targeting capabilities, allowing advertisers to reach specific audiences based on demographics, interests, behaviors, and even keywords used in tweets.

Advertisers can choose from various ad formats, such as Promoted Ads (standard tweets), Follower Ads (to gain new followers), Website Cards (for direct traffic to external sites), App Install Ads, and Video Views campaigns. The auction-based bidding system allows advertisers to set budgets and bid for ad placements, with costs varying based on factors like target audience, bid amount, and ad relevance. X Ads is particularly suited for campaigns requiring immediate reach and engagement, such as promoting live events, breaking news, or trending topics, due to the real-time nature of the platform Business.X.com Best Practices.

For developers and technical buyers, X provides the X Marketing API, which enables programmatic management of ad campaigns. This API supports functions such as creating and modifying ads, managing audiences, retrieving performance metrics, and automating campaign workflows. Authentication for the API uses OAuth 2.0, adhering to industry standards for secure access X Marketing API Documentation. The API's capabilities allow for integration with custom tools, reporting dashboards, and other marketing technology stacks, offering a flexible solution for advanced advertisers and agencies.

While X Ads shares similarities with other social media advertising platforms like Meta for Business and LinkedIn Marketing Solutions in its core objective to connect advertisers with users, its real-time focus distinguishes it. For example, TikTok for Business excels in short-form video content, whereas X Ads emphasizes immediate textual and visual information dissemination TikTok Ads Overview. This makes X Ads a tool for campaigns that benefit from rapid dissemination and direct interaction within trending conversations.

Key features

  • Targeting Options: Reach audiences based on demographics, interests, behaviors, custom audiences, and keywords within tweets Business.X.com Audience Targeting.
  • Ad Formats: Support for Promoted Ads (text, image, video), Follower Ads, Website Cards, App Install Ads, and Video Views campaigns.
  • Campaign Objectives: Optimize campaigns for brand awareness, tweet engagements, follower growth, website clicks, app installs, video views, and lead generation Business.X.com Campaign Goals.
  • Auction-Based Bidding: Flexible bidding strategies including automatic bid, maximum bid, and target cost, allowing advertisers to control campaign spend.
  • Analytics and Reporting: Access to performance dashboards with metrics such as impressions, engagements, clicks, conversions, and cost per result Business.X.com Analytics Dashboard.
  • X Marketing API: Programmatic access to campaign management, audience management, and reporting data via OAuth 2.0 authentication X Marketing API Documentation.
  • Custom Audiences: Create remarketing lists from website visitors, app users, or customer lists to target specific segments.

Pricing

X Ads operates on an auction-based pricing model, where costs are variable and determined by the advertiser's bid, target audience, ad quality, and competition within the auction. There is no fixed pricing or subscription fee. Advertisers pay for performance based on various billing events such as impressions (CPM), clicks (CPC), or actions (CPA), depending on the chosen campaign objective.

As of May 2026, X Ads maintains a pay-per-performance structure without a free tier.

Pricing Model Description Billing Event Examples
Auction-based Bidding Advertisers bid for ad placements against competitors. Cost is determined by auction dynamics. Cost per impression (CPM), Cost per click (CPC), Cost per view (CPV), Cost per action (CPA)

For more detailed information on budgeting and bidding, refer to the X Ads Account Overview.

Common integrations

  • Google Analytics: Integrate tracking pixels to monitor website traffic and conversions originating from X Ads campaigns Google Analytics Support.
  • CRM Systems (e.g., Salesforce): Connect lead generation campaigns to automatically sync new leads into CRM platforms for follow-up.
  • Data Management Platforms (DMPs): Integrate with DMPs to leverage advanced audience segments for more precise targeting on X.
  • Marketing Automation Platforms: Link X Ads data with platforms like HubSpot or Marketo to create unified customer journeys and track cross-channel performance.
  • Attribution Platforms: Use third-party attribution tools (e.g., AppsFlyer, Adjust) to measure the impact of X Ads on app installs and in-app events.
  • Business Intelligence (BI) Tools: Export X Ads data via the Marketing API for analysis in BI tools like Tableau or Power BI.

Alternatives

  • Meta for Business: Offers advertising across Facebook, Instagram, Messenger, and Audience Network with extensive targeting and ad formats.
  • LinkedIn Marketing Solutions: Specializes in B2B advertising, targeting professionals based on job title, industry, and company.
  • TikTok for Business: Focuses on short-form video content, offering immersive ad experiences to a younger demographic.
  • Google Ads: Provides advertising across Google Search, Display Network, YouTube, and other properties, primarily focused on search intent and broader reach.
  • Amazon Advertising: Leverages Amazon's shopping data to target consumers with product-focused ads on Amazon and its network.

Getting started

The X Marketing API allows developers to programmatically manage ad campaigns. This Python example demonstrates how to authenticate and make a basic API call to retrieve account details.


import requests
from requests_oauthlib import OAuth2Session

# Replace with your actual credentials
CLIENT_ID = "YOUR_CLIENT_ID"
CLIENT_SECRET = "YOUR_CLIENT_SECRET"
REDIRECT_URI = "YOUR_REDIRECT_URI" # Must match the one configured in your Developer App

# OAuth 2.0 URLs
AUTHORIZATION_URL = "https://api.x.com/oauth2/authorize"
TOKEN_URL = "https://api.x.com/oauth2/token"

# Scopes required for Ad Account management
SCOPES = ["ads.read", "ads.write"]

def get_oauth_session():
    oauth = OAuth2Session(CLIENT_ID, redirect_uri=REDIRECT_URI, scope=SCOPES)
    
    # Step 1: Get authorization URL
    authorization_url, state = oauth.authorization_url(AUTHORIZATION_URL)
    print(f"Please go to {authorization_url} and authorize the app.")
    
    # Step 2: User authorizes and is redirected back to your REDIRECT_URI
    # You would typically capture this 'response_url' from your web application
    response_url = input("Paste the full redirect URL here: ")
    
    # Step 3: Fetch the access token
    token = oauth.fetch_token(TOKEN_URL,
                              authorization_response=response_url,
                              client_secret=CLIENT_SECRET)
    
    return oauth, token

if __name__ == "__main__":
    try:
        oauth_session, token_info = get_oauth_session()
        print("Access Token obtained.")
        
        # Example API call: Get all ad accounts associated with the user
        # Refer to the X Marketing API documentation for specific endpoints
        # https://business.x.com/marketing-api-documentation/reference/ads-api/accounts
        
        accounts_url = "https://ads-api.twitter.com/12/accounts"
        response = oauth_session.get(accounts_url)
        response.raise_for_status() # Raise an HTTPError for bad responses (4xx or 5xx)
        
        ad_accounts = response.json()
        print("\nAd Accounts:")
        for account in ad_accounts.get("data", []):
            print(f"  ID: {account.get('id')}, Name: {account.get('name')}")
            
    except requests.exceptions.RequestException as e:
        print(f"API Request failed: {e}")
    except Exception as e:
        print(f"An error occurred: {e}")

This Python script outlines the OAuth 2.0 authorization flow required to interact with the X Marketing API. After obtaining an access token, it demonstrates a basic call to list ad accounts. For detailed endpoint usage and available parameters, consult the X Marketing API Reference.