Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The Firecrawl Go SDK is a library that allows you to easily scrape and crawl web
To install the Firecrawl Go SDK, you can

```bash
go get github.com/mendableai/firecrawl-go/v2
go get github.com/mendableai/firecrawl-go
```

## Usage
Expand All @@ -19,19 +19,16 @@ go get github.com/mendableai/firecrawl-go/v2
Here's an example of how to use the SDK with error handling:

```go
package main

import (
"encoding/json"
"fmt"
"log"

"github.com/mendableai/firecrawl-go/v2"
"github.com/mendableai/firecrawl-go"
)

func main() {
// Initialize the FirecrawlApp with your API key and optional URL
app, err := firecrawl.NewFirecrawlApp("YOUR_API_KEY", "YOUR_API_URL")
// Initialize the FirecrawlApp with your API key
app, err := firecrawl.NewFirecrawlApp("YOUR_API_KEY")
if err != nil {
log.Fatalf("Failed to initialize FirecrawlApp: %v", err)
}
Expand All @@ -44,7 +41,7 @@ func main() {
fmt.Println(scrapeResult.Markdown)

// Crawl a website
idempotencyKey := "idempotency-key" // optional idempotency key
idempotencyKey := uuid.New().String() // optional idempotency key
crawlParams := &firecrawl.CrawlParams{
ExcludePaths: []string{"blog/*"},
MaxDepth: prt(2),
Expand Down
Loading