firecrawl 1.14.0__tar.gz → 1.15.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of firecrawl might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: firecrawl
3
- Version: 1.14.0
3
+ Version: 1.15.0
4
4
  Summary: Python SDK for Firecrawl API
5
5
  Home-page: https://github.com/mendableai/firecrawl
6
6
  Author: Mendable.ai
@@ -13,7 +13,7 @@ import os
13
13
 
14
14
  from .firecrawl import FirecrawlApp # noqa
15
15
 
16
- __version__ = "1.14.0"
16
+ __version__ = "1.15.0"
17
17
 
18
18
  # Define the logger for the Firecrawl project
19
19
  logger: logging.Logger = logging.getLogger("firecrawl")
@@ -48,6 +48,8 @@ class DeepResearchParams(pydantic.BaseModel):
48
48
  maxDepth: Optional[int] = 7
49
49
  timeLimit: Optional[int] = 270
50
50
  maxUrls: Optional[int] = 20
51
+ analysisPrompt: Optional[str] = None
52
+ systemPrompt: Optional[str] = None
51
53
  __experimental_streamSteps: Optional[bool] = None
52
54
 
53
55
  class DeepResearchResponse(pydantic.BaseModel):
@@ -681,6 +683,8 @@ class FirecrawlApp:
681
683
  'origin': 'api-sdk'
682
684
  }
683
685
 
686
+ if not request_data['urls']:
687
+ request_data['urls'] = []
684
688
  # Only add prompt and systemPrompt if they exist
685
689
  if params.get('prompt'):
686
690
  request_data['prompt'] = params['prompt']
@@ -1096,6 +1100,8 @@ class FirecrawlApp:
1096
1100
 
1097
1101
  if response.status_code == 402:
1098
1102
  message = f"Payment Required: Failed to {action}. {error_message} - {error_details}"
1103
+ elif response.status_code == 403:
1104
+ message = f"Website Not Supported: Failed to {action}. {error_message} - {error_details}"
1099
1105
  elif response.status_code == 408:
1100
1106
  message = f"Request Timeout: Failed to {action} as the request timed out. {error_message} - {error_details}"
1101
1107
  elif response.status_code == 409:
@@ -1166,7 +1172,6 @@ class FirecrawlApp:
1166
1172
  time.sleep(2) # Polling interval
1167
1173
 
1168
1174
  return {'success': False, 'error': 'Deep research job terminated unexpectedly'}
1169
-
1170
1175
  def async_deep_research(self, query: str, params: Optional[Union[Dict[str, Any], DeepResearchParams]] = None) -> Dict[str, Any]:
1171
1176
  """
1172
1177
  Initiates an asynchronous deep research operation.
@@ -1190,8 +1195,15 @@ class FirecrawlApp:
1190
1195
  research_params = params
1191
1196
 
1192
1197
  headers = self._prepare_headers()
1198
+
1193
1199
  json_data = {'query': query, **research_params.dict(exclude_none=True)}
1194
1200
 
1201
+ # Handle json options schema if present
1202
+ if 'jsonOptions' in json_data:
1203
+ json_opts = json_data['jsonOptions']
1204
+ if json_opts and 'schema' in json_opts and hasattr(json_opts['schema'], 'schema'):
1205
+ json_data['jsonOptions']['schema'] = json_opts['schema'].schema()
1206
+
1195
1207
  try:
1196
1208
  response = self._post_request(f'{self.api_url}/v1/deep-research', json_data, headers)
1197
1209
  if response.status_code == 200:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: firecrawl
3
- Version: 1.14.0
3
+ Version: 1.15.0
4
4
  Summary: Python SDK for Firecrawl API
5
5
  Home-page: https://github.com/mendableai/firecrawl
6
6
  Author: Mendable.ai
File without changes
File without changes
File without changes
File without changes
File without changes