From 50e7198385bbab5c0cef81bba6a486f67a5c9692 Mon Sep 17 00:00:00 2001 From: "firecrawl-spring[bot]" <254786068+firecrawl-spring[bot]@users.noreply.github.com> Date: Tue, 5 May 2026 15:01:33 +0000 Subject: [PATCH] docs(go): tighten quickstart example Remove the duplicate client creation in the Go SDK quickstart so the example creates one client and points readers to the Configuration section for the explicit-key alternative. Co-Authored-By: micahstairs --- sdks/go.mdx | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/sdks/go.mdx b/sdks/go.mdx index 179a49159..1185da26a 100644 --- a/sdks/go.mdx +++ b/sdks/go.mdx @@ -23,7 +23,7 @@ go get github.com/firecrawl/firecrawl/apps/go-sdk 1. Get an API key from [firecrawl.dev](https://firecrawl.dev) 2. Set the API key as an environment variable named `FIRECRAWL_API_KEY`, or pass it with `option.WithAPIKey(...)` -Here is a quick example using the current SDK API surface: +Scrape a page and start a crawl in a few lines: ```go package main @@ -34,24 +34,16 @@ import ( "log" firecrawl "github.com/firecrawl/firecrawl/apps/go-sdk" - "github.com/firecrawl/firecrawl/apps/go-sdk/option" ) func main() { - // Create a client (reads FIRECRAWL_API_KEY from environment) + // Reads FIRECRAWL_API_KEY from the environment. + // To pass the key explicitly, see the Configuration section below. client, err := firecrawl.NewClient() if err != nil { log.Fatal(err) } - // Or provide the API key directly - client, err = firecrawl.NewClient( - option.WithAPIKey("fc-your-api-key"), - ) - if err != nil { - log.Fatal(err) - } - ctx := context.Background() // Scrape a single page