firecrawl 4.53.2__tar.gz → 4.53.3__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.
- {firecrawl-4.53.2 → firecrawl-4.53.3}/PKG-INFO +2 -1
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__init__.py +1 -1
- firecrawl-4.53.3/firecrawl/__tests__/unit/v2/methods/test_agent_location.py +55 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/client.py +18 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/client_async.py +8 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/agent.py +14 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/aio/agent.py +14 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/types.py +9 -1
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl.egg-info/PKG-INFO +2 -1
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl.egg-info/SOURCES.txt +1 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl.egg-info/requires.txt +1 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/pyproject.toml +1 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/setup.py +1 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/LICENSE +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/README.md +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/aio/conftest.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/aio/test_aio_batch_scrape.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/aio/test_aio_crawl.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/aio/test_aio_extract.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/aio/test_aio_map.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/aio/test_aio_parse.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/aio/test_aio_scrape.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/aio/test_aio_search.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/aio/test_aio_usage.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/aio/test_aio_watcher.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/conftest.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/test_async.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/test_batch_scrape.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/test_crawl.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/test_extract.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/test_map.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/test_parse.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/test_scrape.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/test_search.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/test_usage.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/test_watcher.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/test_recursive_schema_v1.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/test_v1_batch_scrape_polling.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/test_v1_next_url_pinning.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/aio/test_aio_crawl_params.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/aio/test_aio_crawl_request_preparation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/aio/test_aio_crawl_validation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/aio/test_aio_map_request_preparation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/aio/test_aio_parse_request_preparation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/aio/test_aio_research.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/aio/test_aio_scrape_request_preparation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/aio/test_aio_search_request_preparation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/aio/test_aio_threat_protection_request_preparation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/aio/test_batch_request_preparation_async.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/aio/test_ensure_async.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_agent.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_agent_hints.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_agent_request_preparation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_agent_thread.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_agent_webhook.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_audit_metadata_request_preparation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_batch_request_preparation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_branding.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_browser_request_preparation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_crawl_cancel.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_crawl_errors.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_crawl_job_fields.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_crawl_params.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_crawl_request_preparation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_crawl_validation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_developer_search.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_gov_search.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_map_request_preparation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_menu.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_pagination.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_parse_formats.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_parse_request_preparation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_product.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_research.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_scrape_errors.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_scrape_request_preparation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_search_request_preparation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_search_response.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_search_validation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_threat_protection_request_preparation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_tools.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_usage_types.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_webhook.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/test_monitor_types.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/test_scrape_auto_resume.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/utils/test_document_blocks.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/utils/test_http_client_async_url.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/utils/test_metadata_extras.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/utils/test_metadata_extras_multivalue.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/utils/test_origin.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/utils/test_recursive_schema.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/utils/test_v1_compat.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/utils/test_validation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/watcher/test_ws_watcher.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/client.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/firecrawl.backup.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/types.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v1/__init__.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v1/client.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/__init__.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/aio/__init__.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/aio/batch.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/aio/browser.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/aio/crawl.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/aio/developer.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/aio/extract.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/aio/gov.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/aio/map.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/aio/monitor.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/aio/parse.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/aio/research.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/aio/scrape.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/aio/search.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/aio/usage.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/batch.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/browser.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/crawl.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/developer.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/extract.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/gov.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/map.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/monitor.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/parse.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/research.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/research_docs.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/scrape.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/search.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/methods/usage.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/utils/__init__.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/utils/agent_hints.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/utils/api_origin.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/utils/auto_resume.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/utils/caller_origin.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/utils/error_handler.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/utils/get_version.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/utils/http_client.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/utils/http_client_async.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/utils/normalize.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/utils/v1_compat.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/utils/validation.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/watcher.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/v2/watcher_async.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl.egg-info/dependency_links.txt +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl.egg-info/top_level.txt +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/setup.cfg +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/tests/test_agent_integration.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/tests/test_agent_partial_types.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/tests/test_api_key_handling.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/tests/test_change_tracking.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/tests/test_crawl_direct_kwargs.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/tests/test_find_tools_data.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/tests/test_format_type_defaults.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/tests/test_search_data_property.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/tests/test_timeout_conversion.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/tests/test_v1_aliases.py +0 -0
- {firecrawl-4.53.2 → firecrawl-4.53.3}/tests/test_v1_async_batch_scrape.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: firecrawl
|
|
3
|
-
Version: 4.53.
|
|
3
|
+
Version: 4.53.3
|
|
4
4
|
Summary: Python SDK for Firecrawl, the context API for AI agents: search, scrape, parse, crawl, map, and interact with the web, run Agent and Monitor jobs, and search scientific papers (PubMed, bioRxiv, medRxiv, arXiv)
|
|
5
5
|
Home-page: https://github.com/firecrawl/firecrawl
|
|
6
6
|
Author: Firecrawl
|
|
@@ -39,6 +39,7 @@ Description-Content-Type: text/markdown
|
|
|
39
39
|
License-File: LICENSE
|
|
40
40
|
Requires-Dist: requests
|
|
41
41
|
Requires-Dist: httpx
|
|
42
|
+
Requires-Dist: certifi>=2026.10.19
|
|
42
43
|
Requires-Dist: python-dotenv
|
|
43
44
|
Requires-Dist: websockets
|
|
44
45
|
Requires-Dist: nest-asyncio
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
|
|
3
|
+
from firecrawl.v2.methods.agent import _prepare_agent_request, start_agent
|
|
4
|
+
from firecrawl.v2.methods.aio import agent as async_agent
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class _FakeResponse:
|
|
8
|
+
ok = True
|
|
9
|
+
status_code = 200
|
|
10
|
+
|
|
11
|
+
def json(self):
|
|
12
|
+
return {"success": True, "id": "agent-1"}
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class _FakeClient:
|
|
16
|
+
def __init__(self):
|
|
17
|
+
self.last_post = None
|
|
18
|
+
|
|
19
|
+
def post(self, endpoint, payload):
|
|
20
|
+
self.last_post = (endpoint, payload)
|
|
21
|
+
return _FakeResponse()
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class _FakeAsyncClient(_FakeClient):
|
|
25
|
+
async def post(self, endpoint, payload):
|
|
26
|
+
return super().post(endpoint, payload)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def test_prepare_includes_location():
|
|
30
|
+
data = _prepare_agent_request(None, prompt="p", location={"country": "DE"})
|
|
31
|
+
assert data["location"] == {"country": "DE"}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def test_prepare_omits_location_by_default():
|
|
35
|
+
data = _prepare_agent_request(None, prompt="p")
|
|
36
|
+
assert "location" not in data
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def test_start_agent_sends_location():
|
|
40
|
+
client = _FakeClient()
|
|
41
|
+
start_agent(client, None, prompt="p", location={"country": "DE"})
|
|
42
|
+
assert client.last_post == (
|
|
43
|
+
"/v2/agent",
|
|
44
|
+
{"prompt": "p", "location": {"country": "DE"}},
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
@pytest.mark.asyncio
|
|
49
|
+
async def test_async_start_agent_sends_location():
|
|
50
|
+
client = _FakeAsyncClient()
|
|
51
|
+
await async_agent.start_agent(client, None, prompt="p", location={"country": "DE"})
|
|
52
|
+
assert client.last_post == (
|
|
53
|
+
"/v2/agent",
|
|
54
|
+
{"prompt": "p", "location": {"country": "DE"}},
|
|
55
|
+
)
|
|
@@ -1552,6 +1552,8 @@ class FirecrawlClient:
|
|
|
1552
1552
|
thread_id: Optional[str] = None,
|
|
1553
1553
|
mode: Optional[Literal["extract", "chat"]] = None,
|
|
1554
1554
|
exchange: Optional[Union[AgentExchangeOptions, Dict[str, Any]]] = None,
|
|
1555
|
+
location: Optional[Dict[str, str]] = None,
|
|
1556
|
+
zero_data_retention: Optional[bool] = None,
|
|
1555
1557
|
):
|
|
1556
1558
|
"""Start an agent job (non-blocking).
|
|
1557
1559
|
|
|
@@ -1570,6 +1572,11 @@ class FirecrawlClient:
|
|
|
1570
1572
|
thread_id: Continue an existing thread instead of starting one
|
|
1571
1573
|
mode: "extract" (default) or "chat"
|
|
1572
1574
|
exchange: Data provider options, forwarded as sent
|
|
1575
|
+
location: Country for the whole run, as ``{"country": "DE"}``
|
|
1576
|
+
(ISO 3166-1 alpha-2). Scrapes and browser sessions are proxied
|
|
1577
|
+
from it, and search results are localized to it without changing
|
|
1578
|
+
where requests come from. The agent cannot change it.
|
|
1579
|
+
zero_data_retention: Run the agent with zero data retention (requires the team to have ZDR enabled)
|
|
1573
1580
|
Returns:
|
|
1574
1581
|
Response payload with job id/status (poll with get_agent_status)
|
|
1575
1582
|
"""
|
|
@@ -1589,6 +1596,8 @@ class FirecrawlClient:
|
|
|
1589
1596
|
thread_id=thread_id,
|
|
1590
1597
|
mode=mode,
|
|
1591
1598
|
exchange=exchange,
|
|
1599
|
+
location=location,
|
|
1600
|
+
zero_data_retention=zero_data_retention,
|
|
1592
1601
|
)
|
|
1593
1602
|
|
|
1594
1603
|
def agent(
|
|
@@ -1610,6 +1619,8 @@ class FirecrawlClient:
|
|
|
1610
1619
|
thread_id: Optional[str] = None,
|
|
1611
1620
|
mode: Optional[Literal["extract", "chat"]] = None,
|
|
1612
1621
|
exchange: Optional[Union[AgentExchangeOptions, Dict[str, Any]]] = None,
|
|
1622
|
+
location: Optional[Dict[str, str]] = None,
|
|
1623
|
+
zero_data_retention: Optional[bool] = None,
|
|
1613
1624
|
):
|
|
1614
1625
|
"""Run an agent and wait until completion.
|
|
1615
1626
|
|
|
@@ -1630,6 +1641,11 @@ class FirecrawlClient:
|
|
|
1630
1641
|
thread_id: Continue an existing thread instead of starting one
|
|
1631
1642
|
mode: "extract" (default) or "chat"
|
|
1632
1643
|
exchange: Data provider options, forwarded as sent
|
|
1644
|
+
location: Country for the whole run, as ``{"country": "DE"}``
|
|
1645
|
+
(ISO 3166-1 alpha-2). Scrapes and browser sessions are proxied
|
|
1646
|
+
from it, and search results are localized to it without changing
|
|
1647
|
+
where requests come from. The agent cannot change it.
|
|
1648
|
+
zero_data_retention: Run the agent with zero data retention (requires the team to have ZDR enabled)
|
|
1633
1649
|
Returns:
|
|
1634
1650
|
Final agent response when completed
|
|
1635
1651
|
"""
|
|
@@ -1651,6 +1667,8 @@ class FirecrawlClient:
|
|
|
1651
1667
|
thread_id=thread_id,
|
|
1652
1668
|
mode=mode,
|
|
1653
1669
|
exchange=exchange,
|
|
1670
|
+
location=location,
|
|
1671
|
+
zero_data_retention=zero_data_retention,
|
|
1654
1672
|
)
|
|
1655
1673
|
|
|
1656
1674
|
def get_agent_status(self, job_id: str):
|
|
@@ -876,6 +876,8 @@ class AsyncFirecrawlClient:
|
|
|
876
876
|
thread_id: Optional[str] = None,
|
|
877
877
|
mode: Optional[Literal["extract", "chat"]] = None,
|
|
878
878
|
exchange: Optional[Union[AgentExchangeOptions, Dict[str, Any]]] = None,
|
|
879
|
+
location: Optional[Dict[str, str]] = None,
|
|
880
|
+
zero_data_retention: Optional[bool] = None,
|
|
879
881
|
):
|
|
880
882
|
return await async_agent.agent(
|
|
881
883
|
self.async_http_client,
|
|
@@ -895,6 +897,8 @@ class AsyncFirecrawlClient:
|
|
|
895
897
|
thread_id=thread_id,
|
|
896
898
|
mode=mode,
|
|
897
899
|
exchange=exchange,
|
|
900
|
+
location=location,
|
|
901
|
+
zero_data_retention=zero_data_retention,
|
|
898
902
|
)
|
|
899
903
|
|
|
900
904
|
async def get_agent_status(self, job_id: str):
|
|
@@ -917,6 +921,8 @@ class AsyncFirecrawlClient:
|
|
|
917
921
|
thread_id: Optional[str] = None,
|
|
918
922
|
mode: Optional[Literal["extract", "chat"]] = None,
|
|
919
923
|
exchange: Optional[Union[AgentExchangeOptions, Dict[str, Any]]] = None,
|
|
924
|
+
location: Optional[Dict[str, str]] = None,
|
|
925
|
+
zero_data_retention: Optional[bool] = None,
|
|
920
926
|
):
|
|
921
927
|
return await async_agent.start_agent(
|
|
922
928
|
self.async_http_client,
|
|
@@ -934,6 +940,8 @@ class AsyncFirecrawlClient:
|
|
|
934
940
|
thread_id=thread_id,
|
|
935
941
|
mode=mode,
|
|
936
942
|
exchange=exchange,
|
|
943
|
+
location=location,
|
|
944
|
+
zero_data_retention=zero_data_retention,
|
|
937
945
|
)
|
|
938
946
|
|
|
939
947
|
async def cancel_agent(self, job_id: str) -> bool:
|
|
@@ -33,6 +33,8 @@ def _prepare_agent_request(
|
|
|
33
33
|
thread_id: Optional[str] = None,
|
|
34
34
|
mode: Optional[Literal["extract", "chat"]] = None,
|
|
35
35
|
exchange: Optional[Union[AgentExchangeOptions, Dict[str, Any]]] = None,
|
|
36
|
+
location: Optional[Dict[str, str]] = None,
|
|
37
|
+
zero_data_retention: Optional[bool] = None,
|
|
36
38
|
) -> Dict[str, Any]:
|
|
37
39
|
body: Dict[str, Any] = {}
|
|
38
40
|
if urls is not None:
|
|
@@ -78,6 +80,10 @@ def _prepare_agent_request(
|
|
|
78
80
|
if isinstance(exchange, dict)
|
|
79
81
|
else exchange.model_dump(by_alias=True, exclude_none=True)
|
|
80
82
|
)
|
|
83
|
+
if location is not None:
|
|
84
|
+
body["location"] = {"country": location["country"]}
|
|
85
|
+
if zero_data_retention is not None:
|
|
86
|
+
body["zeroDataRetention"] = zero_data_retention
|
|
81
87
|
return body
|
|
82
88
|
|
|
83
89
|
|
|
@@ -107,6 +113,8 @@ def start_agent(
|
|
|
107
113
|
thread_id: Optional[str] = None,
|
|
108
114
|
mode: Optional[Literal["extract", "chat"]] = None,
|
|
109
115
|
exchange: Optional[Union[AgentExchangeOptions, Dict[str, Any]]] = None,
|
|
116
|
+
location: Optional[Dict[str, str]] = None,
|
|
117
|
+
zero_data_retention: Optional[bool] = None,
|
|
110
118
|
) -> AgentResponse:
|
|
111
119
|
body = _prepare_agent_request(
|
|
112
120
|
urls,
|
|
@@ -123,6 +131,8 @@ def start_agent(
|
|
|
123
131
|
thread_id=thread_id,
|
|
124
132
|
mode=mode,
|
|
125
133
|
exchange=exchange,
|
|
134
|
+
location=location,
|
|
135
|
+
zero_data_retention=zero_data_retention,
|
|
126
136
|
)
|
|
127
137
|
resp = client.post("/v2/agent", body)
|
|
128
138
|
if not resp.ok:
|
|
@@ -202,6 +212,8 @@ def agent(
|
|
|
202
212
|
thread_id: Optional[str] = None,
|
|
203
213
|
mode: Optional[Literal["extract", "chat"]] = None,
|
|
204
214
|
exchange: Optional[Union[AgentExchangeOptions, Dict[str, Any]]] = None,
|
|
215
|
+
location: Optional[Dict[str, str]] = None,
|
|
216
|
+
zero_data_retention: Optional[bool] = None,
|
|
205
217
|
) -> AgentResponse:
|
|
206
218
|
started = start_agent(
|
|
207
219
|
client,
|
|
@@ -219,6 +231,8 @@ def agent(
|
|
|
219
231
|
thread_id=thread_id,
|
|
220
232
|
mode=mode,
|
|
221
233
|
exchange=exchange,
|
|
234
|
+
location=location,
|
|
235
|
+
zero_data_retention=zero_data_retention,
|
|
222
236
|
)
|
|
223
237
|
job_id = getattr(started, "id", None)
|
|
224
238
|
if not job_id:
|
|
@@ -33,6 +33,8 @@ def _prepare_agent_request(
|
|
|
33
33
|
thread_id: Optional[str] = None,
|
|
34
34
|
mode: Optional[Literal["extract", "chat"]] = None,
|
|
35
35
|
exchange: Optional[Union[AgentExchangeOptions, Dict[str, Any]]] = None,
|
|
36
|
+
location: Optional[Dict[str, str]] = None,
|
|
37
|
+
zero_data_retention: Optional[bool] = None,
|
|
36
38
|
) -> Dict[str, Any]:
|
|
37
39
|
body: Dict[str, Any] = {}
|
|
38
40
|
if urls is not None:
|
|
@@ -78,6 +80,10 @@ def _prepare_agent_request(
|
|
|
78
80
|
if isinstance(exchange, dict)
|
|
79
81
|
else exchange.model_dump(by_alias=True, exclude_none=True)
|
|
80
82
|
)
|
|
83
|
+
if location is not None:
|
|
84
|
+
body["location"] = {"country": location["country"]}
|
|
85
|
+
if zero_data_retention is not None:
|
|
86
|
+
body["zeroDataRetention"] = zero_data_retention
|
|
81
87
|
return body
|
|
82
88
|
|
|
83
89
|
|
|
@@ -107,6 +113,8 @@ async def start_agent(
|
|
|
107
113
|
thread_id: Optional[str] = None,
|
|
108
114
|
mode: Optional[Literal["extract", "chat"]] = None,
|
|
109
115
|
exchange: Optional[Union[AgentExchangeOptions, Dict[str, Any]]] = None,
|
|
116
|
+
location: Optional[Dict[str, str]] = None,
|
|
117
|
+
zero_data_retention: Optional[bool] = None,
|
|
110
118
|
) -> AgentResponse:
|
|
111
119
|
body = _prepare_agent_request(
|
|
112
120
|
urls,
|
|
@@ -123,6 +131,8 @@ async def start_agent(
|
|
|
123
131
|
thread_id=thread_id,
|
|
124
132
|
mode=mode,
|
|
125
133
|
exchange=exchange,
|
|
134
|
+
location=location,
|
|
135
|
+
zero_data_retention=zero_data_retention,
|
|
126
136
|
)
|
|
127
137
|
resp = await client.post("/v2/agent", body)
|
|
128
138
|
if resp.status_code >= 400:
|
|
@@ -202,6 +212,8 @@ async def agent(
|
|
|
202
212
|
thread_id: Optional[str] = None,
|
|
203
213
|
mode: Optional[Literal["extract", "chat"]] = None,
|
|
204
214
|
exchange: Optional[Union[AgentExchangeOptions, Dict[str, Any]]] = None,
|
|
215
|
+
location: Optional[Dict[str, str]] = None,
|
|
216
|
+
zero_data_retention: Optional[bool] = None,
|
|
205
217
|
) -> AgentResponse:
|
|
206
218
|
started = await start_agent(
|
|
207
219
|
client,
|
|
@@ -219,6 +231,8 @@ async def agent(
|
|
|
219
231
|
thread_id=thread_id,
|
|
220
232
|
mode=mode,
|
|
221
233
|
exchange=exchange,
|
|
234
|
+
location=location,
|
|
235
|
+
zero_data_retention=zero_data_retention,
|
|
222
236
|
)
|
|
223
237
|
job_id = getattr(started, "id", None)
|
|
224
238
|
if not job_id:
|
|
@@ -1919,7 +1919,12 @@ class AgentTraceError(BaseModel):
|
|
|
1919
1919
|
"""Structured error attached to terminal/error trace events."""
|
|
1920
1920
|
|
|
1921
1921
|
code: Literal[
|
|
1922
|
-
"cancelled",
|
|
1922
|
+
"cancelled",
|
|
1923
|
+
"credit_limit_reached",
|
|
1924
|
+
"insufficient_credits",
|
|
1925
|
+
"parent_finished",
|
|
1926
|
+
"refused",
|
|
1927
|
+
"internal",
|
|
1923
1928
|
]
|
|
1924
1929
|
source: Literal["agent", "tool", "billing", "system"]
|
|
1925
1930
|
retryable: bool
|
|
@@ -2081,6 +2086,9 @@ class AgentTraceResponse(BaseModel):
|
|
|
2081
2086
|
active_browser_sessions: Optional[List[AgentTraceActiveBrowserSession]] = Field(
|
|
2082
2087
|
default=None, alias="activeBrowserSessions"
|
|
2083
2088
|
)
|
|
2089
|
+
zero_data_retention: Optional[bool] = Field(
|
|
2090
|
+
default=None, alias="zeroDataRetention"
|
|
2091
|
+
)
|
|
2084
2092
|
error: Optional[str] = None
|
|
2085
2093
|
|
|
2086
2094
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: firecrawl
|
|
3
|
-
Version: 4.53.
|
|
3
|
+
Version: 4.53.3
|
|
4
4
|
Summary: Python SDK for Firecrawl, the context API for AI agents: search, scrape, parse, crawl, map, and interact with the web, run Agent and Monitor jobs, and search scientific papers (PubMed, bioRxiv, medRxiv, arXiv)
|
|
5
5
|
Home-page: https://github.com/firecrawl/firecrawl
|
|
6
6
|
Author: Firecrawl
|
|
@@ -39,6 +39,7 @@ Description-Content-Type: text/markdown
|
|
|
39
39
|
License-File: LICENSE
|
|
40
40
|
Requires-Dist: requests
|
|
41
41
|
Requires-Dist: httpx
|
|
42
|
+
Requires-Dist: certifi>=2026.10.19
|
|
42
43
|
Requires-Dist: python-dotenv
|
|
43
44
|
Requires-Dist: websockets
|
|
44
45
|
Requires-Dist: nest-asyncio
|
|
@@ -39,6 +39,7 @@ firecrawl/__tests__/unit/v2/test_monitor_types.py
|
|
|
39
39
|
firecrawl/__tests__/unit/v2/test_scrape_auto_resume.py
|
|
40
40
|
firecrawl/__tests__/unit/v2/methods/test_agent.py
|
|
41
41
|
firecrawl/__tests__/unit/v2/methods/test_agent_hints.py
|
|
42
|
+
firecrawl/__tests__/unit/v2/methods/test_agent_location.py
|
|
42
43
|
firecrawl/__tests__/unit/v2/methods/test_agent_request_preparation.py
|
|
43
44
|
firecrawl/__tests__/unit/v2/methods/test_agent_thread.py
|
|
44
45
|
firecrawl/__tests__/unit/v2/methods/test_agent_webhook.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/e2e/v2/aio/test_aio_batch_scrape.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/test_v1_batch_scrape_polling.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/aio/test_aio_research.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/aio/test_ensure_async.py
RENAMED
|
File without changes
|
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_agent_hints.py
RENAMED
|
File without changes
|
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_agent_thread.py
RENAMED
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_agent_webhook.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_crawl_cancel.py
RENAMED
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_crawl_errors.py
RENAMED
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_crawl_job_fields.py
RENAMED
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_crawl_params.py
RENAMED
|
File without changes
|
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_crawl_validation.py
RENAMED
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_developer_search.py
RENAMED
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_gov_search.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_pagination.py
RENAMED
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_parse_formats.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_scrape_errors.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_search_response.py
RENAMED
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_search_validation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/methods/test_usage_types.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/test_scrape_auto_resume.py
RENAMED
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/utils/test_document_blocks.py
RENAMED
|
File without changes
|
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/utils/test_metadata_extras.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/utils/test_recursive_schema.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{firecrawl-4.53.2 → firecrawl-4.53.3}/firecrawl/__tests__/unit/v2/watcher/test_ws_watcher.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|