Creating content plan based on the people also ask with Python and ChatGPT

Written by: Frank

Publication date: 6 August 2024

Anno 2024, it is still not easy to find out data-driven search volume for long tail keywords. Keyword tools often leave you in the lurch and it often remains a guess what you want to bet on. Tracking search behavior based on the problems that the potential target audience encounters often gives a good impression, but it is not really data-driven. In this blog, I’m going to tell you how to build data-driven and automatic content plans based on the “people also ask. I’m giving away the script for free so you can get started with this yourself.

What is the people also ask and why is this ideal?

The “people also ask” section in Google is an element on the search results showing frequently asked questions. This element is not obtainable with structured data but arises organically. On almost every search, the ‘people also ask’ is almost visible which makes it ideal for scrapping.

Why use the people also ask

The “people also ask” is ideal because it strongly suggests that there is search volume on these specific questions. Google literally indicates that other people also asked these questions based on a previous (often relevant) search. This does not give a guarantee but we can assume that in many cases this is the case, practice also teaches us this.

Mensen vragen ook als basis van je strategie

For a client in the real estate industry, towards the end of 2023, I embarked on an SEO strategy based solely on “people also ask” queries. Without any further research, we went and emptied the SERP and collected these questions. We compiled these questions and used them as the basis of our strategy.

It soon became clear that there was a lot of search volume on this. So within a couple of months we saw a sharp increase in traffic and conversions. What was also interesting is that we were also increasing our rankings on more purchase-oriented terms for which we did not do optimizations. So answering these questions also helped build topical authority.

Automating content plan with Python

The nice thing about a programming language like Pyton is that we can use it to scrape the SERP. So for important keywords, we can scrape the ‘people also ask’ section to find out relevant queries. Something that is very powerful if you want to quickly generate a content plan

SERP scraping with Python

It all starts with collecting the keywords whose “people also ask” you want to scrape. For this, you can often use the keywords that emerged from the keyword research. By having Python collect the ‘people also ask’ questions from these keywords, you create at once a huge list of relevant questions that your target audience might come up with.

Clustering the questions

Once you have gathered the list of questions, you will notice that not every question is relevant. Unfortunately, the “people also ask” does not always show relevant questions. This is something best judged by yourself and fixed afterwards. However, you can use Python to aggregate similar questions so that you create just one piece of content that answers these questions.

In an earlier blog about automatically clustering keywords with Python, I talked about a script that can cluster keywords based on SERP similarity.This script can be easily reused to cluster queries so that you can generate a piece of content that answers all queries.

Automatic creation of a blog title

After you’ve clustered the questions, we can get to work generating an appropriate and all-encompassing blog title. An ideal task for ChatGPT. By showing ChatGPT the questions that mean roughly the same thing, we have the input it needs to come up with an overarching topic for this.

Using the ChatGPT API, we can also easily automate this part to avoid having to manually create a blog title for each group of questions. We can automatically send the data to ChatGPT through the API and also provide behavioral preferences for the model.

For example, we don’t want ChatGPT to generate an exaggerated blog title like it often does. We want to come up with an overarching but not overly creative title. By giving custom parameters with a different temperature, top P and presence penalty, we can make the model generate a less creative output. The temperature in particular has a positive effect on this.

Working of the script in easy language

Based on a self-defined list of keywords, the script scrapes the search results page through SerpAPI’s API. It collects the questions from the “people also ask” and generates a long list of keywords that we can use as questions to answer. Through my cluster script based on SERP similarity, we cluster the keywords. We then shoot the clustered queries to ChatGPT and ask for an overarching blog title. Through the parameters we can shoot along we make ChatGPT less creative. Then we have an output with a blog title and questions to answer in the blog.

Get started with the script yourself

If you want to automatically create your own content schedule based on the script use my Google Colab. You can easily upload your own list of keywords and then provide the script with the API of SerpAPI and ChatGPT. The script will create a complete content plan based on this and return it to you as output. If you have any questions or see additional additions, please feel free to send me a message.

About author

My career as an online marketer began broadly, but my passion for SEO eventually led me to found my own agency, Dificem, in 2019. After almost two years, I decided to further specialize in technical SEO at Bespoke Online, where I am now the point of contact for technical SEO issues. My interest in automation and AI, especially through the use of Python and ChatGPT, has greatly enhanced my work, which even gave me the opportunity to speak at BrightonSEO in 2024. In addition to my work, I am an avid traveler and marathon runner, regularly working from different countries as a digital nomad.

More about Frank

More blogs

Clustering keywords based on SERP similarity with Python

Clustering keywords based on SERP similarity with Python

Clustering keywords remains a task for many specialists that is time-consuming and, in most cases, not done well. Based on assumptions, they often look at which keywords could potentially match. This while clustering based on SERP similarity is more data driven and...

Structured data: the complete guide

Structured data: the complete guide

Structured data, adding context to a page so that search engines like Google will better understand your content and thus website. For many SEO specialists, structured data is a pain in the ass but for others, who cleverly exploit the possibilities of structured data,...

No Results Found

The page you requested could not be found. Try refining your search, or use the navigation above to locate the post.