Skip to content

Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥

fix(search): allow maxAge to have effect

Gergő Móricz4365b3dde7f4
diff --git a/apps/api/src/controllers/v1/search.ts b/apps/api/src/controllers/v1/search.ts
index 82efbcfb3..d4429e15b 100644
--- a/apps/api/src/controllers/v1/search.ts
+++ b/apps/api/src/controllers/v1/search.ts
@@ -111,7 +111,7 @@ async function scrapeSearchResult(
team_id: options.teamId,
scrapeOptions: {
...options.scrapeOptions,
- maxAge: 3 * 24 * 60 * 60 * 1000, // 3 days
+ maxAge: options.scrapeOptions.maxAge === 0 ? 3 * 24 * 60 * 60 * 1000 : options.scrapeOptions.maxAge,
},
internalOptions: { teamId: options.teamId, bypassBilling: true, zeroDataRetention },
origin: options.origin,