Installation
To install the Firecrawl Go SDK, you can use go get:Go
Usage
- Get an API key from firecrawl.dev
- Set the
API keyas a parameter to theFirecrawlAppstruct. - Set the
API URLand/or pass it as a parameter to theFirecrawlAppstruct. Defaults tohttps://api.firecrawl.dev. - Set the
versionand/or pass it as a parameter to theFirecrawlAppstruct. Defaults tov1.
Go
Scraping a URL
To scrape a single URL with error handling, use theScrapeURL method. It takes the URL as a parameter and returns the scraped data as a dictionary.
Go
Crawling a Website
To crawl a website, use theCrawlUrl 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.
Go
Checking Crawl Status
To check the status of a crawl job, use theCheckCrawlStatus method. It takes the job ID as a parameter and returns the current status of the crawl job.
Go
Map a Website
UseMapUrl 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.
Go

