Supercharge your AI agents with data from the web and beyond. Building the library for superintelligence. 🔥
TypeScript aiai-agentsai-crawlerai-scrapingai-searchcrawlerdata-extractionhtml-to-markdownllmmarkdownscraperscrapingweb-crawlerweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
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.tsindex 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.pyindex 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) == 1assert isinstance(result.developer[0], SearchResultWeb)assert result.developer[0].url == "https://github.com/firecrawl/firecrawl/issues/1"+ assert result.developer[0].position == 1assert 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.pyindex 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: strtitle: Optional[str] = Nonedescription: Optional[str] = None+ position: Optional[int] = Nonecategory: Optional[str] = None