Code librariesReviewed · Firecrawl

Firecrawl PHP SDK

Firecrawl PHP SDK is a library for PHP and Laravel developers collecting web content for applications and AI agents, but it requires a Firecrawl API key and this page gives no service prices. It wraps the v2 API for scraping, crawling, searching, structured extraction, Agent jobs and browser sessions.

Researched 14 Nov 2026

In short.

Firecrawl PHP SDK is a library for PHP and Laravel developers building web collection and AI agent features, but it requires API access and its service costs are unknown from this documentation. The page documents typed request options, background jobs, Laravel integration and native Laravel AI tools. Those tools impose content limits and can return incomplete crawl results. Nothing was executed, so extraction accuracy, reliability and performance were not assessed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage includes the complete captured page at [https://docs.firecrawl.dev/sdks/php.md]: installation, Laravel integration, client operations, Laravel AI tools, browser helpers, configuration, errors and related notices. Linked repository files, the documentation index, Laravel AI documentation, API-key onboarding instructions and Mintlify pages are excluded. Their contents were not inspected. No package installation, code execution, API call, browser session or performance assessment was performed.

The overview

Identity

The page identifies the package as the official Firecrawl PHP SDK, installed through Composer as firecrawl/firecrawl-sdk. It wraps the Firecrawl v2 API and is maintained in the Firecrawl monorepo directory linked at [https://github.com/firecrawl/firecrawl/tree/main/apps/php-sdk]. That repository's contents are outside the available evidence.

The SDK provides a PHP client, Laravel integration and optional Laravel AI tool classes. It depends on a web API rather than providing a documented local scraping engine.

Assessment

The documented interface is a plausible fit for PHP applications that need readable website text, discovered URLs or structured records. It includes operational controls such as job status, cancellation, crawl errors, credit usage and configurable retries.

Its usefulness for a particular website remains unassessed. The examples establish available calls and options, but provide no measured extraction accuracy, completion rates, throughput or production reliability.

Users

The primary audience is PHP developers adding web collection to applications. Laravel developers can reuse application configuration, resolve the client through dependency injection or call a facade.

Developers building Laravel AI agents can register native scraping, searching, mapping and crawling tools. Beginners receive installation and method examples, but still need familiarity with PHP dependencies, environment variables and API credentials.

Capabilities

The client documents single-page scraping to Markdown or HTML, JSON extraction using a prompt and schema, website crawling, URL discovery through map, web search and parallel batch scraping. Crawl options include page limits, discovery depth and nested scraping options.

Crawl, batch and Agent jobs have methods for starting work, retrieving status and cancelling. The separate AI-powered Agent accepts a prompt, optional URLs and an optional output schema.

Browser helpers create, list and close sessions, expose browser connection and live-view URLs, and execute code remotely. A scrape identifier can also open a related interactive browser session, which has an explicit stop method.

Using it

Requirements

The base SDK requires PHP 8.1 or later. The documented installation uses Composer, and API calls require a Firecrawl API key supplied through FIRECRAWL_API_KEY or FirecrawlClient::create(apiKey: ...). The default API address is [https://api.firecrawl.dev].

The optional Laravel AI tools have higher requirements: firecrawl/firecrawl-sdk 1.9.0 or later, laravel/ai 0.9 or later, PHP 8.3 or later and Laravel 12 or later. Those tool classes load only when laravel/ai is installed.

Mechanism

FirecrawlClient sends requests to the configured API. Typed option objects describe the requested operation, and response objects expose content, metadata and job progress. Methods such as crawl wait for completion; startCrawl returns a job identifier for subsequent status checks.

The documented defaults are a 300-second HTTP timeout, three retries for transient failures and a 0.5-second exponential backoff factor. A custom Guzzle-compatible HTTP client can control transport settings; when supplied, its timeout configuration replaces timeoutSeconds.

Direct SDK calls throw exceptions for conditions including authentication failure, rate limits and job timeouts. Laravel AI tools instead return readable failure strings to the model. The tools resolve the configured client from Laravel's container or accept an explicit client.

Setup

The documented installation command is composer require firecrawl/firecrawl-sdk. Obtain an API key through [https://firecrawl.dev], set FIRECRAWL_API_KEY and initialise FirecrawlClient::fromEnv(), or supply the key when creating the client.

For Laravel, publish the configuration using php artisan vendor:publish --provider="Firecrawl\Laravel\FirecrawlServiceProvider". The package supports auto-discovery, a Firecrawl facade and dependency injection.

For Laravel AI agents, install laravel/ai and register individual Firecrawl tool classes or the collection returned by FirecrawlTools::all(). These steps are documented instructions; installation and configuration were not performed.

Example

The introductory example creates FirecrawlClient::fromEnv(), scrapes [https://firecrawl.dev] with ScrapeOptions::with(formats: ['markdown']) and reads the result through getMarkdown(). It also crawls that site with CrawlOptions::with(limit: 5) and counts the returned documents.

For structured extraction, the page supplies a JsonFormat prompt asking for a product name and price, together with an object schema containing a string name and numeric price. The result is read through getJson(). No example was executed, and the source does not establish whether extracted values are correct.

Assessment & evidence

Limitations

The Laravel AI tools expose bounded inputs: search accepts 1–20 results with a default of 5, map accepts 1–500 URLs with a default of 100, and crawl accepts 1–25 pages with a default of 5. Out-of-range limits are clamped to the nearest bound.

Tool output is also bounded. Scrape text truncates at 80,000 characters. Crawl text is capped at 15,000 characters per page within a 100,000-character total budget. Search and map omit trailing items when necessary. These restrictions apply to the documented Laravel AI tools.

The crawl tool waits up to 55 seconds and can return while the server job continues. Its status, omittedPages and note fields expose incomplete results, and it reports pagination without following it. The page directs developers needing every page of a large crawl to FirecrawlClient.

Website compatibility, schema adherence, factual accuracy and recovery from real service failures were not assessed. Account-specific rate limits and concurrency allowances are unspecified.

Fit and tradeoffs

The practical appeal is a common PHP interface for several web collection operations, with Laravel configuration reused by agent tools. This could reduce integration work for applications already using PHP and Laravel.

The main tradeoffs are service dependence, unknown operating costs and bounded content delivery through the AI tools. Applications requiring complete documents or exhaustive crawls would need to account for truncation, pagination and unfinished jobs. A requested JSON schema alone provides no evidence of correct extraction.

Alternatives

The page documents several integration choices within Firecrawl: direct FirecrawlClient calls, the Laravel facade, dependency injection and native Laravel AI tools. Direct client use exposes more options than the small model-facing tool schemas.

It mentions a Firecrawl MCP server and matching tool names, but supplies no comparative evaluation. Competing scraping services, other PHP libraries and self-hosting options are not assessed by this source.

Evidence

The source is the complete PHP SDK documentation page at [https://docs.firecrawl.dev/sdks/php.md], captured on 2026-11-14 at 21:16:37.926 UTC. Its retained source revision is sha256:5ba76df066acf271d58fd6ffcf357971148e52336b67a1231b676f8abae9d777.

The documentation supports statements about advertised interfaces, configuration and limits. Package source, dependency manifests, service responses and independent measurements are absent. No code or API requests were executed.

Access & freshness

Costs

Prices, included credits, free allowances and per-operation charges are unknown from this page. It does not establish whether scraping, Agent jobs and browser sessions have different billing rules.

The client exposes getCreditUsage() for remaining credits and getConcurrency() for current and maximum concurrency. These methods provide usage information, but the page supplies no figures from which to calculate an operating budget.

Rights

The page links the SDK repository but includes no package licence text or explicit documentation redistribution grant. Commercial-use and redistribution permissions cannot be established from this source.

The page also does not establish rights to republish content collected from other websites, service data-retention terms or model-training terms. Applicable package, service and website permissions would need separate confirmation.

Freshness

The capture date establishes when this documentation snapshot was acquired. The page provides no publication date, last-update timestamp or latest package release number.

It identifies the v2 API and minimum versions for Laravel AI integration. Availability and compatibility after the capture date are unknown.

Practical next steps

Before adoption, confirm the required PHP and Laravel versions, applicable licence and actual API charges. Choose direct client calls or Laravel AI tools according to the options and completeness your application needs.

Evaluate a small set of representative pages for extraction accuracy, missing content, structured-field correctness, job completion and credit consumption. For agent crawls, inspect status and omission fields, and allow sufficient queue-worker time for the documented wait. These checks remain unperformed.

Evidence for this report

selected-page.txtselected · checked 2026-11-14