Skip to content

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

Nick: scrape id when origin is website for report system

Nicolas00dacaf935a3
diff --git a/apps/api/src/controllers/v1/scrape.ts b/apps/api/src/controllers/v1/scrape.ts
index c573e100a..9752674f5 100644
--- a/apps/api/src/controllers/v1/scrape.ts
+++ b/apps/api/src/controllers/v1/scrape.ts
@@ -147,5 +147,6 @@ export async function scrapeController(
return res.status(200).json({
success: true,
data: legacyDocumentConverter(doc),
+ scrape_id: origin === "website" ? jobId : undefined,
});
}
diff --git a/apps/api/src/controllers/v1/types.ts b/apps/api/src/controllers/v1/types.ts
index 85bd625fc..f9f503170 100644
--- a/apps/api/src/controllers/v1/types.ts
+++ b/apps/api/src/controllers/v1/types.ts
@@ -225,6 +225,7 @@ export type ScrapeResponse =
success: true;
warning?: string;
data: Document;
+ scrape_id?: string;
};
export interface ScrapeResponseRequestTest {