Outbound services, such as the URL Fetch, Sockets, and Mail APIs, make use of a large pool of IP addresses. The IP address ranges in this pool are subject to routine changes. In fact, two sequential API calls from the same application may appear to originate from two different IP addresses.
You can find the current IP address ranges for your App Engine services based on IP range information that Google publishes:
Google publishes the complete list of IP ranges that it makes available to users on the internet in goog.json.
Google also publishes a list of global and regional external IP addresses ranges available for customers' Google Cloud resources in cloud.json.
The IP addresses used by Google APIs and services fit
within the list of ranges computed by taking away all ranges in cloud.json
from those in goog.json
. These lists are updated frequently.
You can use the following Python script to create a list of IP address ranges that include those used by Google APIs and services.
For information about running this script, see How to run.