Keyword Research Tool

Conduct Keyword Research for free with Google Ads API

Instead of using paid tools, conduct effective keyword research for SEO and PPC for free by utilising the Google Ads API and Google Sheets.

Did you know that Google Ads API allows you to conduct keyword research for free? There are plenty of online software, such as Ahrefs, Semrush, Ubersuggest, etc., with their own keyword generators, but they restrict the number of keyword ideas you can get for free.

Performing keyword research can be a challenge for beginners or those with a limited budget. With most tools costing at least $50-60 per month, it can be hard to justify the expense. However, you can still conduct effective keyword research for free by utilising the Google Ads API and Google Sheets.

After just 10 minutes (for initial set-up), you’ll have your own Keyword Research tool that you can use to generate thousands of keywords from just one seed keyword and get metrics, such as Avg. Monthly Searches, Search Trend over the past 12 months, Avg. CPC for the keyword, PPC Competition Index etc.


💡 Go to the Bonus Section for different use cases and visualisations


Google Sheet Setup:

1. Create a copy of the Google Sheet:

Create a copy of the Keyword Research Tool by clicking on the Make a copy button.

Copy of Keyword Research Tool Google Sheets

2. Get your Google Ads Customer ID:

To use the Google Ads API, you need to have a Google Ads account. If you don’t have one, just head to the Google Ads website and sign up.
For more instructions, head to the help section.

Once you’re done with that, just grab your Customer ID and paste it into the relevant cell in the Google Sheet so you can use it later.

You’ll find the Google Ads Customer ID in the top right corner of your Google Ads Account:

Google Ads Customer ID

It’ll be a 10-digit number in this format XXX-XXX-XXXX. Just paste this in the relevant cell without the dashes.


3. Install API Connector Add-on in the Google Sheet:

In the Google Sheet, go to Extensions -> Add-ons -> Get add-ons.

Google Sheet Add ons

Search for API Connector and install the one by Mixed Analytics.

💡 This post was published in March 2023, Mixed Analytics has since revised its pricing structure, restricting access to Google Ads oAuth to its business plan priced at $29 per month.

Google Sheets API Connector

4. Set Up the API Connector

4.1 Connect Google Ads OAuth

Run the connector, by going to Extensions -> API Connector -> Open. In the left Panel click on Create Request.


In the Configure API Request section, find Google Ads from the OAuth Dropdown menu, click on Connect and sign in using the same Gmail account that you use for Google Ads.


Make sure you give access to see, edit, create and delete your Google Ads Accounts and data. Tick this box (don’t worry we will not delete/edit anything in the Google Ads Account).


4.2 Configure API Request Section

Change Method to Post.


Under Request URL, insert the following:

https://googleads.googleapis.com/v12/customers/[YOUR_CUSTOMER_ID]:generateKeywordIdeas

Remember to replace [YOUR_CUSTOMER_ID] with your actual ID. So for instance, if your customer ID was: 123-456-7891. The request URL will be:

https://googleads.googleapis.com/v12/customers/1234567891:generateKeywordIdeas


For headers, use the following values:

key: content-type

value: application/json


Under the request body, copy and paste the following:

{"keywordPlanNetwork":"GOOGLE_SEARCH_AND_PARTNERS",
"keywordSeed":
{"keywords": ["+++Setup!C4+++"]},
"pageSize": +++Setup!C5+++,
"historicalMetricsOptions":{"includeAverageCpc":true}
}

Once you’re done, the Configure API Section will look like this:

API Request

5. Define Output Settings

In the destination sheet cell, put Response and cell A1. Your output settings should look like this:

Output Settings - API Connector

6. Name the Sheet and save the API Request

Give the request a name, e.g. Keyword Research and Click on save.

Keyword Research API Request

Congrats! You’re all done with the setup. Now let’s see how you can use the tool:


How to use the Keyword Research Tool:

To use the keyword Research Tool, just enter your keyword in the seed keyword cell, Open the API connector and click on Run.

In this example, I’m using “electronic bikes” as a seed keyword.


Analyse the results:

The result will appear in the Keyword Analysis sheet. The first 6 columns of the table are:

  1. Keywords: These are the keyword ideas that have been generated using the seed keyword that you provided.
  2. Average Monthly Searches: Avg. Monthly searches for the generated keyword.
  3. Competition: This competition refers to the competition for Pay-per-click ads on Google. The higher the competition, the more difficult it is to get a top sponsored position for the keyword.
  4. Competition Index: Scale from 1-100, representing the level of competition in PPC for the keyword.
  5. Average CPC: How much are companies paying on average for an ad for the generated keyword.
  6. Trend: A sparkling graph to show the search trend for the keyword over the past 12 months.

Keyword Research Tool Result

Let’s now look at different use cases for this:


Bonus Section: Use Cases

Use Case 1: Perform Keyword Research for PPC

Let’s say I want to run a PPC campaign on electronic scooters. From the results that I generated, I will select a few keywords that:

  1. Have a high Average Monthly Search Volume
  2. Have Low to medium competition
  3. The CPC for the keyword is not very expensive

To do this, I go through the keywords list, copy a few keyword rows (that I find relevant) and paste them into the visualisations sheet.


The bubble chart helps me understand which keywords I should focus on:

The bubbles on the left have low competition which means with less CPC and average ad quality factors, I can get a top sponsored position.

Keywords, such as hero electronic scooty, tvs electronic scooty and hero electronic bike have a high number of average monthly searches and low-medium CPC, so these keywords can be included in the campaign strategy.


Use Case 2: Perform SEO Keyword Research for Organic Content

After selecting a few keywords that have a high no. of average monthly searches, I want to know how hard it is to rank for them organically.

To find out keyword difficulty, I just use Ahref’s free Keyword Difficulty Checker. Let’s say I want to check the keyword difficulty for the keyword “hero electronic scooty”.

On running the keyword through the tool, I get an idea of how difficult it is to rank in the top 10 search results for the keyword and approximately how many backlinks I’ll need.

Another metric that you can analyse is the average CPC. If the avg. CPC is high, then the keywords might have high monetary value and might be worth ranking for. Even if they bring less traffic, the conversion rates might be high.


Use Case 3: Analyse Search Trends over the past 12 months

One effective approach to gaining insights into the search trend of your selected keywords and determining which ones to prioritize is by utilising a line chart. By plotting the search data over time, you can visualise how popular your keywords are in a given timeframe and determine whether there are any notable peaks or dips in interest. With this information, you can adjust your strategy accordingly and focus on the keywords that are most relevant to your goals.

To create a line chart, I copy the selected keywords, paste a transposed version and create a line chart.

From the line chart (below), I get an idea that avg. search volume for keywords, such as tvs electric bike and hero electronic bike is declining, so these might not be worth pursuing.


❗️ If you enter a new keyword and use the API again, the list of keywords will be automatically replaced. Please avoid deleting any content from the Keyword Analysis sheet because there are formulas in the sheet that you wouldn’t want to accidentally delete.

Nimit Kapoor photo

Nimit Kapoor

Digital Marketer and SEO specialist with 4 years of experience and a passion for helping businesses of all sizes grow their online presence through on-page and technical SEO. Nimit contributes his SEO expertise as a ghostwriter for Ahrefs, aiding fellow professionals in the field. As an independent consultant, he collaborates with small and medium-sized businesses, enabling them to achieve their growth objectives even with limited resources.

Comments

11 Responses

  1. Hi Nimit, thank you again for this lovely resource.

    Would it be possible to add to the sheet somehow a filter to choose language and country?
    Or could you share the value we should add to “request body” in order to filter country + language?

    Thank you for your help.

    Regards,
    Mark

    1. Hey Mark,

      Yes, it’s possible to target both a country and a language.

      To target a country, you can use update the request body to be like this:

      {"keywordPlanNetwork":"GOOGLE_SEARCH_AND_PARTNERS",
      "keywordSeed":
      {"keywords": ["+++Setup!C4+++"]},
      "pageSize": +++Setup!C5+++,
      "historicalMetricsOptions":{"includeAverageCpc":true},
      "geo_target_constants": ["geoTargetConstants/2158","geoTargetConstants/2392"]}

      You can find the geoTargetConstants here.

      To target languages, you can edit the response body like this:

      {"keywordPlanNetwork":"GOOGLE_SEARCH_AND_PARTNERS",
      "keywordSeed":
      {"keywords": ["+++Setup!C4+++"]},
      "pageSize": +++Setup!C5+++,
      "historicalMetricsOptions":{"includeAverageCpc":true},
      "language": "languageConstants/1018"}

      You can find the language constants here.
      Hope this helps.

      Cheers!
      Nimit

    2. Hi Mark,

      I tried connecting to Google Ads using the custom oAuth connection but the option is still greyed out. After seeing Mixed Analytics’ new plans, looks like they don’t allow any sort of oAuth connections in the free plan now (https://mixedanalytics.com/api-connector-pricing/).

      I’ll update this post soon with a either a new connector or I’ll write the app script myself (that might take a little longer).

      Cheers,
      Nimit

  2. Hello. Nimit.
    Thanks for sharing this amazing tool.
    If you don’t mind, can I share your tool and your posts on my blog?
    I will credit the source.

  3. If I press the Run button, the following error appears.
    Isn’t there a solution?

    1) Keyword Research: Completed with errors
    – We received an error from googleapis.com (400) show response

  4. Hi Nimit, first of all Happy new year!
    API Connector have upgraded their plan subscription, so setup has changed a little bit, but I believe it’s still possible to run your script with the free version using classic OAuth (not OAth2), but they ask for the following parameters, can you please help me with the values I should enter ?

    Authorization Base URL: / Token URL: / Client ID: /Client Secret:

    Huge thanks in advance.

  5. this is great! alas, the free version no longer works for me as the API is restricted.
    Quick questions:

    How does the volume you are showing compare with other sources like e.g. SEMrush, or Keywordplanner itself?

    Can you filter by region, eg. states in the USA?

    1. Hey Frank,

      Yes, unfortunately, Mixed Analytics decided to change its pricing model and now Google Ads oAuth is available only in the paid plans. Maybe they noticed that a lot of people are using it in the free plan and saw an opportunity to get some more paid subscribers.

      To answer your other questions:

      1. I would say SEMrush provides more in-depth analytics and is better for advanced users. This Google sheet template uses Google Ads API (it has the same data as keyword planner) to get the search volumes, CPC, Competition etc. It’s a good idea to use both tools to conduct your keyword analysis. If you have the marketing budget and can afford SEMrush subscription, you should use that as your go-to tool for keyword research but if you’re just starting out and want to use some free/cheap tools for a while, this google sheet should be more than sufficient.

      2. Yes, you can easily filter by region. Refer to my reply to Mark where I tell him how to target a country and language. You can pass the IDs of the region in geoTargetConstants. You can get the official list of geoTargetConstants from the Google Ads API documentation. They provide a csv file there.

      1. Thanks so much for the thorough response, Nimit. are there any other companes where the Google Ads oAuth is available? I see there are a few python scripts available and it seems google has a free API connector to sheets…will try this. Let us know if you come across an alternative! thanks !

Leave a Reply

Your email address will not be published. Required fields are marked *


Search