exa-js 2.21.0 → 2.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -4257,6 +4257,7 @@ declare const DYNAMIC_HIGHLIGHTS_BETA = "dynamic-highlights-2026-08-28";
4257
4257
  * @property {SummaryContentsOptions | boolean} [summary] - Options for retrieving summary.
4258
4258
  * @property {ContextOptions | boolean} [context] - DEPRECATED: Use `text` or `highlights` instead. Will be removed in a future version.
4259
4259
  * @property {number} [maxAgeHours] - Maximum age of cached content in hours. If content is older, it will be fetched fresh. Special values: 0 = always fetch fresh content, -1 = never fetch fresh (use cached content only). Example: 168 = fetch fresh for pages older than 7 days.
4260
+ * @property {string} [snapshotAsOf] - ISO 8601 datetime. Return the newest stored version at or before this instant instead of live content.
4260
4261
  * @property {boolean} [filterEmptyResults] - If true, filters out results with no contents. Default is true.
4261
4262
  * @property {number} [subpages] - The number of subpages to return for each result, where each subpage is derived from an internal link for the result.
4262
4263
  * @property {string | string[]} [subpageTarget] - Text used to match/rank subpages in the returned subpage list. You could use "about" to get *about* page for websites. Note that this is a fuzzy matcher.
@@ -4274,6 +4275,7 @@ type ContentsOptions = {
4274
4275
  context?: ContextOptions | true;
4275
4276
  livecrawlTimeout?: number;
4276
4277
  maxAgeHours?: number;
4278
+ snapshotAsOf?: string;
4277
4279
  filterEmptyResults?: boolean;
4278
4280
  subpages?: number;
4279
4281
  subpageTarget?: string | string[];
@@ -4691,6 +4693,7 @@ type Entity = CompanyEntity | PersonEntity;
4691
4693
  * @property {string} id - The temporary ID for the document.
4692
4694
  * @property {string} [image] - A representative image for the content, if any.
4693
4695
  * @property {string} [favicon] - A favicon for the site, if any.
4696
+ * @property {string} [snapshotAt] - Crawl instant of the stored version served for a snapshotAsOf request.
4694
4697
  * @property {Entity[]} [entities] - Structured entity data for company or person search results.
4695
4698
  */
4696
4699
  type SearchResult<T extends ContentsOptions> = {
@@ -4702,6 +4705,7 @@ type SearchResult<T extends ContentsOptions> = {
4702
4705
  id: string;
4703
4706
  image?: string;
4704
4707
  favicon?: string;
4708
+ snapshotAt?: string;
4705
4709
  entities?: Entity[];
4706
4710
  } & ContentsResultComponent<T>;
4707
4711
  type DeepSearchOutputGroundingCitation = {
package/dist/index.d.ts CHANGED
@@ -4257,6 +4257,7 @@ declare const DYNAMIC_HIGHLIGHTS_BETA = "dynamic-highlights-2026-08-28";
4257
4257
  * @property {SummaryContentsOptions | boolean} [summary] - Options for retrieving summary.
4258
4258
  * @property {ContextOptions | boolean} [context] - DEPRECATED: Use `text` or `highlights` instead. Will be removed in a future version.
4259
4259
  * @property {number} [maxAgeHours] - Maximum age of cached content in hours. If content is older, it will be fetched fresh. Special values: 0 = always fetch fresh content, -1 = never fetch fresh (use cached content only). Example: 168 = fetch fresh for pages older than 7 days.
4260
+ * @property {string} [snapshotAsOf] - ISO 8601 datetime. Return the newest stored version at or before this instant instead of live content.
4260
4261
  * @property {boolean} [filterEmptyResults] - If true, filters out results with no contents. Default is true.
4261
4262
  * @property {number} [subpages] - The number of subpages to return for each result, where each subpage is derived from an internal link for the result.
4262
4263
  * @property {string | string[]} [subpageTarget] - Text used to match/rank subpages in the returned subpage list. You could use "about" to get *about* page for websites. Note that this is a fuzzy matcher.
@@ -4274,6 +4275,7 @@ type ContentsOptions = {
4274
4275
  context?: ContextOptions | true;
4275
4276
  livecrawlTimeout?: number;
4276
4277
  maxAgeHours?: number;
4278
+ snapshotAsOf?: string;
4277
4279
  filterEmptyResults?: boolean;
4278
4280
  subpages?: number;
4279
4281
  subpageTarget?: string | string[];
@@ -4691,6 +4693,7 @@ type Entity = CompanyEntity | PersonEntity;
4691
4693
  * @property {string} id - The temporary ID for the document.
4692
4694
  * @property {string} [image] - A representative image for the content, if any.
4693
4695
  * @property {string} [favicon] - A favicon for the site, if any.
4696
+ * @property {string} [snapshotAt] - Crawl instant of the stored version served for a snapshotAsOf request.
4694
4697
  * @property {Entity[]} [entities] - Structured entity data for company or person search results.
4695
4698
  */
4696
4699
  type SearchResult<T extends ContentsOptions> = {
@@ -4702,6 +4705,7 @@ type SearchResult<T extends ContentsOptions> = {
4702
4705
  id: string;
4703
4706
  image?: string;
4704
4707
  favicon?: string;
4708
+ snapshotAt?: string;
4705
4709
  entities?: Entity[];
4706
4710
  } & ContentsResultComponent<T>;
4707
4711
  type DeepSearchOutputGroundingCitation = {
package/dist/index.js CHANGED
@@ -100,7 +100,7 @@ var import_cross_fetch = __toESM(require("cross-fetch"));
100
100
  // package.json
101
101
  var package_default = {
102
102
  name: "exa-js",
103
- version: "2.21.0",
103
+ version: "2.22.0",
104
104
  description: "Exa SDK for Node.js and the browser",
105
105
  publishConfig: {
106
106
  access: "public"
@@ -2885,6 +2885,7 @@ var Exa2 = class {
2885
2885
  livecrawl,
2886
2886
  livecrawlTimeout,
2887
2887
  maxAgeHours,
2888
+ snapshotAsOf,
2888
2889
  // DEPRECATED FIELD: preserve legacy `context` only for backward compatibility.
2889
2890
  context,
2890
2891
  ...rest
@@ -2913,6 +2914,8 @@ var Exa2 = class {
2913
2914
  if (livecrawlTimeout !== void 0)
2914
2915
  contentsOptions.livecrawlTimeout = livecrawlTimeout;
2915
2916
  if (maxAgeHours !== void 0) contentsOptions.maxAgeHours = maxAgeHours;
2917
+ if (snapshotAsOf !== void 0)
2918
+ contentsOptions.snapshotAsOf = snapshotAsOf;
2916
2919
  if (context !== void 0) contentsOptions.context = context;
2917
2920
  return {
2918
2921
  contentsOptions,