Print

Import Pinterest Ads Data to Google Sheets

paid feature

In this guide, we’ll walk through how to pull advertising data from the Pinterest API directly into Google Sheets, using the API Connector add-on for Sheets.

Contents

Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Connect to the Pinterest Ads API

The easiest way to get started with the Pinterest Ads API is through API Connector’s built-in integration.

  1. Select Pinterest Ads from the drop-down listof applications
    pinterestads-application
  2. Under Authorization, click Connect to Pinterest Ads
    pinterestads-authorization
  3. You'll be sent to Pinterest and prompted to authorize the connection.
    pinterestads-oauth
  4. You’ll then be returned to your Google Sheet, and can verify that your Pinterest Ads connection is now active.

Part 2: Get your Pinterest Ads Account ID

We’ll need your Pinterest account ID for subsequent requests, so let’s get it now. To get your account ID, login to your Pinterest Ads account and grab it from the main menu.
pinterestads-accountid

Alternatively, you can get your account ID via the API, using the /ad_accounts endpoint.
pinterestads-accountid_from_api

Part 3: Fetch Data from Pinterest Ads into Sheets

Now that we’re connected, let’s pull some data into Sheets.

  1. Select the /ad_accounts/{ad_account_id}/analytics endpoint to retrieve account-level ad analytics
    pinterestads-endpoints
  2. Fill in all required parameters: ad_account_id, start_date, end_date, columns, and granularity.
    pinterestads-parameters
  3. Choose a destination sheet, name your request, and hit Run. A moment later you’ll see the response data in your sheet.
    pinterestads-response
  4. In some cases, Pinterest changes the order in which they send back fields, which results in columns switching around. To address this, open API Connector's visual field editor by clicking Edit Fields.
    pinterestads-editfields
  5. Here you can map fields to specific columns so that they stay "locked" in place even when Pinterest sends back the data in a different order.
    pinterestads-preview

Part 4: Create a Custom Request

Alternatively, you can run your own custom requests instead of using API Connector’s pre-built integration, using any of the endpoints and parameters shown in the API documentation. Here's an example request:

  • ApplicationCustom
  • MethodGET
  • Request URLhttps://api.pinterest.com/v5/ad_accounts/your_account_id/analytics?start_date=2021-09-15&end_date=2021-09-30&columns=AD_ACCOUNT_ID,CLICKTHROUGH_1,CPC_IN_MICRO_DOLLAR,CTR,SPEND_IN_DOLLAR&granularity=DAY
  • OAuthPinterest Ads

pinterestads-custom

Part 5: API Documentation

Official API documentation: https://developers.pinterest.com/docs/api/v5/#tag/ad_accounts

Leave a Comment

Jump To