Leveraging AI for in-Bulk Keyword Research in Aged Care (and in any other industry)
One of the key aspects of SEO is identifying the right keywords to target for better search visibility. In this article, we will explore how AI can be used to source unique keywords for aged care (and other industries) through the OpenAI API and Google Sheets.
The Power of AI in Keyword Research
Traditional keyword research tools like Google Ads Keyword Planner provide a wealth of information, but they can sometimes miss out on niche, low-search volume keywords that can still drive relevant traffic.
By leveraging AI, we can uncover those unique search terms that cater to specific information-seeking or problem-solving queries.
Using ChatGPT for Keyword Research
While ChatGPT is a powerful AI language model, it does come with certain limitations.
For instance, there are token limits that prevent users from generating thousands of search queries at once.
However, it is still possible to generate a few hundred unique search terms on specific topics. Let’s see how it goes when we ask ChatGPT 4 to generate search queries about the following topic:
- “Australian age care facilities comparison”
All these suggestions are great, but by default, GPT4 is limiting the number of search queries to 20 only.
We could ask ChatGPT to keep going with new suggestions, but wouldn’t it be much better to have all this directly generated into a Google Sheet?
Bulk Keyword Generation with Google Sheets and OpenAI API
Thanks to Google Apps Scripts, we can tap into OpenAI data via API, from a Google Sheet, to generate keyword ideas in bulk. The video below shows what should be the outcome:
You can get ChatGPT to help you build the Apps Scripts you need. Here is the one I used:
const OPENAI_API_KEY = “[Insert API Key Here]”;
const OPENAI_API_URL = “https://api.openai.com/v1/chat/completions”;
//Function to create a custom menu
function onOpen() {
const ui = SpreadsheetApp.getUi();
ui.createMenu(‘Custom AI Menu’)
.addItem(‘Run AI Keyword Research’, ‘runAIKeywordResearch’)
.addToUi();
}
//function to retrieve active sheet and selected cells
function getSelectedCellCount() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
const selectedRange = sheet.getActiveRange();
const numRows = selectedRange.getNumRows();
const numCols = selectedRange.getNumColumns();
return numRows * numCols;
}
//function to call the AI and to send the prompt
function runAIKeywordResearch() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
const selectedRange = sheet.getActiveRange();
const numRows = selectedRange.getNumRows();
const numCols = selectedRange.getNumColumns();
const storageSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(‘ConversationHistory’);
if (!storageSheet) {
SpreadsheetApp.getActiveSpreadsheet().insertSheet(‘ConversationHistory’);
}
let previousResponses = loadPreviousResponses();
let i = 0;
let j = 0;
function getNextResponse() {
let response = openAI(“next”, previousResponses);
if (response.startsWith(“Error:”)) {
Logger.log(“Error occurred:”, response);
return;
}
selectedRange.getCell(i + 1, j + 1).setValue(response);
previousResponses.push({role: “assistant”, content: response});
savePreviousResponses(previousResponses);
j++;
if (j >= numCols) {
j = 0;
i++;
}
if (i < numRows) {
Utilities.sleep(2000);
getNextResponse();
}
}
getNextResponse();
}
function loadPreviousResponses() {
const storageSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(‘ConversationHistory’);
const lastRow = storageSheet.getLastRow();
if (lastRow < 1) {
return [];
}
const storedData = storageSheet.getRange(1, 1, lastRow, 2).getValues();
return storedData.map(row => {
return {
role: row[0],
content: row[1]
};
});
}
function openAI(textIn, conversationHistory) {
const requestBody = {
“model”: “gpt-4”,
“messages”: [
{“role”: “system”, “content”: “You are an AI language model designed to help users identify unique search queries related to a specified topic, in this case: Australian age care facilities. Your goal is to generate search queries that are not commonly found in tools like Google Ads Keyword Planner. Focus on generating specific, problem-solving, or informational queries that have low search volume according to third-party tools but are likely to be typed into Google. Avoid broad questions and search queries that can be easily thought of by humans. Use the conversation history and the given prompt to ensure the uniqueness of each search query. Do not include any quote in your response, just plain text keywords are requested”},
…conversationHistory,
{“role”: “user”, “content”: textIn}
],
“temperature”: 0.2,
“max_tokens”: 2048
};
const options = {
“method”: “post”,
“headers”: {
“Content-Type”: “application/json”,
“Authorization”: “Bearer ” + OPENAI_API_KEY
},
“payload”: JSON.stringify(requestBody),
“muteHttpExceptions”: false
};
try {
const response = UrlFetchApp.fetch(OPENAI_API_URL, options);
const responseJson = JSON.parse(response.getContentText());
if (responseJson.choices && responseJson.choices.length > 0) {
Logger.log(responseJson.choices[0].message.content);
return responseJson.choices[0].message.content;
} else {
return “Error: No response from OpenAI API.”;
}
}
catch (error) {
Logger.log(“Error:”, error.message);
return “Error: ” + error.message;
}
}
function savePreviousResponses(previousResponses) {
const storageSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(‘ConversationHistory’);
storageSheet.clear();
const dataToStore = previousResponses.map(response => [response.role, response.content]);
storageSheet.getRange(1, 1, dataToStore.length, 2).setValues(dataToStore);
}
What the script does in essence is:
- Checking the selected slides in the active sheet to determine how many keywords it will need to return.
- Asking GPT4 to generate unique keywords ideas
- Saving all the keyword ideas generated into a separate sheet (to avoid duplicates)
- Specifying in the prompt the previous keywords generated and the type of topic that needs to be targeted.
A great feature to add would be to turn the topic into a dynamic variable based on the table header. But I’ll add that later.
If I want to, I can delete all these keywords to keep my sheet clean, because, all the queries generated are stored in another tab:
This is how the ConversationHistory tab, where all my queries are stored, looks like:
I can easily add a third column with the topic that was used to generate all these queries. I can also add this to the Apps Scripts as another feature.
The current limitations
- We have to have a 2 seconds delay between each prompt because Google Sheets is not fast enough to record all the previous keywords generated. So it takes a long time to generate hundreds of search queries at once.
- We are limited in the number of API tokens we can use for each prompt. In total, it seems that we can’t generate much more than 200 search queries by specific topic.
- We must focus on very specific topics and ask the AI to generate only unique and uncommon search queries, the type of queries you would not find with a tool like Ahrefs.
What do we do with all these keywords then?
If you wish to build content on your website around a particular topic to increase your organic traffic and support pages that are targeting high-competition keywords, it is important to cover as much as possible all the aspects of the targeted topic.
The more content you have around one particular topic, the more you will be treated by Google as the expert to rank at the top for all questions related to this topic.
In this particular case, we have search queries related to the topic “Australian age care facilities comparison”, which is a very narrow topic, and I have now 151 different low-competition keywords. What we want next is to get the AI to propose a content strategy to cover all these keywords with our content.
Thanks to the prompt above, GPT4 proposed this first page to be created:
And I can ask it to build the next page within its content strategy:
In total ChatGPT has been able to generate 160 different content ideas, which is more than the total number of keywords we provided to the AI.
Some filtering could be helpful to prioritise the most critical pages to build to cover the initial topic, but most of these pages are covering aspects of an Aged Care Facility that people want to know more about.
We could ask the AI to group some of these pages into larger and broader pages to reduce the list.
But it is remarkable to see that in just a few minutes, thanks to in-bulk keyword research, we have a highly comprehensive content strategy to work on for weeks or months.
Here is the full list of pages suggested by ChatGPT:
Australian Age Care Facility Outdoor Activity Options
Age Care Facility Volunteer Opportunities in Australia
Australian Age Care Facility Respite Care Options
Australian Age Care Facility Mental Health Suport Services
Age Care Facility End-of-Life Care in Australia
Australian Age Care Facility Infection Control Measures
Australian Age Care Facility Accreditation Process
Australian Age Care Facility Staff Qualifications
Australian Age Care Facility Alternative Therapies
Australian Age Care Facility LGBTQ+ Inclusivity Programs
Australian Age Care Facility Financial Assistance Options
Age Care Facility Transport Services in Australia
Australian Age Care Facility Sensory Garden Benefits
Australian Age Care Facility Falls Prevention Strategies
Australian Age Care Facility Medication Management Systems
Australian Age Care Facility Language Support Services
Australian Age Care Facility Family Involvement Programs
Australian Age Care Facility Art Therapy Benefits
Australian Age Care Facility Emergency Preparedness Plans
Australian Age Care Facility Virtual Tour Tips
Australian Age Care Facility Adaptive Equipment Options
Australian Age Care Facility Music Therapy Benefits
Australian Age Care Facility Hydrotherapy Benefits
Australian Age Care Facility Religious Services Availability
Australian Age Care Facility Cognitive Stimulation Activities
Australian Age Care Facility Sustainable Practices
Australian Age Care Facility Palliative Care Approach
Australian Age Care Facility Intergenerational Interaction Benefits
Australian Age Care Facility Veterans Support Services
Australian Age Care Facility Personalized Care Plans
Australian Age Care Facility Sensory Room Benefits
Australian Age Care Facility Staff Retention Strategies
Australian Age Care Facility Culturally Diverse Menu Options
Australian Age Care Facility Communication Boards Usage
Australian Age Care Facility Reminiscence Therapy Benefits
Australian Age Care Facility Physical Therapy Success Rates
Australian Age Care Facility Adaptive Clothing Options
Australian Age Care Facility Specialized Memory Care Programs
Australian Age Care Facility Staff Training on Elder Abuse Prevention
Australian Age Care Facility Resident Rights and Responsibilities
Australian Age Care Facility Gardening Therapy Benefits
Australian Age Care Facility Holistic Wellness Programs
Australian Age Care Facility Transition Support Services
Australian Age Care Facility Personalized Activity Programs
Australian Age Care Facility Security Measures and Protocols
Australian Age Care Facility Bilingual Staff Availability
Australian Age Care Facility Resident Council Involvement
Australian Age Care Facility Case Management Services
Australian Age Care Facility Social Work Support Services
Australian Age Care Facility Adaptive Technology Usage
Australian Age Care Facility Cultural Events and Celebrations
Australian Age Care Facility Sleep Hygiene Practices
Australian Age Care Facility Pain Management Techniques
Australian Age Care Facility Dental Care Services
Australian Age Care Facility Podiatry Services Availability
Australian Age Care Facility Vision Care Services
Australian Age Care Facility Hearing Care Services
Australian Age Care Facility Speech Therapy Services
Australian Age Care Facility Mobility Aid Options
Australian Age Care Facility Continence Management Programs
Australian Age Care Facility Dietary Restrictions Accommodations
Australian Age Care Facility Outdoor Safety Measures
Australian Age Care Facility Resident Privacy Policies
Australian Age Care Facility Advanced Care Planning Support
Australian Age Care Facility Personalized Room Decoration Options
Australian Age Care Facility Hairdressing Services On-site
Australian Age Care Facility Support Groups for Families
Australian Age Care Facility Emotional Support Animal Policies
Australian Age Care Facility Telehealth Services Availability
Australian Age Care Facility Wheelchair Accessibility Features
Australian Age Care Facility Adaptive Utensils Options
Australian Age Care Facility Resident Monitoring Technology
Australian Age Care Facility Robotic Assistance Benefits
Australian Age Care Facility Cultural Competency Training Outcomes
Australian Age Care Facility Aromatherapy Benefits
Australian Age Care Facility Resident Grievance Resolution Process
Australian Age Care Facility Staff Burnout Prevention Strategies
Australian Age Care Facility Meal Delivery Options
Australian Age Care Facility Resident Tracking Systems
Australian Age Care Facility Staff Background Check Process
Australian Age Care Facility Personalized Exercise Programs
Australian Age Care Facility Ethical Sourcing Practices
Australian Age Care Facility Language Interpretation Services
Australian Age Care Facility Staff Vaccination Policies
Australian Age Care Facility Resident Engagement Strategies
Australian Age Care Facility Indoor Air Quality Improvements
Australian Age Care Facility Emergency Call System Features
Australian Age Care Facility Spiritual Care Services
Australian Age Care Facility Resident Socialization Opportunities
Australian Age Care Facility Cultural Celebration Calendar
Australian Age Care Facility Staff Wellness Programs
Australian Age Care Facility Resident Bill of Rights
Australian Age Care Facility Resident Empowerment Initiatives
Australian Age Care Facility Life Enrichment Coordinator Role
Australian Age Care Facility Personalized Nutrition Plans
Australian Age Care Facility Staff Performance Evaluation Process
Australian Age Care Facility Resident Safety Audits
Australian Age Care Facility Staff Mentoring Programs
Australian Age Care Facility Resident Satisfaction Surveys
Australian Age Care Facility Adaptive Furniture Options
Australian Age Care Facility Staff Cultural Awareness Training
Australian Age Care Facility Resident-Centered Care Approach
Australian Age Care Facility Environmental Sustainability Initiatives
Australian Age Care Facility Staff Conflict Resolution Training
Australian Age Care Facility Resident Goal-Setting Support
Australian Age Care Facility Resident Mobility Assessment Tools
Australian Age Care Facility Staff Self-Care Strategies
Australian Age Care Facility Resident Life Story Documentation
Australian Age Care Facility Resident Emergency Contact Protocols
Australian Age Care Facility Staff Team Building Activities
Australian Age Care Facility Resident Evacuation Plans
Australian Age Care Facility Staff Diversity and Inclusion Initiatives
Australian Age Care Facility Resident Medication Reminder Systems
Australian Age Care Facility Resident Allergy Management Plans
Australian Age Care Facility Staff Stress Management Techniques
Australian Age Care Facility Resident Orientation Programs
Australian Age Care Facility Resident Hydration Strategies
Australian Age Care Facility Staff Recognition Programs
Australian Age Care Facility Resident Outing Planning Tips
Australian Age Care Facility Resident Personal Belongings Insurance Options
Australian Age Care Facility Resident Daily Routine Customization
Australian Age Care Facility Resident Privacy Training for Staff
Australian Age Care Facility Resident Voting Assistance
Australian Age Care Facility Resident Transportation Scheduling Tips
Australian Age Care Facility Resident Room Customization Options
Australian Age Care Facility Resident Social Media Guidelines
Australian Age Care Facility Resident Medication Storage Safety
Australian Age Care Facility Resident Fire Safety Education
Australian Age Care Facility Resident Online Communication Tools
Australian Age Care Facility Resident Personal Emergency Response Systems
Australian Age Care Facility Resident Adaptive Communication Devices
Australian Age Care Facility Resident Fall Risk Assessment Tools
Australian Age Care Facility Resident Wandering Prevention Strategies
Australian Age Care Facility Resident Nutrition Monitoring Tools
Australian Age Care Facility Resident Personalized Care Technology
Australian Age Care Facility Resident Electronic Health Record Systems
Australian Age Care Facility Resident Assistive Technology Training
Australian Age Care Facility Resident Mental Stimulation Games
Australian Age Care Facility Resident Family Communication Apps
Australian Age Care Facility Resident Personalized Lighting Options
Australian Age Care Facility Resident Noise Reduction Strategies
Australian Age Care Facility Resident Infection Prevention Education
Australian Age Care Facility Resident Adaptive Bathing Equipment
Australian Age Care Facility Resident Mealtime Assistance Techniques
Australian Age Care Facility Resident Mobility Device Options
Australian Age Care Facility Resident Care Plan Customization
Australian Age Care Facility Resident Sleep Comfort Strategies
Australian Age Care Facility Resident Health Monitoring Technologies
Australian Age Care Facility Resident Family Support Resources
Australian Age Care Facility Resident Wellness Program Offerings
Australian Age Care Facility Resident Adaptive Dining Solutions
Australian Age Care Facility Resident Sensory Integration Strategies
Australian Age Care Facility Resident Outdoor Mobility Solutions
Australian Age Care Facility Resident Assistive Living Technologies
Australian Age Care Facility Resident Emotional Support Strategies
Australian Age Care Facility Resident Accessible Living Spaces
Australian Age Care Facility Resident Therapeutic Recreation Opportunities
Australian Age Care Facility Resident Personal Care Assistance Techniques
Australian Age Care Facility Resident Life Skill Development Programs
Australian Age Care Facility Resident Mental Health Support Strategies
If you wish to build a comprehensive for your website using AI, we’ll be more than happy to guide you through it, or to do it for you, simply contact us.
You can also follow me on LinkedIn where I regularly post content about Health & Wellness digital marketing.
Related Posts
AI Content Creation in Healthcare – Vine Digital’s...
In today's world, AI content generation is making waves, and healthcare is no exception. With the advent of powerful AI tools, such as OpenAI's GPT,...
Read MoreEnhancing SEO Analysis with GPT-4 and Google Search...
Picture a world where SEO analysis and content optimisation transform from time-consuming chores into seamless, insightful endeavours. Say hello to the AI-driven future of digital...
Read MoreJoin the Newsletter
Want quick and digestible insights, delivered fortnightly to your inbox?
Our newsletter will keep you up to speed with the latest updates and opportunities in your industry.