Introducing /parse. Convert PDFs, Word docs, or spreadsheets into clean data for AI agents 5x faster. Try it now →

Can Codex CLI do web search? How to enable it?

Codex CLI includes a first-party web search tool that is on by default. This is a recent change: web search was disabled by default in earlier versions, so you may still see guides telling you to add web_search = true, which is no longer needed. The default mode is cached: results come from an OpenAI-maintained pre-indexed snapshot rather than fetching live pages. To switch to live results, set web_search = "live" in ~/.codex/config.toml, or pass --search for a single run. To turn it off entirely, set web_search = "disabled".

Even in live mode, the built-in search returns snippets only and does not support full-page scraping, multi-page crawling, or structured data extraction, which limits its usefulness for agentic search tasks that require reading page content or traversing a site.

FactorCodex built-in searchFirecrawl
Enabled by defaultYes (cached mode)No (requires MCP or CLI setup)
Live web resultsVia web_search = "live"Yes, via firecrawl_search
Full-page scrapingNoYes, via firecrawl_scrape
Multi-page crawlNoYes, via firecrawl_crawl
Structured extractionNoYes, via firecrawl_extract
SetupNone (on by default)API key

Use the built-in search for simple lookups where a snippet is enough. Switch to Firecrawl when Codex needs to read a full page, crawl a documentation site, or extract structured data from multiple URLs. The built-in option adds no external dependency; Firecrawl adds four purpose-built tools that cover the full retrieval pipeline a web search tool for AI agents typically needs.

The Firecrawl MCP for Codex CLI adds firecrawl_search, firecrawl_scrape, firecrawl_crawl, and firecrawl_extract as native tools inside Codex. Add one of these blocks to ~/.codex/config.toml (local requires Node.js 18+, remote has no local dependency):

# Local
[mcp_servers.firecrawl]
command = "npx"
args = ["-y", "firecrawl-mcp"]
 
[mcp_servers.firecrawl.env]
FIRECRAWL_API_KEY = "fc-YOUR-API-KEY"
 
# Remote
[mcp_servers.firecrawl]
url = "https://mcp.firecrawl.dev/fc-YOUR-API-KEY/v2/mcp"

The Firecrawl CLI is an even simpler option: install it and authorize once, then run searches and scrapes directly from the terminal alongside Codex.

npx -y firecrawl-cli@latest init --all --browser
Last updated: May 06, 2026
FOOTER
The easiest way to extract
data from the web
Backed by
Y Combinator
LinkedinGithubYouTube
SOC II · Type 2
AICPA
SOC 2
X (Twitter)
Discord