Skip to content

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

chore(sdk): deprecate extract endpoint methods in JS and Python SDKs (#2897)

firecrawl-spring[bot]2afd831750bb
diff --git a/apps/js-sdk/firecrawl/package.json b/apps/js-sdk/firecrawl/package.json
index 18e20973e..a0bde9fa1 100644
--- a/apps/js-sdk/firecrawl/package.json
+++ b/apps/js-sdk/firecrawl/package.json
@@ -1,6 +1,6 @@
{
"name": "@mendable/firecrawl-js",
- "version": "4.13.0",
+ "version": "4.13.1",
"description": "JavaScript SDK for Firecrawl API",
"main": "dist/index.js",
"types": "dist/index.d.ts",
diff --git a/apps/js-sdk/firecrawl/src/v1/index.ts b/apps/js-sdk/firecrawl/src/v1/index.ts
index 77c78e21f..1874a9f9c 100644
--- a/apps/js-sdk/firecrawl/src/v1/index.ts
+++ b/apps/js-sdk/firecrawl/src/v1/index.ts
@@ -1278,10 +1278,11 @@ export default class FirecrawlApp {
/**
* Extracts information from URLs using the Firecrawl API.
- * Currently in Beta. Expect breaking changes on future minor versions.
* @param urls - The URLs to extract information from. Optional if using other methods for data extraction.
* @param params - Additional parameters for the extract request.
* @returns The response from the extract operation.
+ * @deprecated The extract endpoint is in maintenance mode and its use is discouraged.
+ * Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor to find a replacement.
*/
async extract<T extends zt.ZodSchema = any>(urls?: string[], params?: ExtractParams<T>): Promise<ExtractResponse<zt.infer<T>> | ErrorResponse> {
const headers = this.prepareHeaders();
@@ -1337,6 +1338,8 @@ export default class FirecrawlApp {
* @param params - Additional parameters for the extract request.
* @param idempotencyKey - Optional idempotency key for the request.
* @returns The response from the extract operation.
+ * @deprecated The extract endpoint is in maintenance mode and its use is discouraged.
+ * Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor to find a replacement.
*/
async asyncExtract(
urls: string[],
@@ -1369,6 +1372,8 @@ export default class FirecrawlApp {
* Retrieves the status of an extract job.
* @param jobId - The ID of the extract job.
* @returns The status of the extract job.
+ * @deprecated The extract endpoint is in maintenance mode and its use is discouraged.
+ * Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor to find a replacement.
*/
async getExtractStatus(jobId: string): Promise<any> {
try {
diff --git a/apps/js-sdk/firecrawl/src/v2/client.ts b/apps/js-sdk/firecrawl/src/v2/client.ts
index 0de958607..5d05d50bc 100644
--- a/apps/js-sdk/firecrawl/src/v2/client.ts
+++ b/apps/js-sdk/firecrawl/src/v2/client.ts
@@ -255,6 +255,8 @@ export class FirecrawlClient {
* Start an extract job (async).
* @param args Extraction request (urls, schema or prompt, flags).
* @returns Job id or processing state.
+ * @deprecated The extract endpoint is in maintenance mode and its use is discouraged.
+ * Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor to find a replacement.
*/
async startExtract(args: Parameters<typeof startExtract>[1]): Promise<ExtractResponse> {
return startExtract(this.http, args);
@@ -262,6 +264,8 @@ export class FirecrawlClient {
/**
* Get extract job status/data.
* @param jobId Extract job id.
+ * @deprecated The extract endpoint is in maintenance mode and its use is discouraged.
+ * Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor to find a replacement.
*/
async getExtractStatus(jobId: string): Promise<ExtractResponse> {
return getExtractStatus(this.http, jobId);
@@ -270,6 +274,8 @@ export class FirecrawlClient {
* Convenience waiter: start an extract and poll until it finishes.
* @param args Extraction request plus waiter controls (pollInterval, timeout seconds).
* @returns Final extract response.
+ * @deprecated The extract endpoint is in maintenance mode and its use is discouraged.
+ * Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor to find a replacement.
*/
async extract(args: Parameters<typeof startExtract>[1] & { pollInterval?: number; timeout?: number }): Promise<ExtractResponse> {
return extractWaiter(this.http, args);
diff --git a/apps/js-sdk/firecrawl/src/v2/methods/extract.ts b/apps/js-sdk/firecrawl/src/v2/methods/extract.ts
index 11e523dca..58c2089c5 100644
--- a/apps/js-sdk/firecrawl/src/v2/methods/extract.ts
+++ b/apps/js-sdk/firecrawl/src/v2/methods/extract.ts
@@ -38,6 +38,10 @@ function prepareExtractPayload(args: {
return body;
}
+/**
+ * @deprecated The extract endpoint is in maintenance mode and its use is discouraged.
+ * Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor to find a replacement.
+ */
export async function startExtract(http: HttpClient, args: Parameters<typeof prepareExtractPayload>[0]): Promise<ExtractResponse> {
const payload = prepareExtractPayload(args);
try {
@@ -50,6 +54,10 @@ export async function startExtract(http: HttpClient, args: Parameters<typeof pre
}
}
+/**
+ * @deprecated The extract endpoint is in maintenance mode and its use is discouraged.
+ * Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor to find a replacement.
+ */
export async function getExtractStatus(http: HttpClient, jobId: string): Promise<ExtractResponse> {
try {
const res = await http.get<ExtractResponse>(`/v2/extract/${jobId}`);
@@ -61,6 +69,10 @@ export async function getExtractStatus(http: HttpClient, jobId: string): Promise
}
}
+/**
+ * @deprecated The extract endpoint is in maintenance mode and its use is discouraged.
+ * Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor to find a replacement.
+ */
export async function waitExtract(
http: HttpClient,
jobId: string,
@@ -76,6 +88,10 @@ export async function waitExtract(
}
}
+/**
+ * @deprecated The extract endpoint is in maintenance mode and its use is discouraged.
+ * Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor to find a replacement.
+ */
export async function extract(
http: HttpClient,
args: Parameters<typeof prepareExtractPayload>[0] & { pollInterval?: number; timeout?: number }
diff --git a/apps/python-sdk/firecrawl/__init__.py b/apps/python-sdk/firecrawl/__init__.py
index 907c9c134..1120f0106 100644
--- a/apps/python-sdk/firecrawl/__init__.py
+++ b/apps/python-sdk/firecrawl/__init__.py
@@ -17,7 +17,7 @@ from .v1 import (
V1ChangeTrackingOptions,
)
-__version__ = "4.16.0"
+__version__ = "4.16.1"
# Define the logger for the Firecrawl project
logger: logging.Logger = logging.getLogger("firecrawl")
diff --git a/apps/python-sdk/firecrawl/v1/client.py b/apps/python-sdk/firecrawl/v1/client.py
index bc21729da..ee67d63ff 100644
--- a/apps/python-sdk/firecrawl/v1/client.py
+++ b/apps/python-sdk/firecrawl/v1/client.py
@@ -1952,6 +1952,11 @@ class V1FirecrawlApp:
"""
Extract structured information from URLs.
+ .. deprecated::
+ The extract endpoint is in maintenance mode and its use is discouraged.
+ Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor
+ to find a replacement.
+
Args:
urls (Optional[List[str]]): URLs to extract from
prompt (Optional[str]): Custom extraction prompt
@@ -1972,6 +1977,14 @@ class V1FirecrawlApp:
Raises:
ValueError: If prompt/schema missing or extraction fails
"""
+ import warnings
+ warnings.warn(
+ "The extract endpoint is in maintenance mode and its use is discouraged. "
+ "Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor "
+ "to find a replacement.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
# Validate any additional kwargs
self._validate_kwargs(kwargs, "extract")
@@ -2056,6 +2069,11 @@ class V1FirecrawlApp:
"""
Retrieve the status of an extract job.
+ .. deprecated::
+ The extract endpoint is in maintenance mode and its use is discouraged.
+ Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor
+ to find a replacement.
+
Args:
job_id (str): The ID of the extract job.
@@ -2065,6 +2083,14 @@ class V1FirecrawlApp:
Raises:
ValueError: If there is an error retrieving the status.
"""
+ import warnings
+ warnings.warn(
+ "The extract endpoint is in maintenance mode and its use is discouraged. "
+ "Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor "
+ "to find a replacement.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
headers = self._prepare_headers()
try:
response = self._get_request(f'{self.api_url}/v1/extract/{job_id}', headers)
@@ -2092,6 +2118,11 @@ class V1FirecrawlApp:
"""
Initiate an asynchronous extract job.
+ .. deprecated::
+ The extract endpoint is in maintenance mode and its use is discouraged.
+ Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor
+ to find a replacement.
+
Args:
urls (List[str]): URLs to extract information from
prompt (Optional[str]): Custom extraction prompt
@@ -2112,6 +2143,14 @@ class V1FirecrawlApp:
Raises:
ValueError: If job initiation fails
"""
+ import warnings
+ warnings.warn(
+ "The extract endpoint is in maintenance mode and its use is discouraged. "
+ "Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor "
+ "to find a replacement.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
headers = self._prepare_headers()
schema = schema
@@ -4358,6 +4397,11 @@ class AsyncV1FirecrawlApp(V1FirecrawlApp):
"""
Asynchronously extract structured information from URLs.
+ .. deprecated::
+ The extract endpoint is in maintenance mode and its use is discouraged.
+ Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor
+ to find a replacement.
+
Args:
urls (Optional[List[str]]): URLs to extract from
prompt (Optional[str]): Custom extraction prompt
@@ -4377,6 +4421,14 @@ class AsyncV1FirecrawlApp(V1FirecrawlApp):
Raises:
ValueError: If prompt/schema missing or extraction fails
"""
+ import warnings
+ warnings.warn(
+ "The extract endpoint is in maintenance mode and its use is discouraged. "
+ "Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor "
+ "to find a replacement.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
headers = self._prepare_headers()
if not prompt and not schema:
diff --git a/apps/python-sdk/firecrawl/v2/client.py b/apps/python-sdk/firecrawl/v2/client.py
index 561969b88..dfa529fba 100644
--- a/apps/python-sdk/firecrawl/v2/client.py
+++ b/apps/python-sdk/firecrawl/v2/client.py
@@ -571,6 +571,11 @@ class FirecrawlClient:
):
"""Start an extract job (non-blocking).
+ .. deprecated::
+ The extract endpoint is in maintenance mode and its use is discouraged.
+ Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor
+ to find a replacement.
+
Args:
urls: URLs to extract from (optional)
prompt: Natural-language instruction for extraction
@@ -620,6 +625,11 @@ class FirecrawlClient:
):
"""Extract structured data and wait until completion.
+ .. deprecated::
+ The extract endpoint is in maintenance mode and its use is discouraged.
+ Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor
+ to find a replacement.
+
Args:
urls: URLs to extract from (optional)
prompt: Natural-language instruction for extraction
@@ -822,6 +832,11 @@ class FirecrawlClient:
def get_extract_status(self, job_id: str):
"""Get the current status (and data if completed) of an extract job.
+ .. deprecated::
+ The extract endpoint is in maintenance mode and its use is discouraged.
+ Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor
+ to find a replacement.
+
Args:
job_id: Extract job ID
diff --git a/apps/python-sdk/firecrawl/v2/client_async.py b/apps/python-sdk/firecrawl/v2/client_async.py
index 20fc9c5b2..cd7afbc49 100644
--- a/apps/python-sdk/firecrawl/v2/client_async.py
+++ b/apps/python-sdk/firecrawl/v2/client_async.py
@@ -309,7 +309,7 @@ class AsyncFirecrawlClient:
# Returns v2 errors structure; typed as CrawlErrorsResponse for parity
return await async_batch.get_batch_scrape_errors(self.async_http_client, job_id) # type: ignore[return-value]
- # Extract (proxy to v1 async)
+ # Extract (proxy to v1 async) — deprecated
async def extract(
self,
urls: Optional[List[str]] = None,
@@ -326,6 +326,13 @@ class AsyncFirecrawlClient:
timeout: Optional[int] = None,
integration: Optional[str] = None,
):
+ """Extract structured data and wait until completion (async).
+
+ .. deprecated::
+ The extract endpoint is in maintenance mode and its use is discouraged.
+ Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor
+ to find a replacement.
+ """
return await async_extract.extract(
self.async_http_client,
urls,
@@ -343,6 +350,13 @@ class AsyncFirecrawlClient:
)
async def get_extract_status(self, job_id: str):
+ """Get the current status (and data if completed) of an extract job (async).
+
+ .. deprecated::
+ The extract endpoint is in maintenance mode and its use is discouraged.
+ Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor
+ to find a replacement.
+ """
return await async_extract.get_extract_status(self.async_http_client, job_id)
async def start_extract(
@@ -359,6 +373,13 @@ class AsyncFirecrawlClient:
ignore_invalid_urls: Optional[bool] = None,
integration: Optional[str] = None,
):
+ """Start an extract job (non-blocking, async).
+
+ .. deprecated::
+ The extract endpoint is in maintenance mode and its use is discouraged.
+ Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor
+ to find a replacement.
+ """
return await async_extract.start_extract(
self.async_http_client,
urls,
diff --git a/apps/python-sdk/firecrawl/v2/methods/aio/extract.py b/apps/python-sdk/firecrawl/v2/methods/aio/extract.py
index 76fcbfac6..f9dfda2c2 100644
--- a/apps/python-sdk/firecrawl/v2/methods/aio/extract.py
+++ b/apps/python-sdk/firecrawl/v2/methods/aio/extract.py
@@ -1,10 +1,17 @@
from typing import Any, Dict, List, Optional
import asyncio
+import warnings
from ...types import ExtractResponse, ScrapeOptions
from ...utils.http_client_async import AsyncHttpClient
from ...utils.validation import prepare_scrape_options
+_EXTRACT_DEPRECATION_MSG = (
+ "The extract endpoint is in maintenance mode and its use is discouraged. "
+ "Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor "
+ "to find a replacement."
+)
+
def _prepare_extract_request(
urls: Optional[List[str]],
@@ -59,6 +66,14 @@ async def start_extract(
ignore_invalid_urls: Optional[bool] = None,
integration: Optional[str] = None,
) -> ExtractResponse:
+ """Start an extract job (non-blocking, async).
+
+ .. deprecated::
+ The extract endpoint is in maintenance mode and its use is discouraged.
+ Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor
+ to find a replacement.
+ """
+ warnings.warn(_EXTRACT_DEPRECATION_MSG, DeprecationWarning, stacklevel=2)
body = _prepare_extract_request(
urls,
prompt=prompt,
@@ -76,6 +91,14 @@ async def start_extract(
async def get_extract_status(client: AsyncHttpClient, job_id: str) -> ExtractResponse:
+ """Get the current status of an extract job (async).
+
+ .. deprecated::
+ The extract endpoint is in maintenance mode and its use is discouraged.
+ Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor
+ to find a replacement.
+ """
+ warnings.warn(_EXTRACT_DEPRECATION_MSG, DeprecationWarning, stacklevel=2)
resp = await client.get(f"/v2/extract/{job_id}")
return ExtractResponse(**resp.json())
@@ -113,6 +136,14 @@ async def extract(
timeout: Optional[int] = None,
integration: Optional[str] = None,
) -> ExtractResponse:
+ """Extract structured data and wait until completion (async).
+
+ .. deprecated::
+ The extract endpoint is in maintenance mode and its use is discouraged.
+ Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor
+ to find a replacement.
+ """
+ warnings.warn(_EXTRACT_DEPRECATION_MSG, DeprecationWarning, stacklevel=2)
started = await start_extract(
client,
urls,
diff --git a/apps/python-sdk/firecrawl/v2/methods/extract.py b/apps/python-sdk/firecrawl/v2/methods/extract.py
index 96d7804ae..73a7ce5c6 100644
--- a/apps/python-sdk/firecrawl/v2/methods/extract.py
+++ b/apps/python-sdk/firecrawl/v2/methods/extract.py
@@ -1,5 +1,6 @@
from typing import Any, Dict, List, Optional
import time
+import warnings
from ..types import ExtractResponse, ScrapeOptions
from ..types import AgentOptions
@@ -7,6 +8,12 @@ from ..utils.http_client import HttpClient
from ..utils.validation import prepare_scrape_options
from ..utils.error_handler import handle_response_error
+_EXTRACT_DEPRECATION_MSG = (
+ "The extract endpoint is in maintenance mode and its use is discouraged. "
+ "Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor "
+ "to find a replacement."
+)
+
def _prepare_extract_request(
urls: Optional[List[str]],
@@ -79,6 +86,14 @@ def start_extract(
integration: Optional[str] = None,
agent: Optional[AgentOptions] = None,
) -> ExtractResponse:
+ """Start an extract job (non-blocking).
+
+ .. deprecated::
+ The extract endpoint is in maintenance mode and its use is discouraged.
+ Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor
+ to find a replacement.
+ """
+ warnings.warn(_EXTRACT_DEPRECATION_MSG, DeprecationWarning, stacklevel=2)
body = _prepare_extract_request(
urls,
prompt=prompt,
@@ -100,6 +115,14 @@ def start_extract(
def get_extract_status(client: HttpClient, job_id: str) -> ExtractResponse:
+ """Get the current status of an extract job.
+
+ .. deprecated::
+ The extract endpoint is in maintenance mode and its use is discouraged.
+ Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor
+ to find a replacement.
+ """
+ warnings.warn(_EXTRACT_DEPRECATION_MSG, DeprecationWarning, stacklevel=2)
resp = client.get(f"/v2/extract/{job_id}")
if not resp.ok:
handle_response_error(resp, "extract-status")
@@ -141,6 +164,14 @@ def extract(
integration: Optional[str] = None,
agent: Optional[AgentOptions] = None,
) -> ExtractResponse:
+ """Extract structured data and wait until completion.
+
+ .. deprecated::
+ The extract endpoint is in maintenance mode and its use is discouraged.
+ Review https://docs.firecrawl.dev/developer-guides/usage-guides/choosing-the-data-extractor
+ to find a replacement.
+ """
+ warnings.warn(_EXTRACT_DEPRECATION_MSG, DeprecationWarning, stacklevel=2)
started = start_extract(
client,
urls,