Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
Update search.ts
Nicolas8c49ea4de2e4
diff --git a/apps/api/src/controllers/v2/search.ts b/apps/api/src/controllers/v2/search.tsindex abc594ee4..d7f47e613 100644--- a/apps/api/src/controllers/v2/search.ts+++ b/apps/api/src/controllers/v2/search.ts@@ -76,6 +76,7 @@ async function startScrapeJob(team_id: options.teamId,scrapeOptions: {...options.scrapeOptions,+ // TODO: fix thismaxAge: 3 * 24 * 60 * 60 * 1000, // 3 days},internalOptions: { teamId: options.teamId, bypassBilling: options.bypassBilling ?? true, zeroDataRetention },@@ -547,7 +548,8 @@ export async function searchController(// - For no scraping: Bill based on search results countif (!isSearchPreview && (!shouldScrape || (shouldScrape && !isAsyncScraping))) {billTeam(req.auth.team_id, req.acuc?.sub_id, credits_billed).catch((error) => {- logger.error("Failed to bill team", { teamId: req.auth.team_id, subId: req.acuc?.sub_id, credits_billed, error });+ logger.error(`Failed to bill team ${req.acuc?.sub_id} for ${credits_billed} credits: ${error}`);+});}@@ -574,6 +576,7 @@ export async function searchController(...req.body,query: undefined,scrapeOptions: undefined,+ asyncScraping: isAsyncScraping,},origin: req.body.origin,integration: req.body.integration,