[go: nahoru, domu]

When you need to retrieve a large set of objects, such as a list of criteria for an account, it’s tempting to use one simple query with a paging parameter to pull the data from the server page-by-page.

While this approach is acceptable for most queries, it has some limitations:

  • The AdWords API does not allow you to retrieve data whose start index is past 50000
  • Unit cost for the request will depend on the number of pages and will be relatively expensive
  • A parallel update request may interfere with the process
  • Error handling and retry logic could be complex

We recommend using one of the following approaches instead:

  1. Use AdHoc reporting to obtain data. With reports, you can still retrieve most fields available through SOAP requests, with the added bonus of AdHoc reporting being faster and free of unit costs.
  2. Try to narrow the query as much as possible with predicates. Group queries by Campaign and AdGroup to retrieve only required data and to fit all results into one response.

Also, you can save bandwidth and retrieve large results faster by enabling transparent gzip compression. Check out our best practices page for more details on this feature and other recommendations.

As always, please feel free to ask any questions regarding the AdWords API on our forum or during scheduled office hours.


Over the last few weeks, we’ve identified a list of common questions that some of you’ve been asking. In this post, we'd like to share the answers with all of you.

AdSense Host API v3

- How do I set the AdSense login email and the AdSense login password of the application developer for a request to the API?

All requests sent to the AdSense Host API Web Services must include the following header elements:
Check our code examples to see how to include the headers for different languages and different types of requests.

- How do I handle the account confirmation email when I’m developing against the API Sandbox?

The AdSense Host API Sandbox is a replica of the production API services but with some additional support that helps developers test and debug their applications.

The production web services require that when a developer creates an account for a publisher, that publisher receives an email which asks them to go to a web page to perform various actions.

The Sandbox sends the email request to you, the developer (instead of the publisher), which lets you see the messages the publisher would have seen. However, the verification link in that email will not work, because the Sandbox doesn't have a replica of the AdSense website to which to take the publisher.

When developing against the Sandbox you can use the following special request headers to include zip, phone and approval settings that are normally requested of the publisher by email:

AdSense Management API

- How do I check the API usage statistics for my project?

You can check the usage statistics for a project in the API console under the "Reports" tab:



If the current usage is approaching the 10k daily limit, or you estimate that future usage will exceed it, you may request additional quota via the "Quotas" tab in the API console.

If you have any additional questions on these topics, please post on our forum or join one of our upcoming AdSense APIs Office Hours Hangouts.