Skip to content

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

Update scrape.ts

Nicolasef5c8931eb1e
diff --git a/apps/api/src/controllers/v1/scrape.ts b/apps/api/src/controllers/v1/scrape.ts
index 9d0138d17..20ec250ad 100644
--- a/apps/api/src/controllers/v1/scrape.ts
+++ b/apps/api/src/controllers/v1/scrape.ts
@@ -102,6 +102,9 @@ export async function scrapeController(
// Don't bill if we're early returning
return;
}
+ if(req.body.extract && req.body.formats.includes("extract")) {
+ creditsToBeBilled = 50;
+ }
const billingResult = await billTeam(req.auth.team_id, creditsToBeBilled);
if (!billingResult.success) {