skillfed

pinterest-api-sdk

Pinterest API SDK

pinterest-api-sdk v0.2.6 316.2K downloads/30d#7,680 on PyPI82
Permissive license Apache License 2.0 Active released

What it is and what it does

The Pinterest SDK for Python is an official client library that wraps the Pinterest API to simplify campaign management, authentication, and error handling. It handles OAuth token refresh automatically when configured with a refresh token, reducing boilerplate code for common Pinterest advertising tasks like creating ads, managing ad groups, and adjusting campaign budgets. The library depends on urllib3 for HTTP requests, python-dateutil for timestamp handling, python-dotenv for environment configuration, and six for Python 2/3 compatibility.

The SDK is designed for developers building Pinterest advertising automation tools or integrations. It provides object-oriented access to campaigns, ad groups, and ads through classes like Campaign, AdGroup, and Ad, with methods for creation, activation, and budget management. Configuration is flexible—you can use environment variables or a config.json file—and the client auto-instantiates when properly configured. The library is actively maintained, has no known security vulnerabilities, and is permissively licensed under Apache License 2.0.

Use it for:

  • Automate campaign creation and management for Pinterest advertising platforms or agencies.
  • Build tools that programmatically activate, pause, or adjust budgets on existing Pinterest campaigns.
  • Integrate Pinterest ad account management into larger marketing automation workflows.
  • Refresh access tokens automatically without manual intervention in long-running applications.
  • Manage multiple ad accounts or campaigns in bulk using the SDK's object-oriented API.

Worth the install?

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

Python client library for the Pinterest API that handles campaign management, authentication, and error handling with automatic token refresh support.

Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and is permissively licensed. Install it if you need to automate Pinterest campaign management or integrate Pinterest ads into a Python application. The main gotcha is that you must register an app and obtain credentials from Pinterest's developer platform before use.

Install

pinterest-api-sdk on PyPI

pip

pip install pinterest-api-sdk

uv

uv add pinterest-api-sdk

poetry

poetry add pinterest-api-sdk

Installing pinterest-api-sdk

Before you install

Low install friction with a pure Python wheel distribution. Actively maintained with recent commits and no known vulnerabilities. Five runtime dependencies are all standard utilities (urllib3, python-dateutil, python-dotenv, six, Pinterest-Generated-Client).

License in practice

Licensed under Apache License 2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions—suitable for most projects.

Quickstart

pip install pinterest-api-sdk

from pinterest.client import PinterestSDKClient
from pinterest.ads.campaigns import Campaign

# Client auto-instantiates from environment variables or config.json
campaign = Campaign(ad_account_id="123456789", campaign_id="987654321")
campaign.activate()

Requires Python 3.7+, a registered Pinterest app on developers.pinterest.com, and either an access token or refresh token set via environment variables or config.json.

Verify before relying

  • Whether the SDK supports organic Pins, shopping, and analytics features mentioned as 'coming over time' in the description.
  • Current scope of supported API endpoints beyond campaign management.
  • Whether the package is suitable for production use given the 'no guaranteed SLA' note for issue resolution.
  • Access token validity period and refresh token validity period for production deployments.

Package facts

License Apache License 2.0 (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 5 — urllib3, python-dateutil, python-dotenv, six, Pinterest-Generated-Client
Maintenance actively maintained — 344 days since the last release
Last repo commit
First released
Downloads 316,184/month — #7,680 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pinterest_api_sdk-0.2.6-py3-none-any.whl

Tags

pinterest api python clientcampaign management sdkpinterest ads automationpinterest api authenticationpython pinterest integration
pinterest-apicampaign-managementoauth-client

More WWW/HTTP packages