This API allows you to retrieve performance metrics for creative assets, including both and assets, over a specified date range.
Use your to authenticate. Replace <<REPORTING API KEY>>
in the example URL with your actual API key.
Your unique Reporting API Key
Start date of the report in YYYY-MM-DD
format
End date of the report in YYYY-MM-DD
format
Comma-separated list of desired columns (see below)
You can include any of the following in the columns
parameter:
creative_set_id
asset_id
impressions
clicks
day
ctr
original_url
The asset type can be determined from the original_url
, which is a preview URL that you can see the preview of the actual asset through the link.
- Ends with
.mp4
→ - Ends with
.raw
→
Returns results in JSON format
Returns additional debugging info (optional)
Ensures fresh data with no caching
Excludes rows with zero impressions
Sorts results by impressions in descending order
filter_creative_set_id=ID
Filters data by specific creative set ID
https://r.applovin.com/assetReport?api_key=<<REPORTING API KEY>>&start=2025-03-06&end=2025-03-08&columns=day,creative_set_id,asset_id,original_url,impressions,clicks,ctr&format=json&report_type=advertiser
Replace <<REPORTING API KEY>>
with your actual key.
If you'd like to measure (e.g. checkouts, revenue, etc.), you can creative_set_id
. By joining with conversion data on the creative_set_id
, you can analyze how different assets contribute to your end results.
import requests
import pandas as pd
# Define the API URL
api_key = "Your Reporting API Key"
start_date = "2025-03-06"
end_date = "2025-03-06"
asset_metric_url = f"https://r.applovin.com/assetReport?api_key={api_key}&start={start_date}&end={end_date}&columns=day,creative_set_id,asset_id,original_url,impressions,clicks,ctr&format=json&report_type=advertiser"
reporting_api_url = f"https://r.applovin.com/report?api_key={api_key}&start={start_date}&end={end_date}&columns=day,campaign,creative_set_id,cost,chka_0d,chka_7d,chka_usd_0d,chka_usd_7d&format=json&report_type=advertiser&day_column=day"
# Make the API request
asset_metrics = requests.get(asset_metric_url)
# Check if request was successful
if asset_metrics.status_code == 200:
data = asset_metrics.json()
# Convert JSON response to a DataFrame
df_asset = pd.DataFrame(data['results'])
df_asset['type'] = df_asset['original_url'].apply(lambda x: 'video' if x.endswith('.mp4') else ('endcard' if x.endswith('.raw') else 'other'))
# Display data
print(df_asset.head(10))
else:
print(f"Error: Unable to fetch data. Status Code: {asset_metrics_response.status_code}")
# Video asset overview
video_df = df_asset[df_asset['type'] == 'video'].copy()
# Ensure numeric conversion
video_df['impressions'] = pd.to_numeric(video_df['impressions'], errors='coerce')
video_df['clicks'] = pd.to_numeric(video_df['clicks'], errors='coerce')
# Compute sum of impressions and clicks, then calculate CTR
v_summary = video_df[['impressions', 'clicks']].sum().to_frame().T
v_summary['ctr'] = v_summary['clicks'] / v_summary['impressions']
print(v_summary)
# End Card asset overview
endcard_df = df_asset[df_asset['type'] == 'endcard'].copy()
# Ensure numeric conversion
endcard_df['impressions'] = pd.to_numeric(endcard_df['impressions'], errors='coerce')
endcard_df['clicks'] = pd.to_numeric(endcard_df['clicks'], errors='coerce')
# Compute sum of impressions and clicks, then calculate CTR
ec_summary = endcard_df[['impressions', 'clicks']].sum().to_frame().T
ec_summary['ctr'] = ec_summary['clicks'] / ec_summary['impressions']
print(ec_summary)
import requests
import pandas as pd
# Fetch the reporting API data
reporting_metrics = requests.get(reporting_api_url)
# Check if the request was successful
if reporting_metrics.status_code == 200:
report_data = reporting_metrics.json()
# Convert JSON response to DataFrame
df_report = pd.DataFrame(report_data['results'])
# Convert to numeric in case it's not
df_merged['chka_usd_7d'] = pd.to_numeric(df_merged['chka_usd_7d'], errors='coerce')
# Sort by chka_usd_7d descending and reset index
df_sorted = df_merged.sort_values(by='chka_usd_7d', ascending=False).reset_index(drop=True)
# Preview top rows
print(df_sorted[['asset_id', 'creative_set_id', 'type', 'impressions', 'clicks', 'chka_usd_0d', 'chka_usd_7d']].head(20))
else:
print("Failed to fetch reporting API data:", reporting_metrics.status_code)