metadata + errors envelope:
code and a message. Some errors include additional details.
Error codes
Older API versions (
2024-01-01 and 2022-01-01) use a different error envelope: { success: false, code, message, fields }. The error codes above apply to the latest version (2026-05-25). See API versions for migration details.Handling errors
- Check
codeand handle each status explicitly. - For
RATE_LIMIT_EXCEEDED, retry with exponential backoff. - For
UNAUTHORIZED, verify your bearer token (orapi-key/x-api-keyheader) and that the key belongs to the Google News API product workspace. - For
FORBIDDEN, confirm your plan covers the requested API version.