twitter-ads
A Twitter supported and maintained Ads API SDK for Python.
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-adsuv
uv add twitter-adspoetry
poetry add twitter-adsInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
bingadsBing Ads Python SDK provides proxy classes and…
permissive · top 15,000 on PyPI
python-twitterA Python wrapper that provides programmatic…
permissive · top 15,000 on PyPI
pinterest-api-sdkPython client library for the Pinterest API…
permissive · top 15,000 on PyPI
facebook-businessProvides Python bindings to Facebook's Business…
unclear · top 5,000 on PyPI
google-adsProvides a Python client library for…
permissive · top 1,000 on PyPI
tiktok-business-api-sdk-officialProvides Python client libraries for the TikTok…
permissive · top 15,000 on PyPI
advertoolsadvertools provides data manipulation and…
permissive · top 15,000 on PyPI
apache-airflow-providers-facebookIntegrates Apache Airflow with Facebook Ads,…
permissive · top 15,000 on PyPI
Pinterest-Generated-ClientProvides auto-generated Python bindings for…
permissive · top 15,000 on PyPI
WooCommerceA Python wrapper for the WooCommerce REST API…
permissive · top 15,000 on PyPI