skillfed

facebook-business

Facebook Business SDK

facebook-business v26.0.0 8.5M downloads/30d#1,607 on PyPI1,577
License unclear LICENSE.txt Active released

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-business

uv

uv add facebook-business

poetry

poetry add facebook-business

Installing 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

facebook marketing api pythonfacebook ads sdkfacebook business api clientmanage facebook campaigns programmaticallyfacebook graph api wrapperinstagram business api pythonfacebook pages api sdk
facebook-apimarketing-automationsocial-media-sdk

More WWW/HTTP packages