Stay organized with collections
Save and categorize content based on your preferences.
Reports have a maximum length of 100,000 rows in the AdSense Management API, by default. If you’re
running close to these limits, or running into performance issues while processing the data, here
are some tips that may help.
Reducing the scale of your report
The first thing to look for when trying to make a report smaller is the list of dimensions you’re
using; each dimension you add has a multiplicative effect on the number of returned rows. Make sure
you only add the dimensions you need!
Splitting your reports
Sometimes, you only need extremely accurate data for a portion of the report, with the rest
allowing for less detail. For example, you could need extremely accurate details for the previous
month's earnings, with stats per country and channel across every day, but only really need the
country-level data when looking before that. You could therefore run a complex report for the
previous month, but a simpler one for the time before that.
Avoid JSON parsing by switching to CSV
The AdSense Management API allows you to receive your reports in CSV format, rather than the usual JSON.
To do that, simply call the alternate generateCsv method.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-21 UTC."],[[["AdSense Management API reports have a default maximum length of 100,000 rows, and exceeding this limit may cause performance issues."],["Minimizing the number of dimensions used in a report can significantly reduce its size and improve performance."],["For reports requiring varying levels of granularity, consider splitting them into multiple reports with different dimension sets to optimize data retrieval."],["Switching from JSON to CSV format for report retrieval can avoid JSON parsing overhead and improve efficiency."]]],[]]