Custom search engine results differ between script and setup interface

Viewed 46

I'm using Google custom search to download images from web, But when I search manually here (Where we tune the search engine) I get very good results, but when I do a query in python script I get too many unrelated results (about 500 image of 1200)

Why is that? Aren't query in script and from setup page same?

Following code is how I do the request

url = f"https://www.googleapis.com/customsearch/v1?key={API_KEY[idx]}&cx={SEARCH_ENGINE_ID[idx]}&q={query}&start={start}&searchType=image&imgType=photo&imgSize=large&fileType=jpg&safe=active&sort=date:r:{startDate}:{endDate}"
data = requests.get(url).json()
0 Answers
Related