Skip to content

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

refactor(index): move the endpoint to /search/gov

PhantomInTheWire2763b03a4295
diff --git a/apps/js-sdk/firecrawl/src/__tests__/unit/v2/legal-regulatory.test.ts b/apps/js-sdk/firecrawl/src/__tests__/unit/v2/legal-regulatory.test.ts
index 981bc722e..e5088a2ac 100644
--- a/apps/js-sdk/firecrawl/src/__tests__/unit/v2/legal-regulatory.test.ts
+++ b/apps/js-sdk/firecrawl/src/__tests__/unit/v2/legal-regulatory.test.ts
@@ -36,7 +36,7 @@ describe("legalRegulatorySearch", () => {
{ k: 5 },
);
- expect(http.post).toHaveBeenCalledWith("/v2/search/legal-regulatory", {
+ expect(http.post).toHaveBeenCalledWith("/v2/search/gov", {
query: "food labeling requirements",
k: 5,
});
@@ -50,7 +50,7 @@ describe("legalRegulatorySearch", () => {
await clientWith(http).legalRegulatorySearch("zoning variance");
- expect(http.post).toHaveBeenCalledWith("/v2/search/legal-regulatory", {
+ expect(http.post).toHaveBeenCalledWith("/v2/search/gov", {
query: "zoning variance",
});
});
diff --git a/apps/js-sdk/firecrawl/src/v2/methods/legalRegulatory.ts b/apps/js-sdk/firecrawl/src/v2/methods/legalRegulatory.ts
index eab152a22..b4baaab27 100644
--- a/apps/js-sdk/firecrawl/src/v2/methods/legalRegulatory.ts
+++ b/apps/js-sdk/firecrawl/src/v2/methods/legalRegulatory.ts
@@ -8,7 +8,7 @@ import {
throwForBadResponse,
} from "../utils/errorHandler";
-const ENDPOINT = "/v2/search/legal-regulatory";
+const ENDPOINT = "/v2/search/gov";
/** Search the Legal and Regulatory Index. */
export async function legalRegulatorySearch(
diff --git a/apps/python-sdk/firecrawl/__tests__/unit/v2/methods/test_legal_regulatory_search.py b/apps/python-sdk/firecrawl/__tests__/unit/v2/methods/test_legal_regulatory_search.py
index 44026e2da..f456b3660 100644
--- a/apps/python-sdk/firecrawl/__tests__/unit/v2/methods/test_legal_regulatory_search.py
+++ b/apps/python-sdk/firecrawl/__tests__/unit/v2/methods/test_legal_regulatory_search.py
@@ -37,7 +37,7 @@ def test_legal_regulatory_search_posts_query_and_k_and_parses_web_results():
result = client.legal_regulatory_search("food labeling requirements", k=5)
transport.post.assert_called_once_with(
- "/v2/search/legal-regulatory", {"query": "food labeling requirements", "k": 5}
+ "/v2/search/gov", {"query": "food labeling requirements", "k": 5}
)
assert result.data.web[0].title == "21 CFR Part 101 -- Food Labeling"
assert result.data.web[0].position == 1
@@ -52,7 +52,7 @@ def test_legal_regulatory_search_omits_k_when_not_provided():
client.legal_regulatory_search("zoning variance")
transport.post.assert_called_once_with(
- "/v2/search/legal-regulatory", {"query": "zoning variance"}
+ "/v2/search/gov", {"query": "zoning variance"}
)
@@ -76,6 +76,6 @@ async def test_async_legal_regulatory_search_posts_query_and_k():
result = await client.legal_regulatory_search("food labeling requirements", k=5)
transport.post.assert_awaited_once_with(
- "/v2/search/legal-regulatory", {"query": "food labeling requirements", "k": 5}
+ "/v2/search/gov", {"query": "food labeling requirements", "k": 5}
)
assert result.data.web[0].url.startswith("https://www.ecfr.gov/")
diff --git a/apps/python-sdk/firecrawl/v2/methods/aio/legal_regulatory.py b/apps/python-sdk/firecrawl/v2/methods/aio/legal_regulatory.py
index bf6d769f0..7a17b07f2 100644
--- a/apps/python-sdk/firecrawl/v2/methods/aio/legal_regulatory.py
+++ b/apps/python-sdk/firecrawl/v2/methods/aio/legal_regulatory.py
@@ -7,7 +7,7 @@ from ...utils.error_handler import handle_response_error
from ...utils.http_client_async import AsyncHttpClient
-ENDPOINT = "/v2/search/legal-regulatory"
+ENDPOINT = "/v2/search/gov"
async def legal_regulatory_search(
diff --git a/apps/python-sdk/firecrawl/v2/methods/legal_regulatory.py b/apps/python-sdk/firecrawl/v2/methods/legal_regulatory.py
index 16bacc0e6..36b967c3a 100644
--- a/apps/python-sdk/firecrawl/v2/methods/legal_regulatory.py
+++ b/apps/python-sdk/firecrawl/v2/methods/legal_regulatory.py
@@ -6,7 +6,7 @@ from ..types import LegalRegulatorySearchRequest, LegalRegulatorySearchResponse
from ..utils import HttpClient, handle_response_error
-ENDPOINT = "/v2/search/legal-regulatory"
+ENDPOINT = "/v2/search/gov"
def legal_regulatory_search(