Skip to content

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

docs(sdk): clarify maxAge and response metadata fields (#4082)

Himadri Mishraa99fb1c1509e
diff --git a/apps/js-sdk/firecrawl/src/v2/types.ts b/apps/js-sdk/firecrawl/src/v2/types.ts
index bd1d26c0d..cb229d197 100644
--- a/apps/js-sdk/firecrawl/src/v2/types.ts
+++ b/apps/js-sdk/firecrawl/src/v2/types.ts
@@ -207,6 +207,10 @@ export interface ScrapeOptions {
useMock?: string;
blockAds?: boolean;
proxy?: "basic" | "stealth" | "enhanced" | "auto" | string;
+ /**
+ * Maximum age, in milliseconds, of indexed content that may be reused.
+ * Set to `0` to bypass index reuse.
+ */
maxAge?: number;
minAge?: number;
storeInCache?: boolean;
@@ -558,6 +562,7 @@ export interface DocumentMetadata {
// Common metadata fields
title?: string;
description?: string;
+ /** URL reported by the selected scrape engine. */
url?: string;
language?: string;
keywords?: string | string[];
@@ -594,7 +599,9 @@ export interface DocumentMetadata {
articleSection?: string;
// Response-level metadata
+ /** URL requested for the scrape. */
sourceURL?: string;
+ /** HTTP status code reported for the scrape response. */
statusCode?: number;
scrapeId?: string;
numPages?: number;
diff --git a/apps/python-sdk/firecrawl/v2/types.py b/apps/python-sdk/firecrawl/v2/types.py
index 0eda35f33..530044981 100644
--- a/apps/python-sdk/firecrawl/v2/types.py
+++ b/apps/python-sdk/firecrawl/v2/types.py
@@ -83,6 +83,7 @@ class DocumentMetadata(BaseModel):
# Common metadata fields
title: Optional[str] = None
description: Optional[str] = None
+ # URL reported by the selected scrape engine.
url: Optional[str] = None
language: Optional[str] = None
keywords: Optional[Union[str, List[str]]] = None
@@ -119,7 +120,9 @@ class DocumentMetadata(BaseModel):
article_section: Optional[str] = None
# Response-level metadata
+ # URL requested for the scrape.
source_url: Optional[str] = None
+ # HTTP status code reported for the scrape response.
status_code: Optional[int] = None
scrape_id: Optional[str] = None
num_pages: Optional[int] = None
@@ -822,6 +825,8 @@ class ScrapeOptions(BaseModel):
use_mock: Optional[str] = None
block_ads: Optional[bool] = None
proxy: Optional[Literal["basic", "stealth", "enhanced", "auto"]] = None
+ # Maximum age, in milliseconds, of indexed content that may be reused.
+ # Set to 0 to bypass index reuse.
max_age: Optional[int] = None
min_age: Optional[int] = None
store_in_cache: Optional[bool] = None