HTTP is an API of sorts…
True, but it is an API that they can't easily deprecate on a whim.
We had a whole team dedicated to keeping up the changes vendors would make to their websites that we scraped for info. The team was called, of course, "Scrape and P(r)ay".
So, prefer regex over css selectors, and css selectors over xpath, where possible. And don't select based on nesting or position if possible.