Import Pinterest Ads Data to Google Sheets
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.
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.
- Open up Google Sheets and click Add-ons > API Connector > Open > Add New. You should now be in API Connector’s main Create screen.
https://api.pinterest.com/v5/ad_accountsinto the URL field
- 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.
- You’ll be sent to Pinterest and prompted to authorize the connection.
- Once you’re connected, you’ll see a Connected badge verifying that you’ve successfully authenticated yourself.
- We don’t need any headers here so just leave that section blank.
- 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.
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.
- Ad account analytics
- List campaigns
- Campaign analytics
- List 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 may change the order in which they send back fields, which results in columns switching around.
To address this, you can fix your columns in place with a JMESPath expression. An example JMESPath for Pinterest would be like this:
Just list out your fields in the order you’d like to appear and they will remain in that order.