Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] bad request with system prompt or prompt #1299

Open
22Goose opened this issue Mar 5, 2025 · 2 comments
Open

[Bug] bad request with system prompt or prompt #1299

22Goose opened this issue Mar 5, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@22Goose
Copy link

22Goose commented Mar 5, 2025

Describe the Bug
bad request with system prompt or prompt, ok without either of them
To Reproduce
use the api playground, with following settings

import requests

url = "https://api.firecrawl.dev/v1/scrape"

payload = {
    "formats": ["markdown"],
    "onlyMainContent": True,
    "waitFor": 0,
    "mobile": False,
    "skipTlsVerification": False,
    "timeout": 30000,
    "location": {"country": "US"},
    "blockAds": True,
    "url": "https://example.com",
    "jsonOptions": {"systemPrompt": "提取该网页的主要内容,转换成大语言模型容易理解的 markdown 格式"}
}
headers = {
    "Authorization": "Bearer <key>",
    "Content-Type": "application/json"
}

response = requests.request("POST", url, json=payload, headers=headers)

print(response.text)

the response is 400 bad request

{"success":false,"error":"Bad Request","details":[{"code":"custom","message":"When 'extract' or 'json' format is specified, corresponding options must be provided, and vice versa","path":[]}]}

AND!!!

there is no such variables called "corresponding options"!!!

Expected Behavior
need to be a good request with the page content feedback
Screenshots

Image

Environment (please complete the following information):

  • OS: [Windows]
  • Firecrawl Version: the api reference try out
  • Node.js Version: NA

Logs
None

Additional Context
the dify plugin and the local python try out both failed

@22Goose 22Goose added the bug Something isn't working label Mar 5, 2025
@nickscamara
Copy link
Member

nickscamara commented Mar 5, 2025

Hey @22Goose you must provide format json under formats as well. Let me know if that works.

@22Goose
Copy link
Author

22Goose commented Mar 6, 2025

Hey @22Goose you must provide format json under formats as well. Let me know if that works.

hi

i successfully test on json format with the basic python request and cURL request! thx for ur help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants