Entity gap SERP analysis with textrazor
Following the instructions in "Create Your First Python Script With ChatGPT" I generate a python code for google colab, that can be helpful to improve existing content for a certain keyword. I am amazed, how easy is to get code with chatgpt. Thanks for the advice!I
The prompt for generating the code is the following (change the Language in the serp search. Textrazor automatically detect language). The output could be better formated, but it is OK for me.
“Hello, ChatGPT. Please create a Python script for Google Collab that does the following:
1. User provides a URL, a keyword and an API key for TextRazor
2. Extract the entities with Textrazor python api, passing the url and analyzing clean html. Keep unique entities. Skip numerical entities.
3. Scrape google SERP for the keyword provided and get the top 20 urls for Spain in spanish. Skip pdfs and youtube videos. Skip also the user provided URL if it appears in the top 20 urls.
4. Extract the entities of those urls with Textrazor python api, passing the url list and analyzing clean html. For each webpage keep unique entities. Skip numerical entities.
5. Output the entities that appear in at least 3 pages from the top 20 urls and that are missing in the entities extracted from the url provided by the user. Sort the list of entities starting with entities that appear in more urls.
Please provide the full code.”
Feel free to try the code and made suggestions for improvements. Maybe pdfs could be analyzed too...
1
2 comments
Inaki Sainz
1
Entity gap SERP analysis with textrazor
AI SEO Academy
skool.com/ai-seo
Free AI SEO Course. 50+ custom workflows, agents, and modules to scale traffic, build authority, and get mentioned by LLMs.
Leaderboard (30-day)
Powered by