App list API for ad networks

At a glance: Get app list API returns apps associated with an ad network account (token). The list, in a JSON, contains the app name, platform, currency, and timezone. Ad networks query about a specific permission/integration type, for example, access to Protect360 data.

Get app list API

The following sections include information necessary for using the API. 

Get app list basics

Category Item

Description

Request HTTP method GET
Path

https://hq1.appsflyer.com/api/mng/apps

Authorization header 

 Response

   

Results

Return in a JSON

Request limit
  • 20 requests/minute
  • 100 requests/day
Record limit

1,000 records/request. If more than 1,000 records are to return, use follow on pagination requests, described in this article.

API request

The API request consists of the method, path, mandatory capabilities parameter, and optional pagination parameters. The token is contained in the authorization header. 

Method

GET https://hq1.appsflyer.com/api/mng/apps?capabilities={capabilities} 
Get app list mandatory parameters

Query parameter

Description
capabilities

To get the list and number of apps to which you have permission/integration capabilities: set the capabilities parameter to one of the options listed. 

Option Type Description
protect_360 Report permission Get Protect360 raw data reports for ad networks
cost  Integration App is enabled to get cost data via InCost API

Example: List of apps for which you have Protect360 report API permission:capabilities=protect_360


Pagination mechanism

A pagination mechanism, always operational, is implemented. 

Pagination principles: 

  • Returns up to 1,000 records per request (page).
  • Response JSONs contain the following pagination related keys:
    • meta.total_items: The number of records to be returned by all pages combined. This represents the number of apps for which you have been granted the capabilities being queried.
    • Pagination links (depicted in the JSON that follows) have the following keys:
      • links.prev: If there was a previous request: the request used to generate the previous page.
      • links.self: The current request: the request used to generate the current JSON (page)
      • links.next: The request required to get the next page. If there is no next key, this is the last page. 

 Use one of the following pagination control methods:

  • [Best practice] Use the links in the JSON: If the links.next key exists, use it to create a request to get the next page. Continue to do so until you receive a JSON without a links.next key.
  • Programatically implement limit and offset parameters in conjunction with the total_items key.

Pagination links JSON example

  • The example that follows contains the result of the first request, consisting of the first two records in the data section (not displayed). 
  • The total number of records to return is 6.
  • The links.next key contains the request that returns the second page—records 3 and 4. 
{                                                                                         
    "data": {[...]},   
    "meta": {
        "total_items": 6
    },
    "links": {
        "prev": "https://hq1.appsflyer.com/api/mng/apps?capabilities=protect_360&offset=0&limit=2",
        "self": "https://hq1.appsflyer.com/api/mng/apps?capabilities=protect_360&offset=2&limit=2",
        "next": "https://hq1.appsflyer.com/api/mng/apps?capabilities=protect_360&offset=4&limit=2"
    }
}
Pagination mechanism parameters (optional)

Query parameter

Description
limit

Number of records that return per call

  • Maximum: 1,000
  • If you don't sendlimit, it is automatically set to 1,000.
  • Example: limit=2
  • Mandatory: No
offset

The first record to return in the call. Record numbers start with 0. 

  • If you don't send offset, it is automatically set to 0.
  • Example: offset=2
  • Mandatory: No
 

JSON response

Key

Description

id

App ID, for example: id123456789, com.myapp.com

type

Always return app 

name

App name

platform

iOS or Android

currency

App-specific currency code as set by the advertiser

time_zone

App-specific timezone as set by the advertiser

total_items

Number of apps to which the ad network has the requested capabilities option

links

Pagination mechanism (explained in the parameters section)

  • prev: the call used to generate the previous page
  • self: the call used to generate the current page
  • next: the call used to generate the next page

Get app list curl example and response

Curl request

This example includes a complete call, including optional pagination parameters. 


curl --location --request GET 'https://hq1.appsflyer.com/api/mng/apps?capabilities=protect_360&limit=1000&offset=0' \
-H 'Authorization: Bearer {API V2.0 token available to the admin in the dashboard.}' \

JSON response

{
    "data": [
        {
            "id": "com.appsflyer.xpend_qa1",
            "type": "app",
            "attributes": {
                "name": "com.appsflyer.xpend_qa1",
                "platform": "android",
                "currency": "USD",
                "time_zone": "UTC"
            }
        },
        {
            "id": "com.abc.app",
            "type": "app",
            "attributes": {
                "name": "com.abc.app",
                "platform": "android",
                "currency": "USD",
                "time_zone": "UTC",
                "enable_retargetting": true
            }
        },
        {
            "id": "com.xyz.app",
            "type": "app",
            "attributes": {
                "name": "com.xyz.app",
                "platform": "android",
                "currency": "JPY",
                "time_zone": "UTC"
            }
        }
    ],
    "meta": {
        "total_items": 3
    },
    "links": {
        "self": "https://hq1.appsflyer.com/api/mng/apps?capabilities=protect_360&offset=0&limit=1000"
           }
}

HTTP response codes

Response codes

Code 

Message

Remarks/troubleshooting

200 OK

Valid data returned

200 OK

Symptom: No data returns

Action: Make sure the authentication token is in the bearer header.

400 Bad request
  • See the message contained in the JSON
  • Empty JSON: illegal capability specified
401 Unauthorized

Message: Authorization token is malformed

Make sure you have the correct token; token must have 700+ characters.

404 Not found
  • Handle any network or firewall-related problems. 
  • Make sure that AppsFlyer IP addresses are allowlisted
  • Make sure you use the most recently-issued token.
  • No data found: The permission/integration (capabilities) type requested is legal,l but no apps with permission were found. 
429 Too many requests

Exceeded rate limitation

Was this article helpful?