from firecrawl import Firecrawlfirecrawl = Firecrawl(api_key="fc-YOUR-API-KEY")results = firecrawl.search( query="Firecrawl", limit=3,)print(results)
Response
SDK は data オブジェクトを直接返します。cURL は完全なペイロードを返します。
JSON
{ "success": true, "data": { "web": [ { "url": "https://www.firecrawl.dev/", "title": "Firecrawl - AI向けWebデータAPI", "description": "AI向けのウェブクローリング、スクレイピング、検索API。大規模運用に対応。Firecrawlはインターネット全体をAIエージェントやビルダーに提供します。", "position": 1 }, { "url": "https://github.com/firecrawl/firecrawl", "title": "mendableai/firecrawl: Turn entire websites into LLM-ready ... - GitHub", "description": "Firecrawl is an API service that takes a URL, crawls it, and converts it into clean markdown or structured data.", "position": 2 }, ... ], "images": [ { "title": "Quickstart | Firecrawl", "imageUrl": "https://mintlify.s3.us-west-1.amazonaws.com/firecrawl/logo/logo.png", "imageWidth": 5814, "imageHeight": 1200, "url": "https://docs.firecrawl.dev/", "position": 1 }, ... ], "news": [ { "title": "Y Combinator startup Firecrawl is ready to pay $1M to hire three AI agents as employees", "url": "https://techcrunch.com/2025/05/17/y-combinator-startup-firecrawl-is-ready-to-pay-1m-to-hire-three-ai-agents-as-employees/", "snippet": "It's now placed three new ads on YC's job board for “AI agents only” and has set aside a $1 million budget total to make it happen.", "date": "3 months ago", "position": 1 }, ... ] }}
from firecrawl import Firecrawlapp = Firecrawl(api_key="fc-YOUR-API-KEY")# 1. Amazonのホームページをスクレイピングresult = app.scrape("https://www.amazon.com", formats=["markdown"])scrape_id = result.metadata.scrape_id# 2. インタラクト — 商品を検索して価格を取得app.interact(scrape_id, prompt="Search for iPhone 16 Pro Max")response = app.interact(scrape_id, prompt="Click on the first result and tell me the price")print(response.output)# 3. セッションを停止app.stop_interaction(scrape_id)
レスポンス
Response
{ "success": true, "liveViewUrl": "https://liveview.firecrawl.dev/...", "interactiveLiveViewUrl": "https://liveview.firecrawl.dev/...", "output": "The iPhone 16 Pro Max (256GB) is priced at $1,199.00.", "exitCode": 0, "killed": false}