Today we are shipping an official Go SDK for Context.dev.
If you build backend services in Go, you can now use Context.dev without hand-writing request structs, authentication headers, query serialization, and response parsing for every endpoint. Install the package, create a client, and call the same brand intelligence and web context APIs that are already available through our TypeScript, Python, and Ruby SDKs.
The package is available here: github.com/context-dot-dev/context-go-sdk/v2.
Install
go get github.com/context-dot-dev/context-go-sdk/v2@latestThen create a client with your API key:
package main
import (
"context"
"fmt"
"os"
contextdev "github.com/context-dot-dev/context-go-sdk/v2"
"github.com/context-dot-dev/context-go-sdk/v2/option"
)
func main() {
ctx := context.Background()
client := contextdev.NewClient(
option.WithAPIKey(os.Getenv("CONTEXT_DEV_API_KEY")),
)
brand, err := client.Brand.Get(ctx, contextdev.BrandGetParams{
OfByDomain: &contextdev.BrandGetParamsBodyByDomain{Domain: "stripe.com"},
})
if err != nil {
panic(err)
}
fmt.Printf("%+v\n", brand)
}What you can call from Go
The Go SDK covers the same core Context.dev surface area:
- Brand lookup by domain, email, company name, or stock ticker
- Transaction enrichment from messy bank statement descriptors
- Unified Scrape for Markdown, HTML, screenshots, images, bytes, CSS fields, highlights, JSON, and product data
- Styleguide extraction, including fonts
- Map URLs and website crawling
- Answers for research with source URLs
- Search, people enrichment, company news, document parsing, batches, and monitors
In other words, Go services can now fetch company context, brand assets, live website content, and structured AI extraction results with first-party SDK support instead of raw HTTP calls.
A few examples
Retrieve brand data:
brand, err := client.Brand.Get(ctx, contextdev.BrandGetParams{
OfByDomain: &contextdev.BrandGetParamsBodyByDomain{Domain: "stripe.com"},
})
if err != nil {
panic(err)
}
fmt.Println(brand.Brand.Title)Scrape a page into Markdown:
page, err := client.Web.Scrape(ctx, contextdev.WebScrapeParams{
URL: "https://context.dev/pricing",
Formats: contextdev.WebScrapeParamsFormats{Markdown: contextdev.Bool(true)},
})
if err != nil {
panic(err)
}
fmt.Println(page.Markdown.Data)Capture a screenshot:
page, err := client.Web.Scrape(ctx, contextdev.WebScrapeParams{
URL: "https://stripe.com",
Formats: contextdev.WebScrapeParamsFormats{Screenshot: contextdev.Bool(true)},
})
if err != nil {
panic(err)
}
fmt.Println(page.Screenshot.Data)Crawl a site:
crawl, err := client.Web.WebCrawlMd(ctx, contextdev.WebWebCrawlMdParams{
URL: "https://stripe.com",
MaxPages: contextdev.Int(25),
MaxDepth: contextdev.Int(2),
})
if err != nil {
panic(err)
}
for _, page := range crawl.Results {
fmt.Println(page.Markdown)
}Research a company across pages with Answers:
answer, err := client.Web.Answers(ctx, contextdev.WebAnswersParams{
Task: "Research Stripe's publicly listed pricing model and summarize it with sources.",
Mode: contextdev.WebAnswersParamsModeFast,
JsonFormat: map[string]any{"pricing_model": ""},
})
if err != nil {
panic(err)
}
fmt.Println(answer.JsonContent, answer.Sources)Why this matters
Go is a natural fit for the kinds of systems Context.dev often powers: enrichment pipelines, backend services, data products, fintech workflows, crawler jobs, and AI infrastructure.
Those systems usually care about predictable interfaces, explicit errors, fast startup times, and code that is easy to deploy as a small service. The Go SDK is designed for that style of work. You get typed params, typed responses, standard context.Context support, and the same API key authentication model used across the rest of Context.dev.
Works in the dashboard too
We also updated the developer dashboard so every copyable API example now includes a Go SDK option. If you are testing endpoints in the playground, you can switch the code sample dropdown to Go (SDK) and copy a working Go example for the exact request you configured.
That includes advanced options like cache age, browser wait time, crawl depth, screenshot viewport, extraction schemas, and transaction matching hints.
Tested endpoint by endpoint
We tested the generated Go samples individually against the official SDK package. Each dashboard sample is compiled in its own temporary Go package with go test ., so the examples are checked as actual Go programs rather than treated as static snippets.
The examples above compile against Go SDK v2.20.0 and cover Brand retrieval, unified Scrape for Markdown and screenshots, Crawl, and Answers. Styleguide includes fonts; Scrape includes JSON and product formats; Map URLs handles indexed URL discovery.
Get started
If you already have a Context.dev API key, install the SDK and start with a small brand lookup:
go get github.com/context-dot-dev/context-go-sdk/v2@latestIf you do not have a key yet, create one in the Context.dev dashboard, set CONTEXT_DEV_API_KEY, and run your first request.
We are going to keep expanding the SDKs around the workflows developers actually build: enrichment jobs, AI agents, personalized onboarding, research tools, transaction intelligence, and web context pipelines.
If you build something with the Go SDK, send it our way. We want the Go experience to feel as direct and reliable as the API itself.