Web scraping is a quite old technique used to extract information from websites. You can find tons of information on the Internet about web scraping.
But, are not APIs intended to do this? Well, yes, of course, but sadly APIs are not everywhere. Indeed, the most typical situation will be a website with interesting information, which is meant to be human-readable, and it lacks an API to access the information directly from your source code.