Setup
Put them in your environment or
.env; Data APIs covers the other ways.
Notes
- Two credentials on every call: an OAuth access token for a user with access to the account, and the developer token of an approved manager account. A missing or unapproved developer token answers DEVELOPER_TOKEN_* errors, not 401.
- Google has no read-only Ads scope: the adwords scope can read and change everything the user can. The catalog lists only read endpoints; a mutate through vendor_request is still refused unless allow_writes is passed.
- Customer ids are digits only: strip the dashes the Ads UI shows (123-456-7890 -> 1234567890).
- Money is in MICROS of the account currency: divide cost_micros by 1,000,000.
- A test developer token only reaches test accounts; Basic access caps daily operations (see pricing_url).
Endpoints
List the Google Ads accounts your login can reach
- Ignores login-customer-id: it lists what the user reaches, not what a manager does.
Run a GAQL report on a Google Ads account
- A read over POST. Pages are a fixed 10,000 rows and pageSize is refused (PAGE_SIZE_NOT_SUPPORTED): bound the result with GAQL’s LIMIT.
- Field names in the answer are camelCase (metrics.costMicros) though the query writes them snake_case.
Run a GAQL report and get every row at once
- The answer is a JSON ARRAY of batches, each with its own results list, unlike every other call’s object.
Look up GAQL fields and resources
- Needs no customer id and no login-customer-id.
Get keyword ideas from Keyword Planner
- Bids are in micros. Accounts with no spend history get bucketed search volumes.
Get search volume and bids for a keyword list
- Close variants are merged, so fewer rows can come back than keywords were sent.