Versions in this module Expand all Collapse all v0 v0.1.1 Aug 4, 2026 Changes in this version + const AccountPath + const DefaultBaseURL + const DefaultTimeout + const PollAttempts + const RateLimitAttempts + const ScrapePath + var ErrBadRequest = errors.New("gobadger: request rejected") + var ErrBlocked = errors.New("gobadger: target blocked the scrape") + var ErrInsufficientCredits = errors.New("gobadger: insufficient credits") + var ErrNoAPIKey = errors.New("gobadger: no api key") + var ErrNotConfigured = errors.New("gobadger: client not configured") + var ErrRateLimited = errors.New("gobadger: rate limited") + var ErrUnauthorized = errors.New("gobadger: unauthorized") + var ErrUnblockPending = errors.New("gobadger: unblock still pending") + type Account struct + CreditsBalance int + RateLimitPerMinute int + Subscription *Subscription + SubscriptionCreditsBalance int + Tier string + TotalCreditsBalance int + type Action string + const ActionClick + const ActionFill + const ActionScroll + const ActionWait + type BlockingDetails struct + BlockType string + Confidence float64 + Details string + IsBlocked bool + type Client struct + func New(apiKey string, opts ...Option) (*Client, error) + func (c *Client) Account(ctx context.Context) (*Account, error) + func (c *Client) Scrape(ctx context.Context, url string, req Request) (Response, error) + type DetectedSystem struct + Confidence float64 + Details string + System string + type Engine string + const EngineAuto + const EngineBrowser + type Format string + const FormatHTML + const FormatMarkdown + const FormatText + type JSAction struct + Amount int + Direction ScrollDirection + Milliseconds int + Selector string + Type Action + Value string + type Option func(*Client) + func WithBaseURL(u string) Option + func WithHTTPClient(h *http.Client) Option + type Request struct + AIExtract bool + AIPrompt string + AntiBot bool + Country string + CustomHeaders map[string]string + Engine Engine + Escalate bool + Format Format + JSScenario []JSAction + MaxCost int + RenderJS bool + RetryCount *int + RetryOnBlock *bool + Screenshot bool + SessionID string + URL string + Video bool + WaitAfterLoad int + WaitFor string + WaitTimeout int + type Response struct + AIError string + AIExtraction json.RawMessage + AIModel string + AntiBotSolved bool + AntiBotSystems []DetectedSystem + BlockingDetails BlockingDetails + BlockingDetected bool + CaptchaSystems []DetectedSystem + Content string + ContentLength int64 + CreditsUsed int + DurationMS int + EngineUsed string + Error string + Format Format + Headers map[string]any + JobID string + Message string + PollURL string + RetriesUsed int + ScreenshotURL string + SolverUsed string + Status string + StatusCode int + Success bool + URL string + VideoURL string + func (r Response) FailureReason() string + func (r Response) IsUnblockPending() bool + type ScrollDirection string + const ScrollDown + const ScrollUp + type Subscription struct + BillingCadence string + CurrentPeriodEnd string + MonthlyCredits int + PlanCode string + PlanTitle string + Status string v0.1.0 Jul 29, 2026