Skip to content

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

Update search.ts

Nicolas3abfd6b4c19d
diff --git a/apps/api/src/controllers/search.ts b/apps/api/src/controllers/search.ts
index 4c03644aa..f18f1c5ef 100644
--- a/apps/api/src/controllers/search.ts
+++ b/apps/api/src/controllers/search.ts
@@ -37,12 +37,13 @@ export async function searchHelper(
return { success: true, data: res, returnCode: 200 };
}
+ res = res.filter((r) => !isUrlBlocked(r));
+
if (res.length === 0) {
return { success: true, error: "No search results found", returnCode: 200 };
}
// filter out social media links
- res = res.filter((r) => !isUrlBlocked(r));
const a = new WebScraperDataProvider();
await a.setOptions({