Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
SEO Script. Get all the People Also Ask questions from the SERP.
(function() {
let words = [];
function uniq(value, index, self) {
return self.indexOf(value) === index;
let selector = 'g-accordion-expander > div:first-child div';
const found = document.querySelectorAll(selector);
if (found.length > 0) {
found.forEach((f) => {
let text = f.textContent;
if (text) {
words = words.filter(uniq);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.