Google AdSense Management API

The AdSense Management API allows publishers to access their inventory and run earnings and performance reports. It provides programmatic access to ad clients, ad units, custom channels, URL channels, payments, and reports.

Run with Naftiko GoogleAdsenseAPI

What You Can Do

GET
Listaccounts — Google AdSense Management List accounts
/v2/accounts
GET
Listadclients — Google AdSense Management List ad clients
/v2/{parent}/adclients
GET
Listadunits — Google AdSense Management List ad units
/v2/{parent}/adunits
GET
Generatereport — Google AdSense Management Generate report
/v2/{account}/reports:generate
GET
Listpayments — Google AdSense Management List payments
/v2/{parent}/payments

MCP Tools

listaccounts

Google AdSense Management List accounts

read-only idempotent
listadclients

Google AdSense Management List ad clients

read-only idempotent
listadunits

Google AdSense Management List ad units

read-only idempotent
generatereport

Google AdSense Management Generate report

read-only idempotent
listpayments

Google AdSense Management List payments

read-only idempotent

Capability Spec

google-adsense-capability.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Google AdSense Management API
  description: The AdSense Management API allows publishers to access their inventory and run earnings and performance reports.
    It provides programmatic access to ad clients, ad units, custom channels, URL channels, payments, and reports.
  tags:
  - Google
  - Adsense
  - API
  created: '2026-05-06'
  modified: '2026-05-06'
capability:
  consumes:
  - type: http
    namespace: google-adsense
    baseUri: https://adsense.googleapis.com
    description: Google AdSense Management API HTTP API.
    authentication:
      type: bearer
      token: '{{GOOGLE_ADSENSE_TOKEN}}'
    resources:
    - name: v2-accounts
      path: /v2/accounts
      operations:
      - name: listaccounts
        method: GET
        description: Google AdSense Management List accounts
        inputParameters:
        - name: pageSize
          in: query
          type: integer
        - name: pageToken
          in: query
          type: string
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: v2-parent-adclients
      path: /v2/{parent}/adclients
      operations:
      - name: listadclients
        method: GET
        description: Google AdSense Management List ad clients
        inputParameters:
        - name: parent
          in: path
          type: string
          required: true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: v2-parent-adunits
      path: /v2/{parent}/adunits
      operations:
      - name: listadunits
        method: GET
        description: Google AdSense Management List ad units
        inputParameters:
        - name: parent
          in: path
          type: string
          required: true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: v2-account-reports-generate
      path: /v2/{account}/reports:generate
      operations:
      - name: generatereport
        method: GET
        description: Google AdSense Management Generate report
        inputParameters:
        - name: account
          in: path
          type: string
          required: true
        - name: dateRange
          in: query
          type: string
        - name: metrics
          in: query
          type: array
        - name: dimensions
          in: query
          type: array
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: v2-parent-payments
      path: /v2/{parent}/payments
      operations:
      - name: listpayments
        method: GET
        description: Google AdSense Management List payments
        inputParameters:
        - name: parent
          in: path
          type: string
          required: true
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
  exposes:
  - type: rest
    port: 8080
    namespace: google-adsense-rest
    description: REST adapter for Google AdSense Management API.
    resources:
    - path: /v2/accounts
      name: listaccounts
      operations:
      - method: GET
        name: listaccounts
        description: Google AdSense Management List accounts
        call: google-adsense.listaccounts
        outputParameters:
        - type: object
          mapping: $.
    - path: /v2/{parent}/adclients
      name: listadclients
      operations:
      - method: GET
        name: listadclients
        description: Google AdSense Management List ad clients
        call: google-adsense.listadclients
        with:
          parent: rest.parent
        outputParameters:
        - type: object
          mapping: $.
    - path: /v2/{parent}/adunits
      name: listadunits
      operations:
      - method: GET
        name: listadunits
        description: Google AdSense Management List ad units
        call: google-adsense.listadunits
        with:
          parent: rest.parent
        outputParameters:
        - type: object
          mapping: $.
    - path: /v2/{account}/reports:generate
      name: generatereport
      operations:
      - method: GET
        name: generatereport
        description: Google AdSense Management Generate report
        call: google-adsense.generatereport
        with:
          account: rest.account
        outputParameters:
        - type: object
          mapping: $.
    - path: /v2/{parent}/payments
      name: listpayments
      operations:
      - method: GET
        name: listpayments
        description: Google AdSense Management List payments
        call: google-adsense.listpayments
        with:
          parent: rest.parent
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    port: 9090
    namespace: google-adsense-mcp
    transport: http
    description: MCP adapter for Google AdSense Management API for AI agent use.
    tools:
    - name: listaccounts
      description: Google AdSense Management List accounts
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: google-adsense.listaccounts
      with:
        pageSize: tools.pageSize
        pageToken: tools.pageToken
      inputParameters:
      - name: pageSize
        type: integer
        description: pageSize
      - name: pageToken
        type: string
        description: pageToken
      outputParameters:
      - type: object
        mapping: $.
    - name: listadclients
      description: Google AdSense Management List ad clients
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: google-adsense.listadclients
      with:
        parent: tools.parent
      inputParameters:
      - name: parent
        type: string
        description: parent
        required: true
      outputParameters:
      - type: object
        mapping: $.
    - name: listadunits
      description: Google AdSense Management List ad units
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: google-adsense.listadunits
      with:
        parent: tools.parent
      inputParameters:
      - name: parent
        type: string
        description: parent
        required: true
      outputParameters:
      - type: object
        mapping: $.
    - name: generatereport
      description: Google AdSense Management Generate report
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: google-adsense.generatereport
      with:
        account: tools.account
        dateRange: tools.dateRange
        metrics: tools.metrics
        dimensions: tools.dimensions
      inputParameters:
      - name: account
        type: string
        description: account
        required: true
      - name: dateRange
        type: string
        description: dateRange
      - name: metrics
        type: array
        description: metrics
      - name: dimensions
        type: array
        description: dimensions
      outputParameters:
      - type: object
        mapping: $.
    - name: listpayments
      description: Google AdSense Management List payments
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: google-adsense.listpayments
      with:
        parent: tools.parent
      inputParameters:
      - name: parent
        type: string
        description: parent
        required: true
      outputParameters:
      - type: object
        mapping: $.
binds:
- namespace: env
  keys:
    GOOGLE_ADSENSE_TOKEN: GOOGLE_ADSENSE_TOKEN