---
title: "POST /v23/customers/{+customerId}:generateKeywordHistoricalMetrics"
method: POST
path: "/v23/customers/{+customerId}:generateKeywordHistoricalMetrics"
tags: ["customers"]
---

# POST /v23/customers/{+customerId}:generateKeywordHistoricalMetrics

`POST /v23/customers/{+customerId}:generateKeywordHistoricalMetrics`

Returns a list of keyword historical metrics. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [CollectionSizeError]() [HeaderError]() [InternalError]() [QuotaError]() [RequestError]()

## Path parameters

- `customerId` string, required

## Request body

- GoogleAdsSearchads360V23ServicesGenerateKeywordHistoricalMetricsRequest — Request message for KeywordPlanIdeaService.GenerateKeywordHistoricalMetrics.
  - `geoTargetConstants` string[] — The resource names of the location to target. Maximum is 10. An empty list MAY be used to specify all targeting geos.
  - `keywords` string[] — A list of keywords to get historical metrics. Not all inputs will be returned as a result of near-exact deduplication. For example, if stats for "car" and "cars" are requested, only "car" will be returned. A maximum of 10,000 keywords can be used.
  - `aggregateMetrics` GoogleAdsSearchads360V23CommonKeywordPlanAggregateMetrics — The aggregate metrics specification of the request.
    - `aggregateMetricTypes` string[] — The list of aggregate metrics to fetch data.
  - `historicalMetricsOptions` GoogleAdsSearchads360V23CommonHistoricalMetricsOptions — Historical metrics options.
    - `includeAverageCpc` boolean — Indicates whether to include average cost per click value. Average CPC is provided only for legacy support.
    - `yearMonthRange` GoogleAdsSearchads360V23CommonYearMonthRange — The year month range inclusive of the start and end months. Eg: A year month range to represent Jan 2020 would be: (Jan 2020, Jan 2020).
      - `start` GoogleAdsSearchads360V23CommonYearMonth — Year month.
        - `year` string, int64 — The year (for example, 2020).
        - `month` 'UNSPECIFIED' | 'UNKNOWN' | 'JANUARY' | 'FEBRUARY' | 'MARCH' | 'APRIL' | 'MAY' | 'JUNE' | 'JULY' | 'AUGUST' | 'SEPTEMBER' | 'OCTOBER' | 'NOVEMBER' | 'DECEMBER' — The month of the year. (for example, FEBRUARY).
      - `end` GoogleAdsSearchads360V23CommonYearMonth — Year month.
        - `year` string, int64 — The year (for example, 2020).
        - `month` 'UNSPECIFIED' | 'UNKNOWN' | 'JANUARY' | 'FEBRUARY' | 'MARCH' | 'APRIL' | 'MAY' | 'JUNE' | 'JULY' | 'AUGUST' | 'SEPTEMBER' | 'OCTOBER' | 'NOVEMBER' | 'DECEMBER' — The month of the year. (for example, FEBRUARY).
  - `language` string — The resource name of the language to target. Each keyword belongs to some set of languages; a keyword is included if language is one of its languages. If not set, all keywords will be included.
  - `keywordPlanNetwork` 'UNSPECIFIED' | 'UNKNOWN' | 'GOOGLE_SEARCH' | 'GOOGLE_SEARCH_AND_PARTNERS' — Targeting network. If not set, Google Search And Partners Network will be used.
  - `includeAdultKeywords` boolean — If true, adult keywords will be included in response. The default value is false.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/searchads360.md) · [All operations](https://skmtc.net/google/apis/searchads360/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/searchads360/revisions/40d087435afd/schema)
