Skip to content

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

Nick: scrape logs in search v1 v2

Nicolas9d143b165d77
diff --git a/apps/api/src/controllers/v1/search.ts b/apps/api/src/controllers/v1/search.ts
index 23132ffcf..1b1db0239 100644
--- a/apps/api/src/controllers/v1/search.ts
+++ b/apps/api/src/controllers/v1/search.ts
@@ -451,6 +451,7 @@ export async function searchController(
// Log final timing information
const totalRequestTime = new Date().getTime() - middlewareStartTime;
const controllerTime = new Date().getTime() - controllerStartTime;
+ const scrapeful = !!(req.body.scrapeOptions.formats && req.body.scrapeOptions.formats.length > 0);
logger.info("Request metrics", {
version: "v1",
mode: "search",
@@ -461,6 +462,7 @@ export async function searchController(
controllerTime,
totalRequestTime,
creditsUsed: credits_billed,
+ scrapeful,
});
return res.status(200).json(responseData);
diff --git a/apps/api/src/controllers/v2/search.ts b/apps/api/src/controllers/v2/search.ts
index fe4ffd09c..a71be2009 100644
--- a/apps/api/src/controllers/v2/search.ts
+++ b/apps/api/src/controllers/v2/search.ts
@@ -523,6 +523,7 @@ export async function searchController(
controllerTime,
totalRequestTime,
creditsUsed: credits_billed,
+ scrapeful: shouldScrape,
});
return res.status(200).json({
@@ -682,6 +683,7 @@ export async function searchController(
controllerTime,
totalRequestTime,
creditsUsed: credits_billed,
+ scrapeful: shouldScrape,
});
// For sync scraping or no scraping, don't include scrapeIds