skillfed

twitter-ads

A Twitter supported and maintained Ads API SDK for Python.

twitter-ads v11.0.0 109.7K downloads/30d#12,503 on PyPI201
Permissive license MIT Abandoned released

What it is and what it does

twitter-ads is an official Python SDK for the Twitter Ads API that provides a client-based interface to manage advertising accounts, campaigns, and related resources. It wraps OAuth-authenticated HTTP requests to Twitter's Ads endpoints and models API responses as Python objects, allowing you to create, read, update, and iterate over campaigns and account data programmatically.

The package depends on pyyaml, requests-oauthlib, and python-dateutil to handle configuration, OAuth flows, and date parsing. It includes built-in support for rate-limit handling, request retries, and timeout configuration. However, the project has been abandoned since May 2022—the last commit was over three years ago, and no maintenance or updates are being applied. This means API changes, security issues in dependencies, and compatibility problems with newer Python versions will not be addressed.

Use it for:

  • Automate bulk campaign updates across multiple Twitter Ads accounts without manual dashboard interaction.
  • Build reporting tools that fetch campaign performance metrics and account data programmatically.
  • Manage campaign lifecycle (create, pause, resume, delete) as part of a larger advertising workflow.
  • Integrate Twitter advertising operations into a custom business intelligence or media buying platform.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Python SDK for managing Twitter Ads campaigns, accounts, and related resources through the Twitter Ads API using OAuth authentication.

No, unless you are maintaining legacy code that already depends on it. The package is abandoned with no updates since 2022, and the Twitter Ads API has likely evolved since then. For new projects, contact Twitter directly or use a maintained third-party SDK. If you must use it, verify that the current API endpoints and authentication methods still match the SDK's implementation.

Install

twitter-ads on PyPI

pip

pip install twitter-ads

uv

uv add twitter-ads

poetry

poetry add twitter-ads

Installing twitter-ads

Before you install

Low install friction with a pure-Python wheel distribution. However, the package is abandoned—last release was 2022-05-27 with no commits since then. No active maintenance means bug fixes and API updates are unlikely.

License in practice

MIT license is permissive and imposes minimal restrictions. You may use, modify, and distribute the package freely as long as you include the original license notice.

Quickstart

pip install twitter-ads

from twitter_ads.client import Client
from twitter_ads.campaign import Campaign

client = Client(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET)
account = client.accounts(ACCOUNT_ID)
for campaign in account.campaigns():
    print(campaign.id)

Requires valid Twitter Ads API credentials (consumer key/secret and access token/secret) and an active Twitter Ads account.

Verify before relying

  • Whether the package remains compatible with current Twitter Ads API endpoints and authentication flows.
  • Whether dependencies (pyyaml, requests-oauthlib, python-dateutil) have received security updates since the last release.
  • Support status for Python versions beyond 3.7 (e.g., 3.8, 3.9, 3.10+).

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 3 — pyyaml, requests-oauthlib, python-dateutil
Maintenance abandoned — 1,540 days since the last release
Last repo commit
First released
Downloads 109,677/month — #12,503 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: twitter_ads-11.0.0-py2.py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: InternetTopic :: Internet :: WWW/HTTPTopic :: Software Development :: Libraries :: Python Modules

Tags

twitter ads api sdkmanage twitter advertising campaignstwitter ads account managementtwitter ads python clienttwitter advertiser apitwitter ads automationtwitter campaign management
twitter-apiabandoned-project

More Python Modules packages