Estimate Google Ads cost per click

Changed on

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Estimates what one click costs for a landing page in a set of locations, so you can turn a daily budget into a click range before a campaign exists.

Google publishes no click forecast for a Performance Max campaign before it launches, so this answers a narrower question. Base44 asks Google's keyword planner for the keyword ideas it derives from landing_page, averages the top-of-page bid range over up to 10 of them, and takes 60% of that range, because a click usually costs less than the top-of-page bid. Divide a daily budget by cpc_high_micros and cpc_low_micros for the click range. Both are in the account's budget currency, so no conversion is needed. To forecast a Smart campaign from its keyword themes instead, use Estimate a Google Ads campaign budget.

A sample_size of 0, with both figures 0, means Google had no keyword ideas it could price. Treat that as no estimate, not as free clicks.

The app needs a connected Google Ads account that has finished provisioning. An account with no Google customer ID yet, and a landing_page that is not an http or https URL, are rejected with a 400 before anything reaches Google. Nothing is saved and nothing is spent on ads.

This is limited to 30 requests a minute per app. Some workspaces have a different limit. It is refused with a 409 while the workspace is on a Google Ads billing hold.

<Note>This endpoint accepts a personal API key from anyone who can edit the app. A read-only key is refused with a 403, and so are workspace API keys.</Note>

post/api/apps/{app_id}/google-ads/campaigns/cpc-estimate

Request

  • Base URL: https://app.base44.com
  • URL: https://app.base44.com/api/apps/{app_id}/google-ads/campaigns/cpc-estimate
  • Auth: HTTP bearer

Path parameters

app_idstring required

ID of the app you are planning a Google Ads campaign for.

Request body

landing_pagestring

Page the campaign sends clicks to, as an http or https URL. Google derives the keyword ideas it prices from this page. Required: anything else is rejected with a 400.

geo_targetsstring[]

Locations to price clicks in, as Google geo target constant IDs (geoTargetConstants/1023191, or just 1023191). When you send more than 10, only 10 of them are priced, always the same 10 for the same set. Leave it empty to price all locations. If Google's keyword planner rejects the locations you send, the estimate covers all locations instead of failing.

language_codestring nullable

Two-letter code of the language the ads run in, which picks the keyword market. A regional tag like pt-BR is reduced to pt, and a missing or unsupported code prices in English. List Google Ads advertising languages returns the supported codes.

Example request

{
  "landing_page": "https://example.com/furniture",
  "geo_targets": [
    "1023191"
  ],
  "language_code": "en"
}

Response

The estimated cost of one click.

cpc_low_microsinteger required

Low end of the estimated cost of one click, in micros of currency_code, so 850000 is 0.85. 0 when there is no estimate.

cpc_high_microsinteger required

High end of the estimated cost of one click, in micros of currency_code. 0 when there is no estimate.

currency_codestring required

Currency of both figures as a three-letter ISO 4217 code. It is the account's Google Ads budget currency, the same one campaign budgets are set in.

sample_sizeinteger required

How many of Google's keyword ideas the range is averaged over, at most 10. 0 means Google returned none it could price, so there is no estimate.

Example response

{
  "cpc_low_micros": 850000,
  "cpc_high_micros": 2400000,
  "currency_code": "USD",
  "sample_size": 10
}

Changes