Skip to content

Firecrawl plugin: upgrade v1 -> v2 API#1

Closed
rakshith48 wants to merge 4 commits into
mainfrom
firecrawl-plugin-v2
Closed

Firecrawl plugin: upgrade v1 -> v2 API#1
rakshith48 wants to merge 4 commits into
mainfrom
firecrawl-plugin-v2

Conversation

@rakshith48
Copy link
Copy Markdown
Owner

Summary

Upgrades the Firecrawl marketplace plugin (tools/firecrawl/) from the legacy v1 Firecrawl API to v2, following the exact endpoint paths that Dify's own core extractor (api/core/rag/extractor/firecrawl/firecrawl_app.py in langgenius/dify) already uses.

Changes

  • tools/firecrawl_appx.py — custom HTTP client: all endpoints switched /v1/* -> /v2/*:
    • v2/scrape, v2/crawl, v2/map, v2/crawl/{id} (status GET + cancel DELETE).
  • tools/scrape.py — v2 removed the top-level extract field; structured/LLM extraction is now a {"type": "json", schema, prompt, systemPrompt} object inside the formats array. The tool now builds that json format from the existing schema/systemPrompt/prompt inputs. User-facing parameters and tool outputs are unchanged.
  • manifest.yaml — version bump 0.0.9 -> 0.1.0.

Tool inputs/outputs and the provider registration are otherwise preserved. crawl/map/crawl_job payload shapes are unchanged (v2 accepts the same fields and passes through additional params, matching the core extractor's pass-through approach).

Verification

  • python -m py_compile passes on all changed .py files (firecrawl_appx.py, scrape.py, and the unchanged crawl.py/map.py/crawl_job.py/provider/firecrawl.py).
  • All plugin .yaml files parse cleanly via yaml.safe_load.
  • Endpoint paths verified against Dify core's firecrawl_app.py (already on v2) and the Firecrawl v2 API docs.
  • NOT run end-to-end. A full Dify plugin runtime test requires a live Firecrawl API key and the Dify plugin SDK/daemon, which were not available in this environment. This PR is static-checked only — it has not been exercised against a live v2 API.

🤖 Generated with Claude Code

Switch the custom HTTP client (firecrawl_appx.py) from the legacy
/v1/* endpoints to /v2/* endpoints, mirroring the paths Dify's own core
extractor (api/core/rag/extractor/firecrawl/firecrawl_app.py) already
uses: v2/scrape, v2/crawl, v2/map, v2/crawl/{id}.

Scrape tool: in v2 the top-level "extract" field was removed; structured
/ LLM extraction is now expressed as a {"type": "json", schema, prompt,
systemPrompt} object inside the formats array. The scrape tool now builds
that json format object from the existing schema/systemPrompt/prompt
inputs, so the user-facing parameters and outputs are preserved.

Bump plugin version 0.0.9 -> 0.1.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rakshith48 rakshith48 marked this pull request as ready for review June 4, 2026 07:50
rakshith48 and others added 3 commits June 4, 2026 13:28
v2 JsonFormat only supports {type, prompt, schema}; the carried-over systemPrompt
would be silently ignored. Merge any system prompt into the single prompt field.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…gnore_sitemap)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…gnore_sitemap)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rakshith48
Copy link
Copy Markdown
Owner Author

Superseded — migrated to upstream: langgenius#3250

@rakshith48 rakshith48 closed this Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants