Authorize Requests
Stay organized with collections
Save and categorize content based on your preferences.
Every request your application sends
to the Google AMP URL API needs
to identify your application to Google.
Identify your application using the application's
API key.
Acquire and use an API key
An API key
must accompany requests to the Google AMP URL API for public data.
The API key identifies your project and provides API access, quota, and reports.
To acquire an API key, do the following:
- Open the Credentials page.
- Create and use a Server key.
Do not use this key outside of your server code.
For example, do not embed it in a web page.
To prevent quota theft,
restrict your key so that requests are only allowed
from your servers' source IP addresses.
To keep your API keys secure, follow the
best practices for securely using
API keys.
After you have an API key,
your application can append the query parameter
key=yourAPIKey
to all request URLs.
The API key is safe for embedding in URLs; it doesn't need any encoding.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-08-30 UTC.
[[["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 2023-08-30 UTC."],[[["Every request sent to the Google AMP URL API must identify your application using an API key."],["Obtain an API key through the Google Developers Console, specifically a Server key, and restrict its usage to your server's IP addresses for security."],["Include your API key in all request URLs as a query parameter (`key=yourAPIKey`), which is safe for embedding without encoding."]]],[]]