Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/firecrawl/firecrawl/llms.txt

Use this file to discover all available pages before exploring further.

POST /v1/search

Search the web using Firecrawl’s search engine and optionally scrape the content from the search results.

Authentication

Requires Bearer token authentication. Include your API key in the Authorization header:
Authorization: Bearer fc-YOUR_API_KEY

Request Body

query
string
required
The search query
limit
integer
default:"5"
Maximum number of results to return. Minimum: 1, Maximum: 100
tbs
string
Time-based search parameter for filtering results by time period
location
string
Location parameter for search results
timeout
integer
default:"60000"
Timeout in milliseconds
ignoreInvalidURLs
boolean
default:"false"
Excludes URLs from the search results that are invalid for other Firecrawl endpoints. This helps reduce errors if you are piping data from search into other Firecrawl API endpoints.
scrapeOptions
object
Options for scraping search results
scrapeOptions.formats
array
Formats to include in the scraped output. Options: markdown, html, rawHtml, links, screenshot, screenshot@fullPage, json, branding

Response

success
boolean
Indicates whether the request was successful
data
array
Array of search results
data[].title
string
Title from search result
data[].description
string
Description from search result
data[].url
string
URL of the search result
data[].markdown
string
Markdown content if scraping was requested
data[].html
string
HTML content if requested in formats
data[].rawHtml
string
Raw HTML content if requested in formats
Links found if requested in formats
data[].screenshot
string
Screenshot URL if requested in formats
data[].metadata
object
Metadata about the scraped page
data[].metadata.title
string
Page title
data[].metadata.description
string
Page description
data[].metadata.sourceURL
string
Source URL
data[].metadata.statusCode
integer
HTTP status code
data[].metadata.error
string
Error message if scraping failed
warning
string
Warning message if any issues occurred

Examples

curl -X POST 'https://api.firecrawl.dev/v1/search' \
  -H 'Authorization: Bearer fc-YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": "firecrawl web scraping",
    "limit": 5
  }'

Response

{
  "success": true,
  "data": [
    {
      "title": "Firecrawl - The Web Data API for AI",
      "description": "The web crawling, scraping, and search API for AI.",
      "url": "https://www.firecrawl.dev/"
    },
    {
      "title": "Firecrawl Documentation",
      "description": "Learn how to use Firecrawl to scrape and crawl websites.",
      "url": "https://docs.firecrawl.dev/"
    }
  ]
}

Search with Content Scraping

Get the full content of search results:
curl -X POST 'https://api.firecrawl.dev/v1/search' \
  -H 'Authorization: Bearer fc-YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": "firecrawl pricing",
    "limit": 3,
    "scrapeOptions": {
      "formats": ["markdown", "links"]
    }
  }'

Error Responses

408
object
Request Timeout - Request timed out
{
  "success": false,
  "error": "Request timed out"
}
500
object
Server Error - An unexpected error occurred on the server
{
  "success": false,
  "error": "An unexpected error occurred on the server."
}