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 usage stuff
Gergő Móricze251516a8e1b
diff --git a/.github/archive/python-sdk.yml b/.github/archive/python-sdk.ymlindex 4bd9efbb6..b05ba2eb5 100644--- a/.github/archive/python-sdk.yml+++ b/.github/archive/python-sdk.yml@@ -63,5 +63,5 @@ jobs:working-directory: ./apps/python-sdk- name: Run E2E tests for Python SDKrun: |- pytest firecrawl/__tests__/e2e_withAuth/test.py+ python -m pytest firecrawl/__tests__/e2e/v2working-directory: ./apps/python-sdkdiff --git a/apps/js-sdk/firecrawl/src/v2/methods/usage.ts b/apps/js-sdk/firecrawl/src/v2/methods/usage.tsindex dfd79d5b3..4138a70ec 100644--- a/apps/js-sdk/firecrawl/src/v2/methods/usage.ts+++ b/apps/js-sdk/firecrawl/src/v2/methods/usage.ts@@ -16,7 +16,7 @@ export async function getConcurrency(http: HttpClient): Promise<ConcurrencyCheckexport async function getCreditUsage(http: HttpClient): Promise<CreditUsage> {try {- const res = await http.get<{ success: boolean; data?: { remaining_credits: number } }>("/v2/credit-usage");+ const res = await http.get<{ success: boolean; data?: { remaining_credits: number } }>("/v2/team/credit-usage");if (res.status !== 200 || !res.data?.success) throwForBadResponse(res, "get credit usage");const d = res.data.data || (res.data as any);return { remaining_credits: d.remaining_credits };@@ -28,7 +28,7 @@ export async function getCreditUsage(http: HttpClient): Promise<CreditUsage> {export async function getTokenUsage(http: HttpClient): Promise<TokenUsage> {try {- const res = await http.get<{ success: boolean; data?: TokenUsage }>("/v2/token-usage");+ const res = await http.get<{ success: boolean; data?: TokenUsage }>("/v2/team/token-usage");if (res.status !== 200 || !res.data?.success) throwForBadResponse(res, "get token usage");return (res.data.data || (res.data as any)) as TokenUsage;} catch (err: any) {diff --git a/apps/python-sdk/firecrawl/v2/methods/usage.py b/apps/python-sdk/firecrawl/v2/methods/usage.pyindex b014045b9..a210d5979 100644--- a/apps/python-sdk/firecrawl/v2/methods/usage.py+++ b/apps/python-sdk/firecrawl/v2/methods/usage.py@@ -17,7 +17,7 @@ def get_concurrency(client: HttpClient) -> ConcurrencyCheck:def get_credit_usage(client: HttpClient) -> CreditUsage:- resp = client.get("/v2/credit-usage")+ resp = client.get("/v2/team/credit-usage")if not resp.ok:handle_response_error(resp, "get credit usage")body = resp.json()@@ -28,7 +28,7 @@ def get_credit_usage(client: HttpClient) -> CreditUsage:def get_token_usage(client: HttpClient) -> TokenUsage:- resp = client.get("/v2/token-usage")+ resp = client.get("/v2/team/token-usage")if not resp.ok:handle_response_error(resp, "get token usage")body = resp.json()