How to use OpenAI's GPT-3 for keyword research

Learn how to use Open AI and GPT-3 inside the spreadsheet to generate keywords, translate them, find common misspellings and more.

About OpenAI and GPT

OpenAI developed GPT, a type of artificial intelligence model that is capable of generating human-like text. It uses a machine learning technique called pre-training to learn the statistical patterns of a large dataset and then fine-tunes its knowledge on a smaller dataset to perform a specific task. It is trained on a dataset with billions of elements, including a significant part of the internet web pages, books, and more.

GPT can be used for a variety of language-based tasks, such as language translation, summarization, question answering, and text generation. It can generate coherent and coherently structured paragraphs, articles, and even entire books, given a prompt or topic. GPT can learn and adapt to new tasks quickly, making it a powerful tool for natural language processing.

NOTE: There are known limitations to these models and the output is not guaranteed to be factually accurate.

What is keyword research?

Keyword research is the process of identifying and analyzing the keywords and phrases that people use to find products, services, or information on the internet. The goal of keyword research is to identify the keywords that are most relevant to your business or website and to optimize your content and website to rank well in search engines for those keywords. This is particularly used in SEO or Performance Marketing activities.

How to use OpenAI in Rows

OpenAI template

There's a near-infinite amount of tasks you can solve using OpenAI. Follow this guide on how to set up the integration and use this template showcase to get started with 10 pre-built examples, follow along the list, or watch our video tutorial.

Using the ASK_OPENAI function

The OpenAI integration contains one function - ASK_OPENAI - that you can use to perform hundreds of tasks

You can use the ASK_OPENAI function via the Autocomplete in the editor, or via the Actions wizard.

ASK_OPENAI on the editor

The function has 4 parameters: 1 mandatory and 3 optional, with the following signature: ASK_OPENAI(prompt,[temperature], [max_tokens],[model]) prompt. Let's go one by one.


The prompt is the instruction to give to the model. This is where you'll enter the "ask" you want the AI to answer. You can use the prompt to solve a task by explicitly writing it in prose or you can use spreadsheet functions to concatenate values in different cells to construct the prompt. Examples:

  • Use =ASK_OPENAI("Population of France is, in millions, :") if you are not using any cell references inside the prompt.
  • Use =ASK_OPENAI(CONCATENATE("The population of ",A2," in millions, is: ")) if you're using A2 as an input (the country name) to the prompt.

Prompt creation with Concatenate

Temperature (optional)

The temperature is the sampling temperature to use, varying between 0 and 1. Use 1 for creative applications, and 0 for well-defined answers.

If you're doing tasks that require a factual answer (e.g. country populations, capitalize text), then 0 (the default) is a better fit. If you're using the AI for tasks where there aren't definite answers - such as generating text, summarizing text, or translating - then experiment with a higher temperature

Max_tokens (optional)

This max_tokens represents the maximum number of tokens to generate in the completion. You can think of tokens as pieces of words. Here are a few helpful rules of thumb examples from the Open AI Help center:

  • 1 token ~= 4 chars in English
  • 1 token ~= 3/4 words

You can use any number starting with 0. The default value is 200. Most models have a context length of 2048 tokens, except for the newest models which support a maximum of 4096. For tasks that require more text output - text generation/summarization/translation - pick a higher value (e.g. 250).

Model (optional)

The AI model to use to generate the answer. By default, it uses "text-davinci-003". You can see here a list of all of the available GPT-3 models.

Examples of ASK_OPENAI for keyword research

There are several ways to use OpenAI to automate keyword research tasks inside a spreadsheet:

  • Generate keywords: Generate keyword ideas based on a topic.
  • Generate variations of keywords: Generate new keywords based on a list of keywords.
  • Generate common misspellings of keywords: Generate keywords that represent the common typing errors users do when looking for your target keywords.
  • Translate keywords: Translate a list of keywords to several languages to capture traffic in multiple geographies.

Generate keywords

Goal: Generate keyword ideas based on a topic. Create separate lists for Informational., Transactional, Navigational and Commercial keywords.


1=ASK_OPENAI(CONCATENATE("Generate a list of 10 Informational keywords based on the topic of: ",A2))

Add new columns to the spreadsheet for different keyword types.

Details: Assumes that A2 contains the topic.

Generate keywords

💡 To expand the list of keyword ideas into different cells in the spreadsheet ask for a "JSON table" in the prompt. This way OpenAI will generate a data cell that you use to create a table in Rows.

1=ASK_OPENAI(CONCATENATE("Generate a JSON list of 10 Informational keywords based on the topic of Vegan dog food"))

Expand keywords in list

If the initial response does to include the full list, or if the response is an incomplete JSON object, try setting a large value in the max tokens parameter (e.g. 500).

Generate variations of keywords

Goal: Generate new keywords based on a list of keywords.


There are two steps to generate a variation of keywords:

  1. Creating a list with the keywords that will be used as a source.
  2. Using OpenAI to generate a new list of keywords.

Use RANGE2JSON to create a list with the first group of keywords. We'll use this formula inside the ASK_OPENAI prompt to generate the new list.


List of keywords

With the list of source keywords, we'll use OpenAI to generate the variations. We'll use the =RANGE2JSON(A1,A2:A) inside the prompt of the ASK_OPENAI formula:

1=ASK_OPENAI(CONCATENATE("Generate a JSON list with 10 new keywords based on this list: ",RANGE2JSON(A1,A2:A)))

Keyword variations

💡 Add a new table in the spreadsheet and move the OpenAI formula to keep the table with the keywords easier to read and use.


Generate common misspellings of keywords


Generate new keywords based on a list of keywords.


1=ASK_OPENAI(CONCATENATE("Generate a json list with 1 column with the most common misspellings of ",B1),,500)

💡 Tips on improving the results

  1. Set a value for the max_token parameter to ensure it returns the full list.
  2. Be specific on the number of columns you expect. By default, OpenAI will return a column with misspellings and another with the correction.



Assumes that the source keyword is in B1.

Translate keywords

Goal: Translate a list of keywords to several languages to capture traffic in multiple geographies.


1=ASK_OPENAI(CONCATENATE("Translate '",A2,"' to Spanish"))

Add new columns with the languages you want to translate to. In this example, we added additional columns for Japanese and Arabic.

Details: Assumes that A2 contains the keyword.

Translate keywords