Search API Connector Documentation


Import AppsFlyer Data to Google Sheets

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

We’ll first get an API key from AppsFlyer, and then set up a request to pull in metrics to your spreadsheet.


Before You Begin

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

Part 1: Get Your AppsFlyer API Token

  1. Reach out to your CSM to enable the Cohort API
  2. Get the token in the dashboard as shown here:
    • From the menu bar, access the user menu (email address drop-down).
    • Select Security center.
    • In the AppsFlyer API tokens section, click Manage your AppsFlyer API tokens.
    • The available tokens (V1.0, V2.0, or both) are displayed. 
    • Copy the required token.

Part 2: Create Your API Request URL

For this example, we’ll fetch data about a cohort.

  • Base domain:
  • Endpoint: /api/cohorts/v1/data/app/YOUR_APP_ID
  • Query parameters: ?format=json

Putting it all together, we get the full API Request URL:

Note: the app ID is the ID in the URL of a store’s app page. For Android, this will look like com.coolcompany.coolapp, while for iOS it will look something like id123456789

Part 3: Pull AppsFlyer API Data into Sheets

Now let’s get that data into Sheets.

  1. Open up Google Sheets and click Extensions > API Connector > Open.
  2. In the Create tab, choose the POST method
  3. Now enter the Request URL we just created
  4. We don’t need OAuth authentication, so leave that as None.
  5. Under Headers, enter three key-value pairs:
    • Key = Authorization, Value = Bearer YOUR_TOKEN, using the cohort API token you got from your company dashboard
    • Key = Content-Type, Value = application/json
    • Key = Accept, Value = application/json
  6. Under the request body, add in your request parameters like this: {
    "cohort_type": "user_acquisition",
    "min_cohort_size": 1,
    "preferred_timezone": false,
    "from": "2020-01-01", "to": "2020-01-31",
    "filters": {
    "period": [ 0, 1, 2, 10, 30, 60 ],
    "geo": ["US","CN"],
    "pid": ["Facebook Ads","gooleadwords_int"]},
    "preferred_currency": true,
    "aggregation_type": "on_day",
    "per_user": false,
    "groupings": ["pid","date"],
    "kpis": ["sessions"] }
  7. The whole thing should look like this:
  8. Create a new tab, give it a name, and click Set current to use that tab as your data destination.
  9. Name your request and click Run. A moment later you’ll see your AppsFlyer cohort API data populate your Google Sheet.

Part 4: API Documentation

Official API documentation:

Previous Import API-Football Data to Google Sheets
Next Import Asana Data to Google Sheets

Leave a Comment

Table of Contents