Limit the number of urls results for a keywords in google search


I have a list of several keywords, I would like to retrieve only the url of the first, or maximum of the first 3 urls of google for each keyword.
I want to keep the people also ask results
Is this possible?
If not, do you have an idea of how to remove the surplus results for each keyword from the results file ?

Thank you