Skip to main content
No SDK is needed for Go. The standard net/http and encoding/json packages are all you need. This guide builds a reusable client struct that you can drop into any Go project.

Prerequisites

Set your API key

.env
Load it with godotenv:
Add .env to .gitignore. In production, inject the key directly as an environment variable.

Reusable client

internal/geekflare/client.go

Web Scraping

Types

internal/geekflare/scrape.go

Usage

cmd/scrape/main.go

Types

internal/geekflare/search.go

Usage

cmd/search/main.go

Screenshot

Types

internal/geekflare/screenshot.go

Usage

cmd/screenshot/main.go

Error handling

The APIError type returned by the client carries the status code and message. Use errors.As to inspect it:

Common error codes

See Rate Limit Exceeded and Credit Exhausted for strategies to handle these gracefully.

Next steps