简体   繁体   中英

Google CSE returning different results when run from API

I am using the C# wrapper Google-API-for-dot-net to query a custom search engine so that only results for that site are returned. The problem is that the results differ from the CSE page and the API results.

This is the code I am using:

GwebSearchClient Client = new GwebSearchClient(@"http://www.eatout.co.za/");

string keyword = Query;
int count = 1000;
string customSearchId = "XXXXXXXXX";
string customSearchReference = null;
string language = "English";
string safeLevel = "Off";
string duplicateFilter = "On";
string country = "za";                

var Results = Client.Search(keyword, count, customSearchId, customSearchReference, safeLevel, language, duplicateFilter, country);

Google uses a zero index for the CurrentPageIndex used when paging. I was seeing page 2 the whole time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM