👍

Try it!

Try out the Daily Exports API using your Branch data via the API reference here

Overview

Benefits of Daily Exports API

Branch’s Daily Exports pull granular Branch event data directly. You can do so either via the Daily Exports section in your Branch dashboard OR via API directly.

API Limitations

Limitation

Details

Data Availability

The data will only appear after end of day since it's processed every 24 hours

Max number of days that can be queried at a time

7 Days.

Data Visibility

The data will not be visible prior to your whitelisting date. After you sign up, data will be generated for the next UTC day or the following UTC day.

Data Visibility for Keys

The data will only be visible for your live key (not your test key).

Click data related to SANs (e.g. Google Ads)

Can be found at the campaign level rather than device level.

Data Purge

Branch will purge last-attributed data after 60 days

Data Hashing

Many fields are hashed, including IP address and advertising identifiers, after 7 days. See Data Hashing for further details.

File Limitations

Multiple files are expected with 200K rows per file when using Daily Exports. If your export has less than 200K rows, there will only be one file.

Prerequisites & API Access

Prerequisites

  • You must have a Data Feeds subscription.
  • Toggle on the Data Export API using the slider on the Data Feeds Manager page.
  • To access the API, you must have Sensitive Data and Export access.

Third Party API Access

Any user with access to an account’s API keys will be able to access Branch’s Daily Export API (and thus unfiltered, log-level data). As a result, we would recommend against providing third parties (agencies and ad partners) with the permissions required to view API keys - Sensitive Data and App-Level Settings - during the invitation process.

Authentication

Calls to the Branch Daily Export API require a branch_key and branch_secret String parameter to be passed with each request.

API Usage

Daily Exports Request

POST
https://api2.branch.io/v3/export
Headers:
Content-Type: application/json
Body: JSON parameters
Host: api2.branch.io

Request Headers:

Header

Description

Required

Content-Type

application/json

Yes

Request Body Parameters:

Parameter

Description

Required

branch_key

The Branch key of the originating app.

Yes

branch_secret

The Branch secret key of the originating app.

Yes

export_date

The UTC date of the requested data export.

Yes

Response Body Parameters:

Parameter

Type

Human Readable Name

eo_branch_cta_view

Array of Strings

CTA Views

eo_click

Array of Strings

Clicks

eo_commerce_event

Array of Strings

Commerce Events

eo_content_event

Array of Strings

Content Events

eo_custom_event

Array of Strings

Custom Events

eo_impression

Array of Strings

Impressions

eo_install

Array of Strings

Installs

eo_open

Array of Strings

Opens

eo_pageview

Array of Strings

Pageviews

eo_reinstall

Array of Strings

Reinstalls

eo_sms_sent

Array of Strings

SMS Sent

eo_user_lifecycle_event

Array of Strings

User Lifecycle Events

eo_web_session_start

Array of Strings

Web Session Starts

eo_web_to_app_auto_redirect

Array of Strings

Web To App Auto Redirects

eo_dismissal

Array of Strings

Dismissal

Example Request/Response:

curl --request POST \
     --url https://api2.branch.io/v3/export \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --data '
{
     "branch_key": "key_live_xxxxxxxxxxxx",
     "branch_secret": "secret_live_xxxxxxxxxx",
     "export_date": "2022-06-01"
}
{
 "eo_branch_cta_view": <Array of String(s)>,
  "eo_click": <Array of String(s)>,
  "eo_commerce_event": <Array of String(s)>,
  "eo_content_event": <Array of String(s)>,
  "eo_custom_event": <Array of String(s)>,
  "eo_impression": <Array of String(s)>,
  "eo_install": <Array of String(s)>,
  "eo_open": <Array of String(s)>,
  "eo_pageview": <Array of String(s)>,
  "eo_reinstall": <Array of String(s)>,
  "eo_sms_sent": <Array of String(s)>,
  "eo_user_lifecycle_event": <Array of String(s)>,
  "eo_web_session_start": <Array of String(s)>,
  "eo_web_to_app_auto_redirect": <Array of String(s)>,
  "eo_dismissal": <Array of String(s)>
}

📘

Windows Command Prompt Formatting

Please note that if you are trying to run this curl command in Command Prompt on a machine running Windows, you will need to change ' to " and escape the " in curly brackets with a . Here is a final example:

curl --request POST \
     --url https://api2.branch.io/v3/export \
     --header "Accept: application/json" \
     --header "Content-Type: application/json" \
     --data "
{\"branch_key\": \"key_live_xxxxxxxxxxxx\",\"branch_secret\": \"secret_live_xxxxxxxxxx\",\"export_date\": \"2022-06-01\"}"

The response payload will be in JSON format and for each export, it will have an array of paths to files on S3 to download.

  • Note that there may be multiple files (depending on the size of the day's export) and that each CSV file will be gzipped.
  • Each of the keys in the example above may not be present in the response depending on if you had any events for that topic for the specified day.

All exports via Data Feeds are powered by Branch's People-Based Attribution. For an exhaustive list of events included in these exports and more detailed definitions of each event, please see the Event Ontology Data Schema.

Response Codes:

Response Code

Description

200

Status of aggregate export

400

Authentication Failed

Appendix

Data Hashing

In accordance with our internal policies related to GDPR and other data protection laws, we hash many fields, including IP address and advertising identifiers, after 7 days.

This means that if you want to export data beyond 7 days, either via the Dashboard's CSV Exports or by requesting a manual data dump, these fields will no longer contain the original values.

For this reason, we highly recommend you always export raw data within 7 days.

Daily Download Availability

A full day's files will be available on our S3 bucket at that location to download around 4:00 am UTC. It will return a blank array from S3 for any empty files until the UTC day is over and the data has been transferred to S3, therefore it is recommended you schedule any ETLs to fetch the data for the previous day around 7:00 am UTC.

IP Discrepancies

Geographic data, such as country and city, may not be available for a very small percentage of events where the IP cannot be resolved to a location.

Time Limits

Data will be available through the API only for 6 months after the date it's posted. If you need a record of your data for longer than 6 months, please set up a recurring export and store data in your systems.

Exporting beyond 7 days

In accordance with our internal policies related to GDPR and other data protection laws, we hash many fields, including IP address and advertising identifiers, after 7 days. This means that if you want to export data beyond 7 days, either via the Dashboard's CSV Exports or by requesting a manual data dump, these fields will no longer contain the original values. For this reason, we highly recommend you always export raw data within 7 days.

📘

Manual Data Dump

Due to the resources required to complete a manual data dump, this service is available to Branch Enterprise tier clients only.