facebook-business
Facebook Business SDK
What it is and what it does
The Facebook Business SDK is a unified Python client for Facebook's suite of business-facing APIs. It abstracts the Graph API into object-oriented classes representing ad accounts, campaigns, pages, and Instagram business entities, implementing a CRUD (create, read, update, delete) pattern for each. The SDK bundles multiple APIs—Marketing, Pages, Business Manager, and Instagram—that would otherwise require separate integrations, reducing implementation overhead for partners managing multiple Facebook properties.
Developers initialize the SDK with an app ID, app secret, and access token, then instantiate objects (AdAccount, Campaign, etc.) and call methods like get_campaigns() or api_update() to interact with Facebook's infrastructure. The package depends on requests for HTTP transport, aiohttp for async operations, and several utility libraries. It is maintained by Facebook and sees regular updates; the latest release is recent and the repository is active.
Use it for:
- Programmatically create and manage ad campaigns across multiple ad accounts without manually calling Graph API endpoints.
- Retrieve campaign performance metrics and ad account details for reporting or dashboard integration.
- Automate bulk operations on Pages or Instagram business accounts (e.g., publishing, moderation) via a single SDK.
- Build internal tools or third-party applications that need to read/write ad account data on behalf of clients.
- Integrate Facebook advertising into a larger marketing automation or analytics platform.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python bindings to Facebook's Business APIs, bundling Marketing API, Pages, Business Manager, and Instagram endpoints into a single SDK for managing ad campaigns, accounts, and related business operations.
Yes. The package is actively maintained, has low install friction, and is popular on PyPI with many monthly downloads. It is the official Facebook-provided SDK for Python developers needing to work with Facebook Business APIs. The main caveat is that the license treatment is unclear—verify LICENSE.txt before use in sensitive contexts. No known security vulnerabilities are recorded.
Install
facebook-business on PyPI
pip
pip install facebook-businessuv
uv add facebook-businesspoetry
poetry add facebook-businessInstalling facebook-business
Before you install
Low friction installation via pip with a pure-Python wheel. Actively maintained with a recent release and 1577 GitHub stars. Six runtime dependencies are all well-established packages (requests, aiohttp, six, curlify, pycountry, capi-param-builder-python).
License in practice
License treatment is unclear—the package references LICENSE.txt but provides no SPDX identifier. Review the repository's LICENSE.txt file directly before adopting in commercial or copyleft-sensitive projects.
Quickstart
pip install facebook_business
from facebook_business.api import FacebookAdsApi
from facebook_business.adobjects.adaccount import AdAccount
FacebookAdsApi.init(app_id, app_secret, access_token)
account = AdAccount('act_<account_id>')
campaigns = account.get_campaigns()
Requires a registered Facebook app, app secret, and a valid access token with appropriate permissions (e.g., ads_management for Marketing API, manage_page for Pages API).
Verify before relying
- Exact Python version support range—description mentions Python 2 and 3 compatibility but requires_python is unspecified.
- Whether Python 2 support is still actively maintained given its end-of-life status.
- Current state of deprecated methods (remote_create, remote_read, remote_update, remote_delete) and timeline for removal.
Package facts
| License | LICENSE.txt (unclear) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — requests, six, curlify, pycountry, capi-param-builder-python, aiohttp |
| Maintenance | actively maintained — 8 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 8,541,559/month — #1,607 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: facebook_business-26.0.0-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
advertoolsadvertools provides data manipulation and…
permissive · top 15,000 on PyPI
facebook-sdkA Python client library for the Facebook Graph…
permissive · top 15,000 on PyPI
tiktok-business-api-sdk-officialProvides Python client libraries for the TikTok…
permissive · top 15,000 on PyPI
pinterest-api-sdkPython client library for the Pinterest API…
permissive · top 15,000 on PyPI
apache-airflow-providers-facebookIntegrates Apache Airflow with Facebook Ads,…
permissive · top 15,000 on PyPI
twitter-adsA Python SDK for managing Twitter Ads…
permissive · top 15,000 on PyPI
klaviyo-apiPython client library for the Klaviyo marketing…
permissive · top 15,000 on PyPI
bingadsBing Ads Python SDK provides proxy classes and…
permissive · top 15,000 on PyPI
Pinterest-Generated-ClientProvides auto-generated Python bindings for…
permissive · top 15,000 on PyPI
sib-api-v3-sdkPython SDK for the SendinBlue REST API,…
unclear · top 15,000 on PyPI