How do I get web search results using an api? – Google Help

How do I get web search results using an api? I am looking for an api that takes a search term and returns search results. I have tried loading the page and deciphering the resulting results page, but Google only allows a few page loads before blocking you. There are apis for everything else “Google” so why not for web searching?

https://support.google.com/websearch/thread/135474043/how-do-i-get-web-search-results-using-an-api?hl=en