Documentation
¶
Overview ¶
Package firecrawl integrates Firecrawl's Search and Scrape APIs with the provider-neutral web contracts.
A Client implements both web.Searcher and web.Fetcher. Search requests use POST /search with native includeDomains/excludeDomains filters, preserving the query text; page fetching uses POST /scrape and supports Markdown and HTML. The wire contract follows https://docs.firecrawl.dev/api-reference/endpoint/search.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements web.Searcher and web.Fetcher against Firecrawl, whose fetch path renders a page before extracting content produced by client-side scripts.
func (*Client) Fetch ¶
func (c *Client) Fetch(ctx context.Context, request *web.FetchRequest) (*web.FetchResponse, error)
func (*Client) Search ¶
func (c *Client) Search(ctx context.Context, request *web.SearchRequest) (*web.SearchResponse, error)
type Config ¶
type Config struct {
APIKey string
BaseURL string
// HTTPClient remains host-owned. Requests and redirects are restricted to
// BaseURL's origin, including when the host redirect policy changes a request.
HTTPClient *http.Client
}
Config configures a Client. APIKey is required; an empty BaseURL selects Firecrawl's public endpoint and a nil HTTPClient selects a default client.