Google AdMob Ad Units API

The adUnits API from Google AdMob — 2 operation(s) for adunits.

Operations 3

GET /v1/accounts/{accountsId}/adUnits List the ad units under the specified AdMob account. #
POST /v1beta/accounts/{accountsId}/adUnits Creates an ad unit under the specified AdMob account #
GET /v1beta/accounts/{accountsId}/adUnits List the ad units under the specified AdMob account. #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/google-admob-adunits-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

google-admob-adunits-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Google Admob Ad Units API
  contact:
    name: Google
    url: https://developers.google.com/admob/api/
  license:
    name: Google APIs Terms of Service
    url: https://developers.google.com/terms
  termsOfService: https://developers.google.com/terms
  x-discovery-revision: '20260731'
  x-refined-note:
  - x-discovery-source differs across the merged source definitions and was not carried
  version: '1.0'
  description: 'Operations tagged adUnits across 2 of this provider''s published API definitions: google-admob-api-v1-openapi.yml, google-admob-api-v1beta-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://admob.googleapis.com
  description: Google AdMob API
security:
- GoogleOAuth2:
  - https://www.googleapis.com/auth/admob.readonly
  - https://www.googleapis.com/auth/admob.report
tags:
- name: adUnits
paths:
  /v1/accounts/{accountsId}/adUnits:
    get:
      operationId: accounts_adUnits_list
      summary: List the ad units under the specified AdMob account.
      description: List the ad units under the specified AdMob account.
      tags:
      - adUnits
      x-resource-name-parameter:
        parent:
          pattern: ^accounts/[^/]+$
          description: 'Required. Resource name of the account to list ad units for. Example: accounts/pub-9876543210987654'
      parameters:
      - name: pageSize
        in: query
        required: false
        schema:
          type: integer
          format: int32
        description: The maximum number of ad units to return. If unspecified or 0, at most 10,000 ad units will be returned. The maximum value is 20,000; values above 20,000 will be coerced to 20,000.
      - name: pageToken
        in: query
        required: false
        schema:
          type: string
        description: The value returned by the last `ListAdUnitsResponse`; indicates that this is a continuation of a prior `ListAdUnits` call, and that the system should return the next page of data.
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
        description: Path segment of the resource name.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAdUnitsResponse'
        '400':
          description: INVALID_ARGUMENT — malformed request, unknown publisher id, or incompatible report metrics/dimensions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
        '401':
          description: UNAUTHENTICATED — missing or invalid OAuth 2.0 access token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
        '403':
          description: PERMISSION_DENIED — AdMob API not enabled on the project, or the effective user lacks access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
        '429':
          description: RESOURCE_EXHAUSTED — per-project quota exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
        '500':
          description: INTERNAL — unexpected server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - GoogleOAuth2:
        - https://www.googleapis.com/auth/admob.readonly
    servers:
    - url: https://admob.googleapis.com
      description: Google AdMob API
  /v1beta/accounts/{accountsId}/adUnits:
    post:
      operationId: accounts_adUnits_create
      summary: Creates an ad unit under the specified AdMob account
      description: Creates an ad unit under the specified AdMob account. This method has limited access. If you see a 403 permission denied error, please reach out to your account manager for access.
      tags:
      - adUnits
      x-resource-name-parameter:
        parent:
          pattern: ^accounts/[^/]+$
          description: 'Required. Resource name of the account to create the specified ad unit for. Example: accounts/pub-9876543210987654'
      parameters:
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
        description: Path segment of the resource name.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AdUnit_2'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdUnit_2'
        '400':
          description: INVALID_ARGUMENT — malformed request, unknown publisher id, or incompatible report metrics/dimensions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
        '401':
          description: UNAUTHENTICATED — missing or invalid OAuth 2.0 access token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
        '403':
          description: PERMISSION_DENIED — AdMob API not enabled on the project, or the effective user lacks access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
        '429':
          description: RESOURCE_EXHAUSTED — per-project quota exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
        '500':
          description: INTERNAL — unexpected server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
    get:
      operationId: accounts_adUnits_list
      summary: List the ad units under the specified AdMob account.
      description: List the ad units under the specified AdMob account.
      tags:
      - adUnits
      x-resource-name-parameter:
        parent:
          pattern: ^accounts/[^/]+$
          description: 'Required. Resource name of the account to list ad units for. Example: accounts/pub-9876543210987654'
      parameters:
      - name: pageSize
        in: query
        required: false
        schema:
          type: integer
          format: int32
        description: The maximum number of ad units to return. If unspecified or 0, at most 10,000 ad units will be returned. The maximum value is 20,000; values above 20,000 will be coerced to 20,000.
      - name: pageToken
        in: query
        required: false
        schema:
          type: string
        description: The value returned by the last `ListAdUnitsResponse`; indicates that this is a continuation of a prior `ListAdUnits` call, and that the system should return the next page of data.
      - name: accountsId
        in: path
        required: true
        schema:
          type: string
        description: Path segment of the resource name.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAdUnitsResponse'
        '400':
          description: INVALID_ARGUMENT — malformed request, unknown publisher id, or incompatible report metrics/dimensions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
        '401':
          description: UNAUTHENTICATED — missing or invalid OAuth 2.0 access token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
        '403':
          description: PERMISSION_DENIED — AdMob API not enabled on the project, or the effective user lacks access to the resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
        '429':
          description: RESOURCE_EXHAUSTED — per-project quota exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
        '500':
          description: INTERNAL — unexpected server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleRpcStatus'
      security:
      - GoogleOAuth2:
        - https://www.googleapis.com/auth/admob.readonly
    servers:
    - url: https://admob.googleapis.com
      description: Google AdMob API
components:
  schemas:
    AdUnit:
      type: object
      description: Describes an AdMob ad unit.
      properties:
        appId:
          type: string
          description: 'The externally visible ID of the app this ad unit is associated with. Example: ca-app-pub-9876543210987654~0123456789'
        name:
          type: string
          description: 'Resource name for this ad unit. Format is accounts/{publisher_id}/adUnits/{ad_unit_id_fragment} Example: accounts/pub-9876543210987654/adUnits/0123456789'
        adTypes:
          type: array
          description: 'Ad media type supported by this ad unit. Possible values as follows: "RICH_MEDIA" - Text, image, and other non-video media. "VIDEO" - Video media.'
          items:
            type: string
        adUnitId:
          type: string
          description: 'The externally visible ID of the ad unit which can be used to integrate with AdMob. This is a read only property. Example: ca-app-pub-9876543210987654/0123456789'
        displayName:
          type: string
          description: The display name of the ad unit as shown in the AdMob UI, which is provided by the user. The maximum length allowed is 80 characters.
        adFormat:
          type: string
          description: 'AdFormat of the ad unit. Possible values are as follows: "APP_OPEN" - App Open ad format. "BANNER" - Banner ad format. "BANNER_INTERSTITIAL" - Legacy format that can be used as either banner or interstitial. This format can no longer be created but can be targeted by mediation groups. "INTERSTITIAL" - A full screen ad. Supported ad types are "RICH_MEDIA" and "VIDEO". "NATIVE" - Native ad format. "REWARDED" - An ad that, once viewed, gets a callback verifying the view so that a reward can be given to the user. Supported ad types are "RICH_MEDIA" (interactive) and video where video can not be excluded. "REWARDED_INTERSTITIAL" - Rewarded Interstitial ad format. Only supports video ad type. See https://support.google.com/admob/answer/9884467.'
    ListAdUnitsResponse:
      type: object
      description: Response for the ad units list request.
      properties:
        nextPageToken:
          type: string
          description: If not empty, indicates that there may be more ad units for the request; this value should be passed in a new `ListAdUnitsRequest`.
        adUnits:
          type: array
          description: The resulting ad units for the requested account.
          items:
            $ref: '#/components/schemas/AdUnit'
    GoogleRpcStatus:
      type: object
      description: Canonical Google API error envelope (google.rpc.Status), returned inside an `error` wrapper.
      properties:
        code:
          type: integer
          description: The status code, which should be an enum value of google.rpc.Code.
        message:
          type: string
          description: A developer-facing error message in English.
        status:
          type: string
          description: The canonical error reason, e.g. INVALID_ARGUMENT, RESOURCE_EXHAUSTED.
        details:
          type: array
          items:
            type: object
          description: A list of messages that carry the error details.
      x-source: Derived from Google's documented AdMob error responses at https://developers.google.com/admob/api/v1/errors; not present in the Discovery Document.
    AdUnit_2:
      type: object
      description: Describes an AdMob ad unit.
      properties:
        adUnitId:
          type: string
          description: 'The externally visible ID of the ad unit which can be used to integrate with AdMob. This is a read only property. Example: ca-app-pub-9876543210987654/0123456789'
        appId:
          type: string
          description: 'The externally visible ID of the app this ad unit is associated with. Example: ca-app-pub-9876543210987654~0123456789'
        displayName:
          type: string
          description: The display name of the ad unit as shown in the AdMob UI, which is provided by the user. The maximum length allowed is 80 characters.
        rewardSettings:
          $ref: '#/components/schemas/AdUnitRewardSettings'
        name:
          type: string
          description: 'Resource name for this ad unit. Format is accounts/{publisher_id}/adUnits/{ad_unit_id_fragment} Example: accounts/pub-9876543210987654/adUnits/0123456789'
        adTypes:
          type: array
          description: 'Ad media type supported by this ad unit. Possible values as follows: "RICH_MEDIA" - Text, image, and other non-video media. "VIDEO" - Video media.'
          items:
            type: string
        adFormat:
          type: string
          description: 'AdFormat of the ad unit. Possible values are as follows: "APP_OPEN" - App Open ad format. "BANNER" - Banner ad format. "BANNER_INTERSTITIAL" - Legacy format that can be used as either banner or interstitial. This format can no longer be created but can be targeted by mediation groups. "INTERSTITIAL" - A full screen ad. Supported ad types are "RICH_MEDIA" and "VIDEO". "NATIVE" - Native ad format. "REWARDED" - An ad that, once viewed, gets a callback verifying the view so that a reward can be given to the user. Supported ad types are "RICH_MEDIA" (interactive) and video where video can not be excluded. "REWARDED_INTERSTITIAL" - Rewarded Interstitial ad format. Only supports video ad type. See https://support.google.com/admob/answer/9884467.'
    AdUnitRewardSettings:
      type: object
      description: Settings for a rewarded ad unit.
      properties:
        unitType:
          type: string
          description: Reward item for this ad unit.
        unitAmount:
          type: string
          format: int64
          description: Reward amount for this ad unit.
  securitySchemes:
    GoogleOAuth2:
      type: oauth2
      description: Google OAuth 2.0 user authorization. AdMob does not support service accounts.
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/v2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/admob.readonly: See your AdMob data
            https://www.googleapis.com/auth/admob.report: See your AdMob data
externalDocs:
  description: AdMob API documentation
  url: https://developers.google.com/admob/api/
x-refined-from:
- google-admob-api-v1-openapi.yml
- google-admob-api-v1beta-openapi.yml