Skip to content

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

Update version to 2.4.0 and enhance ExtractResponse model with additional fields for id, status, and expiresAt. (#1501)

Rafael Millere3e730f2c1dc
diff --git a/apps/python-sdk/firecrawl/__init__.py b/apps/python-sdk/firecrawl/__init__.py
index 76623245e..89e37ad2f 100644
--- a/apps/python-sdk/firecrawl/__init__.py
+++ b/apps/python-sdk/firecrawl/__init__.py
@@ -13,7 +13,7 @@ import os
from .firecrawl import FirecrawlApp, JsonConfig, ScrapeOptions # noqa
-__version__ = "2.3.0"
+__version__ = "2.4.0"
# Define the logger for the Firecrawl project
logger: logging.Logger = logging.getLogger("firecrawl")
diff --git a/apps/python-sdk/firecrawl/firecrawl.py b/apps/python-sdk/firecrawl/firecrawl.py
index 9c3ddeb96..10bbf099c 100644
--- a/apps/python-sdk/firecrawl/firecrawl.py
+++ b/apps/python-sdk/firecrawl/firecrawl.py
@@ -304,6 +304,9 @@ class ExtractParams(pydantic.BaseModel):
class ExtractResponse(pydantic.BaseModel, Generic[T]):
"""Response from extract operations."""
+ id: Optional[str] = None
+ status: Optional[Literal["processing", "completed", "failed"]] = None
+ expiresAt: Optional[datetime] = None
success: bool = True
data: Optional[T] = None
error: Optional[str] = None
@@ -412,14 +415,6 @@ class ExtractParams(pydantic.BaseModel):
show_sources: Optional[bool] = False
agent: Optional[Dict[str, Any]] = None
-class ExtractResponse(pydantic.BaseModel, Generic[T]):
- """
- Response from the extract operation.
- """
- success: bool
- data: Optional[T] = None
- error: Optional[str] = None
-
class FirecrawlApp:
def __init__(self, api_key: Optional[str] = None, api_url: Optional[str] = None) -> None:
"""