websearch.fast
ConsoleGet a key

Caching and freshness

Date filters and cache age are separate controls.

Cache classes

A search result is stored under its normalised input (the query, type, country, language, location, filters, page, num and safe). Each query gets a class from its intent, with a default maximum age.

ClassTypical queriesDefault max_age
livetype: news, freshness: day, prices, scores10 minutes
generalmost web queries6 hours
evergreendefinitions, reference, scholar, patents, geocoding7 days

Pages read by fetch, content, extract and jobs are kept in a page store, by default for 24 hours for fetch, and by the class of their search for content.

Asking for a fresh copy

ParameterEffect
max_age (seconds)Use a stored copy only if it is at most this old, otherwise read fresh. Values above the class default are allowed up to 30 days.
no_cache: trueRead fresh and never use a stored copy. The fresh copy is stored for later calls.

Neither changes the price. A call with max_age: 0 or no_cache: true can take longer.

What the response says

FieldMeaning
cache.hittrue when the response, or every page in it, came from a stored copy.
cache.data_age_secondsAge of the oldest part of the response. 0 when everything was read for this call.
cache.fetched_atUnix seconds when the oldest part was read.

Each content object and each fetch page has its own fetched_at. The header X-Web-Cache repeats hit or miss.