How to get the word count of a list of URLs?

I’m greatly benefited by @JMichaelTX’s Macro at [WEB] Get URLs from Google Search Results [Example] to get URLs of the SERP results.

However, can anyone give me a hint on how to get the word count of the articles in the URLs? I want to get the word count of the content excluding the blog comments.

I also need to list the heading 2s, heading 3s of the top 10 results in front of the URL/title.

There are no such tools that implement this functionality presently in Chrome Store.

PS: If this works, I need some more functionality like keyword density in the search results top 10 content. Spread some light on where can I can get a Keyboard Maestro developer.

Thanks.

Finally, created a macro for listing only word count of the top 10 web results: How to get the word count of a list of URLs?

Providing real-world sample text would be beneficial.

For the word count:

KM has a filter for that:

You’ll need to extract the text from the source code of the pages. The Mercury Web Parser API might be helpful there.

According to https://www.npmjs.com/package/webpage-wc, the Mercury Web Parser API includes the number of words in code blocks.

So, webpage-wc combined with Mercury parser would be the best bet I guess.

Thank you.

Thanks @gabrielroth and @Tom.

I created a macro to list all the search results page URLs and also the word count of each of them in a text file.

Resources used:

The macro, calls another "Get URLs from Google Search Results" macro. And now it uses Mercury Web Parser to get the word count of each of the URLs (loop)

It pasted in the word count infront of each of the URLs in a txt file. For this macro to paste in the results and work out of the box, you need to create a file called WordCount.txt, under Keyboard Maestro in Applications folder.

Sign up for https://mercury.postlight.com/web-parser/, get a free API key. You need to enter the API key for the shell script in the macro. I've added a comment there.

Download the two macros.

Word Count Search Results.kmmacros (9.4 KB)
Get URLs from Google Search Results.kmmacros (24.9 KB)

1 Like