Munchable's public site is a few hundred static pages. The live sitemap currently lists 523 URLs, and almost all of them are generated from data modules rather than typed by hand. When one of those modules changes, I want Bing and the other IndexNow engines to hear about it within the hour, not whenever a crawler next wanders past.
The protocol makes that easy to do badly. You POST a list of URLs, and the engines ask you to do it only for URLs that were added, changed or removed. Re-announcing a page that did not change is the spam pattern. So the interesting part of the job is not the POST, it is deciding which URLs to put in it.
Do not hash the HTML
The obvious way to ask "did this page change" is to fetch it and hash the markup. On a Next.js site that is useless. Every deploy stamps a fresh build id into every page, so every page looks changed after every deploy, and you announce the whole site after every deploy.
So the hash is taken from the data a page renders, before it is rendered.…