Skip to content

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

fix(sdks): keep the position of a web search result

Karan Lokchandanie334932a050d
diff --git a/apps/js-sdk/firecrawl/src/v2/types.ts b/apps/js-sdk/firecrawl/src/v2/types.ts
index d2bb9bae3..bd1d26c0d 100644
--- a/apps/js-sdk/firecrawl/src/v2/types.ts
+++ b/apps/js-sdk/firecrawl/src/v2/types.ts
@@ -657,6 +657,7 @@ export interface SearchResultWeb {
url: string;
title?: string;
description?: string;
+ position?: number;
category?: string;
}
diff --git a/apps/python-sdk/firecrawl/__tests__/unit/v2/methods/test_search_response.py b/apps/python-sdk/firecrawl/__tests__/unit/v2/methods/test_search_response.py
index bfaaf253b..01eb79c76 100644
--- a/apps/python-sdk/firecrawl/__tests__/unit/v2/methods/test_search_response.py
+++ b/apps/python-sdk/firecrawl/__tests__/unit/v2/methods/test_search_response.py
@@ -40,6 +40,7 @@ class TestSearchDeveloperResults:
assert len(result.developer) == 1
assert isinstance(result.developer[0], SearchResultWeb)
assert result.developer[0].url == "https://github.com/firecrawl/firecrawl/issues/1"
+ assert result.developer[0].position == 1
assert result.developer[0].category == "developer"
def test_developer_absent_when_not_returned(self):
diff --git a/apps/python-sdk/firecrawl/v2/types.py b/apps/python-sdk/firecrawl/v2/types.py
index a8d286e38..0eda35f33 100644
--- a/apps/python-sdk/firecrawl/v2/types.py
+++ b/apps/python-sdk/firecrawl/v2/types.py
@@ -932,11 +932,12 @@ class CrawlStatusRequest(BaseModel):
class SearchResultWeb(BaseModel):
- """A web search result with URL, title, and description."""
+ """A web search result with URL, title, description, and position."""
url: str
title: Optional[str] = None
description: Optional[str] = None
+ position: Optional[int] = None
category: Optional[str] = None