Pull APIs - Pulling AppsFlyer Reports by APIs

Introduction

AppsFlyer's CSV data reports are available for manual download through the Export Data page, and also via the Pull API.

Pull API enables app owners to receive CSV files of data about their apps by using specific URLs containing query parameters. Pulled reports can either be in aggregated or raw data forms. 

The Pull API links are all available in the API Access Page in each app's dashboard. 

API Parameters - Required

api_token
Is the user's external API Authorization Key: "{Account owner API Key should be used}"
from
Report start date in the format of "yyyy-mm-dd" or "yyyy-mm-dd hh:mm". For example: 2010-01-01 or 2010-01-01%2000%3A15 - (The hours parameter is for raw reports only).
to
Report end date. Same format as from

API Parameters - Optional

Filtering reports by media source and re-attribution.

Filtering the reports to list only a specific media source is available by adding two parameters to the request:

media_source
Is also optional and dictates the actual media source. For example - for a Raw Report with category and time zone:
https://hq.appsflyer.com/export/com.greatapp/installs_report/v5?api_token=xxxx&from=2016-11-09&to=2016-11-09&category=standard&media_source=googleadwords_int&timezone=+01:00
event_name 
(Only for In-App Events Report) can be used to filter the raw in-app events report data to include only a specific event or events. For example: event_name=af_purchase,ftd
category
Is an optional parameter. It is used to filter either by a specific media source - category=standard , or Facebook campaign - category=facebook.

For Retargeting Exports

reattr=true 

Used to retrieve retargeting attribution reports.

Custom Reports with Pull API

fields 

Pull API supports customizing raw data reports with selectable fields (v5 and up). This enables marketers to download only relevant information to suit their requirements. 

To specify the requested fields, append the following fields parameter to the API call. 

Each column you request should be added to the fields parameter by specifying the API Column Name as it appears here. Example: fields=country_code,city

&fields=API_Name_A,API_Name_B

 Example

Pull the list of all cities and their respective country codes that brought installs -https://hq.appsflyer.com/export/id341333333/installs_report/v5?api_token=24b7b9fe-6ddd-4ddd-94c8-xxxxxxxxxxx&from=2017-03-09&to=2017-03-10&fields=country_code,city


The full list of fields and their API names can be found here

Additional Fields

Through Pull API you can add some fields, that complete the picture for raw data installs and in-app events in some cases.

To add new fields add "&additional_fields=" to the tracking link, followed by the comma-separated list of additional fields. See the Pull API examples below.

The result is a CSV report with added columns, that contain information when relevant.

Field name Relevant for
rejected_reason
rejected_reason_value
Validation Rules

blocked_reason
blocked_reason_value
blocked_sub_reason
blocked_reason_rule 

Protect360 (Anti-Fraud solution)
install_app_store Out-of-store Android markets

Time Zone and Currency

timezone (optional)
Add timezone= in the Pull API link to receive the report in the selected timezone (rather than GMT, by default). For raw data reports AppsFlyer supports two time zone formats, numerical (eg. +10:00) or Joda-Time (eg. Europe/Madrid). Joda-Time time zone format takes into account daylight saving time.
For example: timezone=%2B10:00 (url-encoded for +10:00). For Performance Reports only, the Joda-Time format is supported. For example:
https://hq.appsflyer.com/export/com.greatapp/daily_report/v5?api_token=xxxxxxxx&from=2016-11-09&to=2016-11-09&category=standard&media_source=googleadwords_int&timezone=Europe/Madrid
currency (optional)
Is used to receive the Revenue and Cost data in your selected currency, rather than in USD, which is the default option. This is set by the account admin.
currency=preferred is used to receive Revenue and Cost data in your selected currency.

 Note

Generally, the Pull API URLs do not need to be encoded. However, if using parameters that have non-URL compatible values, you will need to URL encode them. For example, using hours and time zone parameters.

API Policy

AppsFlyer's API Policy ensures high quality of service to the users of pull API by limiting the total number of daily requests and preventing abuse of the service.

The maximum number of records per report is 200K. If you get a report that has 200K rows then you have some results that were left out.

 Tip

If your daily results exceed 200K rows you can split your files according to the date AND the time of day, using the "yyyy-mm-dd hh:mm" date/time format in the from and to parameters on the Pull API URL. 
For example - an app owner has up to 300K new daily installs from all sources. The app owner decides to split the daily Pull API calls to 2 calls every 12 hours. The first URL call includes from=yyyy-mm-dd 00:00&to=yyyy-mm-dd 11:59 and the second from=yyyy-mm-dd 12:00&to=yyyy-mm-dd 23:59 (before encoding)  

 Note

By default, the Pull API Performance Report shows Facebook data at campaign level only. Add "&category=facebook" to enable the report to present Facebook information at both the Ad Set and Ad level. This is relevant for Facebook only.

Pull API Link Examples

Report Category Report Type Link Example
Performance Reports Partners Report https://hq.appsflyer.com/export/id123456789/partners_report/v5?api_token=<API TOKEN HERE>&from=yyyy-mm-dd&to=yyyy-mm-dd
  Partners Daily Report https://hq.appsflyer.com/export/id123456789/partners_by_date_report/v5?api_token=<API TOKEN HERE>&from=yyyy-mm-dd&to=yyyy-mm-dd
  Daily Report https://hq.appsflyer.com/export/id123456789/daily_report/v5?api_token=<API TOKEN HERE>&from=yyyy-mm-dd&to=yyyy-mm-dd
  Geo Report https://hq.appsflyer.com/export/id123456789/geo_report/v5?api_token=<API TOKEN HERE>&from=yyyy-mm-dd&to=yyyy-mm-dd
  Geo Daily Report https://hq.appsflyer.com/export/id123456789/geo_by_date_report/v5?api_token=<API TOKEN HERE>&from=yyyy-mm-dd&to=yyyy-mm-dd
Raw Data Reports Installs Report https://hq.appsflyer.com/export/id123456789/installs_report/v5?api_token=<API TOKEN HERE>&from=yyyy-mm-dd&to=yyyy-mm-dd
  In-App Events Report https://hq.appsflyer.com/export/id123456789/in_app_events_report/v5?api_token=<API TOKEN HERE>&from=yyyy-mm-dd&to=yyyy-mm-dd
  Uninstalls Report
https://hq.appsflyer.com/export/id123456789/uninstall_events_report/v5?api_token=<API TOKEN HERE>&from=yyyy-mm-dd&to=yyyy-mm-dd
 
  Organic Installations Report https://hq.appsflyer.com/export/id123456789/organic_installs_report/v5?api_token=<API TOKEN HERE>&from=yyyy-mm-dd&to=yyyy-mm-dd
  Organic In-App Events Report https://hq.appsflyer.com/export/id123456789/organic_in_app_events_report/v5?api_token=<API TOKEN HERE>&from=yyyy-mm-dd&to=yyyy-mm-dd
Protect360 Reports Installs Report https://hq.appsflyer.com/export/id123456789/blocked_installs_report/v5?api_token=<API TOKEN HERE>&from=yyyy-mm-dd&to=yyyy-mm-dd&additional_fields=blocked_reason,blocked_reason_value
  In-App Events Report https://hq.appsflyer.com/export/id123456789/blocked_in_app_events_report/v5?api_token=<API TOKEN HERE>&from=yyyy-mm-dd&to=yyyy-mm-dd&additional_fields=blocked_reason,blocked_reason_value
  Clicks Report https://hq.appsflyer.com/export/id123456789/blocked_clicks_report/v5?api_token=<API TOKEN HERE>&from=yyyy-mm-dd&to=yyyy-mm-dd&additional_fields=blocked_reason,blocked_reason_value
Validation Rules Reports Invalid Installs Report https://hq.appsflyer.com/export/id123456789/invalid_installs_report/v5?api_token=<API TOKEN HERE>&from=yyyy-mm-dd&to=yyyy-mm-dd&additional_fields=rejected_reason,rejected_reason_value
  Invalid In-App Events Report https://hq.appsflyer.com/export/id123456789/invalid_in_app_events_report/v5?api_token=<API TOKEN HERE>&from=yyyy-mm-dd&to=yyyy-mm-dd&additional_fields=rejected_reason,rejected_reason_value

API Version (V5)

  • Changes:
    • Version (v5) group Facebook campaigns only by campaign and not by campaign & ad group.

    • Export data page for aggregated reports uses the API version (v5)

  • Unchanged:
    • The existing API (v4) is still available for use

    • The version does not apply any change to the file format or headers

 Note

To use V4 Performance Reports, change v5 to v4.

For example, the v5 (in red) should be changed to v4.

https://hq.appsflyer.com/export/i{app_id}/geo_report/v5?api_token={api_token}&from={from_date}&to={to_date}

Was this article helpful?
1 out of 2 found this helpful