Facebook Ads API in Google Sheets

Knowledge Base

Importing Facebook Ads API data to a spreadsheet doesn't have to be painful! In this guide, we'll walk you through the basics of importing Facebook Ads API data to Google Sheets.

Before you begin

  1. Install API Importer for Google Sheets

The following guide is based on the Facebook Ads Docs

Create an app for Facebook

Navigate to https://developers.facebook.com/ and click on "My Apps > Create App"

Create an app for Facebook/

Give your application a name and fill in your email address

Give your application a name and fill in your email address/

Select the Marketing API

You'll be redirected to the Developer dashboard, where you can add various products. In this case, select the Marketing API product.

Select the Marketing API/

Navigate to the Marketing API Tools section

In the sidebar, your newly-created "Marketing API" will be available. Click on Tools.

Navigate to the Marketing API Tools section/

Select the Token Permissions you need and click "Get Token"

Pro-tip: It is always recommended to follow the Principle of least privilege

Select the Token Permissions you need and click "Get Token"/

Copy your Access Token

After clicking "Get Token", your access token will appear.

Copy your Access Token/

Get your Account Number

Navigate to https://www.facebook.com/adsmanager/manage/accounts and copy your Account Number. This can be found in the url they redirect you to: e.g. https://www.facebook.com/adsmanager/manage/accounts?act=1234567

In Google Sheets, go to Add-ons -> API Importer -> My Requests

facebook



You can run this command with =api("facebook")