Skip to content

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

feat: add scrapeId in document.metadata

Gergő Móriczd1f3b9638857
diff --git a/apps/api/src/controllers/v1/types.ts b/apps/api/src/controllers/v1/types.ts
index 1c9112c5e..86f2f3c00 100644
--- a/apps/api/src/controllers/v1/types.ts
+++ b/apps/api/src/controllers/v1/types.ts
@@ -443,6 +443,7 @@ export type Document = {
url?: string;
sourceURL?: string;
statusCode: number;
+ scrapeId?: string;
error?: string;
[key: string]: string | string[] | number | undefined;
};
diff --git a/apps/api/src/scraper/scrapeURL/lib/extractMetadata.ts b/apps/api/src/scraper/scrapeURL/lib/extractMetadata.ts
index 1f4948937..5c489a70e 100644
--- a/apps/api/src/scraper/scrapeURL/lib/extractMetadata.ts
+++ b/apps/api/src/scraper/scrapeURL/lib/extractMetadata.ts
@@ -156,6 +156,7 @@ export function extractMetadata(
publishedTime,
articleTag,
articleSection,
+ scrapeId: meta.id,
...customMetadata,
};
}