Skip to main content
Use Firecrawl with the OpenAI SDK to give your AI applications clean context from the web: pass Search and Scrape results to Responses and Chat Completions calls, or connect Firecrawl as an MCP server.

Setup

Create .env file:
Note: If using Node < 20, install dotenv and add import 'dotenv/config' to your code.

Scrape + Summarize

This example demonstrates a simple workflow: scrape a website and summarize the content using an OpenAI model.

Function Calling

This example shows how to use OpenAI’s function calling feature to let the model decide when to scrape websites based on user requests.

Structured Data Extraction

This example demonstrates how to use OpenAI models with structured outputs to extract specific data from scraped content.

Search + Analyze

This example combines Firecrawl’s search capabilities with OpenAI model analysis to find and summarize information from multiple sources.

Responses API with MCP

This example shows how to use OpenAI’s Responses API with Firecrawl configured as an MCP (Model Context Protocol) server.
For more examples, check the OpenAI documentation.