At their most basic level, SERP APIs are web scrapers that send search requests to search engines, retrieve the content, and parse all of the important data. They are able to do this by internally using proxies, headless browsers, and Captcha solvers since search engines do not like being scraped.
However, unlike regular scrapers, these ones are on the cloud, not on your computer, and are accessed using HTTP requests. You use parameters appended to the URL to give it specific commands such as the geo-location, number of searches, and the type of device.