Search API Connector Documentation

Print

Import Pinterest Ads Data to Google Sheets

premium

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 API

To get started, let’s connect to the API and make a simple request.

  1. Open up Google Sheets and click Extensions > API Connector > Open > Add New. You should now be in API Connector’s main Create screen.
  2. Enter https://api.pinterest.com/v5/ad_accounts into the URL field
  3. Choose Pinterest Ads from the dropdown menu. If you haven’t connected before you’ll also need to click the connect button to authenticate yourself.
    pinterest-ads-img1
  4. You’ll be sent to Pinterest and prompted to authorize the connection.
    pinterest-ads-img2
  5. Once you’re connected, you’ll see a Connected badge verifying that you’ve successfully authenticated yourself.
    pinterest-ads-img3
  6. We don’t need any headers here so just leave that section blank.
  7. Enter a name for your destination sheet, name and save the request, and click Run. You should now see a list of your ad account(s). Pay special attention to the ad ID, as you’ll need that for subsequent requests.
    pinterest-ads-img4

Part 2: Example API URLs

You can substitute in your own account / campaign IDs to run the request URLs below. These are just examples so you can see how it works; to see the full list of available parameters, please check their ad accounts documentation.

You can use API Connector’s API Library to pull up most of these sample requests while in the add-on.

  • Ad account analytics
    https://api.pinterest.com/v5/ad_accounts/549763116512/analytics?start_date=2021-09-01&end_date=2021-09-15&columns=CTR,SPEND_IN_DOLLAR,TOTAL_CLICKTHROUGH&granularity=DAY
  • List campaigns
    https://api.pinterest.com/v5/ad_accounts/549763116512/campaigns
  • Campaign analytics
    https://api.pinterest.com/v5/ad_accounts/549763116512/campaigns/analytics?start_date=2021-09-01&end_date=2021-09-15&columns=CTR,SPEND_IN_DOLLAR,TOTAL_CLICKTHROUGH&granularity=DAY&campaign_ids=12345
  • List ad groups
    https://api.pinterest.com/v5/ad_accounts/549763116512/ad_groups

Part 3: Set Column Order

By default, API Connector prints fields in the order they come back from the API. 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. 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.

Part 4: API Documentation

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

Previous Import PayPal Data to Google Sheets
Next Import Pipedrive Data to Google Sheets

Leave a Comment

Table of Contents