(function() {
var emTags = document.getElementsByTagName('em');
var emWords = '';
for (var i = 0; i < emTags.length; i++) {
emWords += emTags[i].textContent + '\n';
}
if (emWords !== '') {
var tempInput = document.createElement('textarea');
tempInput.value = emWords.trim();
document.body.appendChild(tempInput);
tempInput.select();
document.execCommand('copy');
document.body.removeChild(tempInput);
alert('Copied the text:\n\n' + emWords.trim());
} else {
alert('No <em> tags found on this page.');
}
})();
I have a bookmarklet for that and before that i have one to show 100 resultsSERP API has variable output "snippet_highlighted_words", gives you list of bolded keywords from SERP. there might be other ser
You can ask chatgpt to write javascript to extract bolded words from SERP. Bookmark this and press when on SERP OR Press F12 will open browser console and paste the code there, hit enter, a popup will have list of keywords. if you want to do bulk keywords then use any ai workflow builder and pass serp source code through a javascript node will output only the bolded keywords. don't forget to set Google settings/preference (search settings) to display 100 results.
Code:(function() { var emTags = document.getElementsByTagName('em'); var emWords = ''; for (var i = 0; i < emTags.length; i++) { emWords += emTags[i].textContent + '\n'; } if (emWords !== '') { var tempInput = document.createElement('textarea'); tempInput.value = emWords.trim(); document.body.appendChild(tempInput); tempInput.select(); document.execCommand('copy'); document.body.removeChild(tempInput); alert('Copied the text:\n\n' + emWords.trim()); } else { alert('No <em> tags found on this page.'); } })();
If i go to google.com with USA VPN and look for apple pie here's 100 pages of bolded terms with your script:A prompt with all extracted keywords and ask for keywords related to primary keyword, for me this prompt removed brand mentions and long sentences that I noticed for a search I performed.
This javascript will do "Word Occurrences" then you sort them now you have clean list and pick top 5 keywords from the list, this will filter out long weird keywords. ask chatgpt to make this code change for your usage.If i go to google.com with USA VPN and look for apple pie here's 100 pages of bolded terms with your script:
starts with a tender, flaky pie crust and juicy apple slices
caramelized lattice crust filled with sweet, buttery apple slices
With a mountain of gooey cinnamon apples nestled under a flaky pie crust
super easy apple pie recipe
best homemade apple pie you'll ever make
a pie in which the principal filling is apples
baking in a brown paper bag
My perfect apple pie
McDonald's Baked Apple Pie recipe
pies
Walk in and pick up your favorite pie today
Best Apple Pie recipe
apple pie
apple pies
apple pie
perfectly cooked apple filling, flaky crust, and tons of crumble topping
apple pie
Alton Brown's double-crust classic apple pie
easy apple pie recipe
apple pie
apple pie
Directions
apples are sautéed in butter
homemade apple pie recipe
easy apple pie recipe
classic apple pie recipe
It's a bit different than some apple pie recipes
Smitten Kitchen's new and improved pie
bake for 6o to 70 minutes
choose a mix of firm, tart, and sweet apples
Best Homemade Apple Pie of your life
Make filling: Combine sugars, salt, and spices in your absolutely largest bowl
A flaky, buttery pie crust generously filled with gently spiced apples
Sweet, tart, apples with brown sugar and cinnamon
easy, straightforward, and lacks the fussiness of some recipes
The crust is made with standard shortbread / shortcrust
Apple Pie
Apple Pie
apple pie
apple pie
pie
apple pie
apple pie
Apple
Apple Pie
apple pie
apple pie
Apple Pie
apple
pie
apple pie
apple pie
pie
Apple Pie
Apple Pie
APPLE PIE
Apple Pie
apple pie
apple pie
apple pie
Apple Pie
Pie
pie
apple pie
apple pie
Apple Pie
Pie
Apple Pie
Apple Pie
apple pie
apple pie
apple pie
apple pie
apple
pies
Pie
pie
pie
apple pie
apple pie
apple pie
Pies
Apple Pie
pie
apple
pie
apple pie
Apple Pie
Apple Pie
pie
apple pie
// Extract the titles array safely
const titlesArray = $input.first().json.Titles;
// Ensure titlesArray is valid
if (!Array.isArray(titlesArray) || titlesArray.length === 0) {
throw new Error("Invalid or empty Titles array");
}
// Word frequency counter
const wordCounts = {};
titlesArray.forEach(title => {
title.toLowerCase()
.replace(/[^a-z0-9\s]/g, "") // Remove punctuation
.split(/\s+/) // Split into words
.forEach(word => {
if (word) {
wordCounts[word] = (wordCounts[word] || 0) + 1;
}
});
});
// Filter words with 5 or more occurrences and sort by frequency (descending)
const filteredWords = Object.entries(wordCounts)
.filter(([, count]) => count >= 5)
.sort(([, a], [, b]) => b - a)
.map(([word, count]) => ({ Word: word, Occurrences: count }));
// Convert results to n8n output format
return filteredWords.map(item => ({ json: item }));