Firecrawl Python SDK is a wrapper around the Firecrawl API to help you easily turn websites into markdown.
FIRECRAWL_API_KEY
or pass it as a parameter to the FirecrawlApp
class.scrape_url
method. It takes the URL as a parameter and returns the scraped data as a dictionary.
crawl_url
method. It takes the starting URL and optional parameters as arguments. The params
argument allows you to specify additional options for the crawl job, such as the maximum number of pages to crawl, allowed domains, and the output format.
crawl_url_async
method. It returns the crawl ID
which you can use to check the status of the crawl job. It takes the starting URL and optional parameters as arguments. The params
argument allows you to specify additional options for the crawl job, such as the maximum number of pages to crawl, allowed domains, and the output format.
check_crawl_status
method. It takes the job ID as a parameter and returns the current status of the crawl job.
cancel_crawl
method. It takes the job ID of the asynchronous crawl as a parameter and returns the cancellation status.
map_url
to generate a list of URLs from a website. The params
argument let you customize the mapping process, including options to exclude subdomains or to utilize the sitemap.
crawl_url_and_watch
method. It takes the starting URL and optional parameters as arguments. The params
argument allows you to specify additional options for the crawl job, such as the maximum number of pages to crawl, allowed domains, and the output format.
AsyncFirecrawlApp
class. Its methods are the same as the FirecrawlApp
class, but they don’t block the main thread.