Extend crawl or metadata by adding custom code or webhooks e.g

Hi.
Love the crawler section.
I was just curious whether it’s possible to extend crawls.
Right now the crawler gets an url (a), indexes it (b) and so on.
But what if I want to add action C to that…before it crawls the next url?

Example scenario: for every crawled htmlfile, I want to count the occurences of the word ‘banana’, and later rank on that somehow.