firecrawl icon indicating copy to clipboard operation
firecrawl copied to clipboard

[Bug] Python SDK extract method API parameters not correctly parsed to request body

Open JamesLloydPartingtonSerendipityai opened this issue 5 days ago • 1 comments

Describe the Bug

Extract method fails when parsing arguments with snake case

jsonData = {'urls': urls, **params}
        request_data = {
            **jsonData,
            'allowExternalLinks': params.get('allow_external_links', params.get('allowExternalLinks', False)),
            'enableWebSearch': params.get('enable_web_search', params.get('enableWebSearch', False)),
            'showSources': params.get('show_sources', params.get('showSources', False)),
            'schema': schema,
            'origin': 'api-sdk'
        }

Response:

Status code 400. Bad Request - [{'code': 'unrecognized_keys', 'keys': [ 'allow_external_links', 'enable_web_search', 'show_sources'], 'path': [], 'message': 'Unrecognized key in body -- please review the v1 API documentation for request body changes'}]