query.
Search selected sites
Get an API key in the Quickstart. This request searches two sites and keeps results from the past year.Read the response
Every result is on one of the sites you named. This real response is cut to a shorter description for each row.limit. A call that returns nothing costs nothing and carries a warning.
Search from a place
location and lang steer which pages come back. This request searches from Berlin and asks for German pages.
lang steers which pages come back, but some results can still be in other languages.
Options
A filter sent at the top level applies to every source it fits. To give web results their own
tbs, location, country or lang, send the web source as an object: "sources": [{ "type": "web", "tbs": "qdr:w", "country": "de" }]. See Sources.
Time window
Join values with a comma, such as
sbd:1,qdr:w for the past week, newest first.
Limits and errors
includeDomainstogether withexcludeDomainsreturns400 invalidRequest. The error saysSend includeDomains or excludeDomains, not both.- A
tbsthat is not in the table returns400 invalidRequest, and the error names the part it did not understand.qdrtakesd,w,mory, andcd_minmust be on or beforecd_max. - A date range (
cdr) withnewsinsourcesreturns400 invalidRequest. The error saysNews takes qdr and sbd only. tbswith onlyimagesinsourcesreturns400 invalidRequest. The error saysImage results cannot be filtered by time. Leave tbs out or drop images.With other sources, images are left unfiltered andwarningsays so.- A
locationthat does not end in a country returns400 invalidRequest. The error saysSend a place that ends with a country, like Berlin,Germany or Germany, or use country. - A
countryother thanuswithimagesinsourcesreturns400 invalidRequest, because image results are always from the US. - With
categoriesofresearchandwebinsources,includeDomainsandexcludeDomainsreturn400 invalidRequest, because research already limits the search to academic sites.
Related
- Sources lists what each source and category returns.
- Page content reads each result.
- Search overview lists every search field.
- Location and headers sets the country a page is read from.