# AdSense Host API API

> AdSense Host API API on Apizie: 26 endpoints (Get information about the selected associated AdSense account., List hosted accounts associated with this AdSense account by ad client id., Get information about one of the ad clients in the specified publisher's AdSense account., List all hosted ad clients in the specified hosted account., …) returned as clean JSON through one API key. Send your own provider key in the x-upstream-key header. Call it over REST at https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

- Project key: `analytics:googleapis-adsensehost`
- Category: Analytics
- Status: byok
- Source: https://developers.google.com/adsense/host/
- Page: https://zieapi.vercel.app/api/analytics/googleapis-adsensehost
- OpenAPI: https://zieapi.vercel.app/api/analytics/googleapis-adsensehost/openapi.json

Generates performance reports, generates ad codes, and provides publisher management capabilities for AdSense Hosts.

## Endpoints

### Get information about the selected associated AdSense account.
`GET https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-accounts-get` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| accountId | string | yes | Account to get information about. |

### List hosted accounts associated with this AdSense account by ad client id.
`GET https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-accounts-list` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| filterAdClientId | string | yes | Ad clients to list accounts for. |

### Get information about one of the ad clients in the specified publisher's AdSense account.
`GET https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-accounts-adclients-get` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| accountId | string | yes | Account which contains the ad client. |
| adClientId | string | yes | Ad client to get. |

### List all hosted ad clients in the specified hosted account.
`GET https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-accounts-adclients-list` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| accountId | string | yes | Account for which to list ad clients. |
| maxResults | integer | no | The maximum number of ad clients to include in the response, used for paging. |
| pageToken | string | no | A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from… |

### Get the specified host ad unit in this AdSense account.
`GET https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-accounts-adunits-get` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| accountId | string | yes | Account which contains the ad unit. |
| adClientId | string | yes | Ad client for which to get ad unit. |
| adUnitId | string | yes | Ad unit to get. |

### Delete the specified ad unit from the specified publisher AdSense account.
`POST https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-accounts-adunits-delete` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| accountId | string | yes | Account which contains the ad unit. |
| adClientId | string | yes | Ad client for which to get ad unit. |
| adUnitId | string | yes | Ad unit to delete. |

### Get ad code for the specified ad unit, attaching the specified host custom channels.
`GET https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-accounts-adunits-get-ad-code` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| accountId | string | yes | Account which contains the ad client. |
| adClientId | string | yes | Ad client with contains the ad unit. |
| adUnitId | string | yes | Ad unit to get the code for. |
| hostCustomChannelId | string | no | Host custom channel to attach to the ad code. |

### List all ad units in the specified publisher's AdSense account.
`GET https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-accounts-adunits-list` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| accountId | string | yes | Account which contains the ad client. |
| adClientId | string | yes | Ad client for which to list ad units. |
| includeInactive | boolean | no | Whether to include inactive ad units. Default: true. |
| maxResults | integer | no | The maximum number of ad units to include in the response, used for paging. |
| pageToken | string | no | A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from… |

### Insert the supplied ad unit into the specified publisher AdSense account.
`POST https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-accounts-adunits-insert` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| accountId | string | yes | Account which will contain the ad unit. |
| adClientId | string | yes | Ad client into which to insert the ad unit. |
| body | object | yes | JSON request body |

### Update the supplied ad unit in the specified publisher AdSense account.
`POST https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-accounts-adunits-update` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| accountId | string | yes | Account which contains the ad client. |
| adClientId | string | yes | Ad client which contains the ad unit. |
| body | object | yes | JSON request body |

### Update the supplied ad unit in the specified publisher AdSense account. This method supports patch semantics.
`POST https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-accounts-adunits-patch` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| accountId | string | yes | Account which contains the ad client. |
| adClientId | string | yes | Ad client which contains the ad unit. |
| adUnitId | string | yes | Ad unit to get. |
| body | object | yes | JSON request body |

### Generate an AdSense report based on the report request sent in the query parameters. Returns the result as…
`GET https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-accounts-reports-generate` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| accountId | string | yes | Hosted account upon which to report. |
| dimension | string | no | Dimensions to base the report on. |
| endDate | string | yes | End of the date range to report on in "YYYY-MM-DD" format, inclusive. |
| filter | string | no | Filters to be run on the report. |
| locale | string | no | Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. |
| maxResults | integer | no | The maximum number of rows of report data to return. |
| metric | string | no | Numeric columns to include in the report. |
| sort | string | no | The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort… |
| startDate | string | yes | Start of the date range to report on in "YYYY-MM-DD" format, inclusive. |
| startIndex | integer | no | Index of the first row of report data to return. |

### Get information about one of the ad clients in the Host AdSense account.
`GET https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-adclients-get` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| adClientId | string | yes | Ad client to get. |

### List all host ad clients in this AdSense account.
`GET https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-adclients-list` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| maxResults | integer | no | The maximum number of ad clients to include in the response, used for paging. |
| pageToken | string | no | A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from… |

### Create an association session for initiating an association with an AdSense user.
`GET https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-associationsessions-start` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| callbackUrl | string | no | The URL to redirect the user to once association is completed. It receives a token parameter that can then be used to retrieve the… |
| productCode | string | yes | Products to associate with the user. |
| userLocale | string | no | The preferred locale of the user. |
| websiteLocale | string | no | The locale of the user's hosted website. |
| websiteUrl | string | yes | The URL of the user's hosted website. |

### Verify an association session after the association callback returns from AdSense signup.
`GET https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-associationsessions-verify` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| token | string | yes | The token returned to the association callback URL. |

### Get a specific custom channel from the host AdSense account.
`GET https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-customchannels-get` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| adClientId | string | yes | Ad client from which to get the custom channel. |
| customChannelId | string | yes | Custom channel to get. |

### Delete a specific custom channel from the host AdSense account.
`POST https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-customchannels-delete` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| adClientId | string | yes | Ad client from which to delete the custom channel. |
| customChannelId | string | yes | Custom channel to delete. |

### List all host custom channels in this AdSense account.
`GET https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-customchannels-list` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| adClientId | string | yes | Ad client for which to list custom channels. |
| maxResults | integer | no | The maximum number of custom channels to include in the response, used for paging. |
| pageToken | string | no | A continuation token, used to page through custom channels. To retrieve the next page, set this parameter to the value of "nextPageToken"… |

### Add a new custom channel to the host AdSense account.
`POST https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-customchannels-insert` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| adClientId | string | yes | Ad client to which the new custom channel will be added. |
| body | object | yes | JSON request body |

### Update a custom channel in the host AdSense account.
`POST https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-customchannels-update` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| adClientId | string | yes | Ad client in which the custom channel will be updated. |
| body | object | yes | JSON request body |

### Update a custom channel in the host AdSense account. This method supports patch semantics.
`POST https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-customchannels-patch` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| adClientId | string | yes | Ad client in which the custom channel will be updated. |
| customChannelId | string | yes | Custom channel to get. |
| body | object | yes | JSON request body |

### Generate an AdSense report based on the report request sent in the query parameters. Returns the result as…
`GET https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-reports-generate` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| dimension | string | no | Dimensions to base the report on. |
| endDate | string | yes | End of the date range to report on in "YYYY-MM-DD" format, inclusive. |
| filter | string | no | Filters to be run on the report. |
| locale | string | no | Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. |
| maxResults | integer | no | The maximum number of rows of report data to return. |
| metric | string | no | Numeric columns to include in the report. |
| sort | string | no | The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort… |
| startDate | string | yes | Start of the date range to report on in "YYYY-MM-DD" format, inclusive. |
| startIndex | integer | no | Index of the first row of report data to return. |

### Delete a URL channel from the host AdSense account.
`POST https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-urlchannels-delete` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| adClientId | string | yes | Ad client from which to delete the URL channel. |
| urlChannelId | string | yes | URL channel to delete. |

### List all host URL channels in the host AdSense account.
`GET https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-urlchannels-list` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| adClientId | string | yes | Ad client for which to list URL channels. |
| maxResults | integer | no | The maximum number of URL channels to include in the response, used for paging. |
| pageToken | string | no | A continuation token, used to page through URL channels. To retrieve the next page, set this parameter to the value of "nextPageToken"… |

### Add a new URL channel to the host AdSense account.
`POST https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-urlchannels-insert` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| adClientId | string | yes | Ad client to which the new URL channel will be added. |
| body | object | yes | JSON request body |

## Example
```
curl "https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-accounts-get" \
  -H "x-api-key: $APIZIE_KEY" \
  -H "x-upstream-key: $PROVIDER_KEY"
```

## FAQ

### How do I call the AdSense Host API API?
Create a free Apizie key, then send GET https://zieapi.vercel.app/v1/analytics:googleapis-adsensehost/adsensehost-accounts-get with the header x-api-key. Every endpoint returns { project, data, timestamp }.

### Is the AdSense Host API API free on Apizie?
Yes. The Free plan includes 1,000 requests a month at 100 requests a minute, no credit card. AdSense Host API itself also needs your own key from googleapis.com.

### Can AI agents use the AdSense Host API API?
Yes. Add the Apizie MCP server (https://zieapi.vercel.app/mcp) to Claude, ChatGPT, Cursor or VS Code, then ask in plain language. The agent calls run_scraper with project key analytics:googleapis-adsensehost.

### What is the status of the AdSense Host API API?
Needs your own provider key (bring your own key)
