Versions in this module Expand all Collapse all v1 v1.0.2 Sep 23, 2026 Changes in this version type WordstatFrequencyResponse + Error string type WordstatGraphResponse + Error string type WordstatMapResponse + Error string type WordstatResponse + Error string v1.0.1 Sep 22, 2026 v1.0.0 Sep 22, 2026 Changes in this version + const DefaultBaseURL + const Version + var ErrIncompleteResponse = errors.New("jsonseo: ответ пришёл не целиком") + var ErrInvalidArgument = errors.New("jsonseo: неверный аргумент") + var ErrNetwork = errors.New("jsonseo: запрос не удался") + var ErrParse = errors.New("jsonseo: ответ не разобрался как JSON") + var ErrPaymentRequired = errors.New("jsonseo: на счёте не хватает средств") + var ErrRateLimited = errors.New("jsonseo: превышен лимит частоты") + var ErrServiceUnavailable = errors.New("jsonseo: выдачу получить не вышло") + var ErrTimeout = errors.New("jsonseo: ответа не дождались") + var ErrUnauthorized = errors.New("jsonseo: ключ не передан или недействителен") + var ErrValidation = errors.New("jsonseo: параметры запроса не приняты") + type APIError struct + Body string + Errors map[string][]string + Message string + Payload map[string]any + RetryAfter int + Status int + func (e *APIError) Error() string + func (e *APIError) Fields() []string + func (e *APIError) Is(target error) bool + type Ad struct + Block string + Description string + DisplayURL string + Domain string + Format string + Group int + Label string + Page int + Position int + Sitelinks []AdSitelink + Title string + URL string + type AdSitelink struct + Description string + Title string + URL string + type AiAnswer struct + FollowUps []string + Markdown string + Sources []AiAnswerSource + type AiAnswerSource struct + Citations int + Description string + Domain string + ID int + Title string + URL string + type BalanceResponse struct + Balance float64 + Currency string + type Client struct + func New(apiKey string, opts ...Option) (*Client, error) + func (c *Client) Balance(ctx context.Context) (*BalanceResponse, error) + func (c *Client) Bing(ctx context.Context, query string, params ...Params) (*SearchResponse, error) + func (c *Client) BingImages(ctx context.Context, query string, params ...Params) (*ImagesResponse, error) + func (c *Client) BingSuggest(ctx context.Context, query string, params ...Params) (*SuggestResponse, error) + func (c *Client) BingVideo(ctx context.Context, query string, params ...Params) (*VideoResponse, error) + func (c *Client) Call(ctx context.Context, path string, params Params, out any) error + func (c *Client) CallRaw(ctx context.Context, path string, params Params) (string, error) + func (c *Client) Direct(ctx context.Context, phrases []string, params ...Params) (*DirectResponse, error) + func (c *Client) Geoip(ctx context.Context, ip string, params ...Params) (*GeoipResponse, error) + func (c *Client) Google(ctx context.Context, query string, params ...Params) (*SearchResponse, error) + func (c *Client) GoogleImages(ctx context.Context, query string, params ...Params) (*ImagesResponse, error) + func (c *Client) GoogleRegions(ctx context.Context, name string, params ...Params) (*GoogleRegionsResponse, error) + func (c *Client) GoogleSuggest(ctx context.Context, query string, params ...Params) (*SuggestResponse, error) + func (c *Client) GoogleVideo(ctx context.Context, query string, params ...Params) (*VideoResponse, error) + func (c *Client) Wordstat(ctx context.Context, text string, params ...Params) (*WordstatResponse, error) + func (c *Client) WordstatFrequency(ctx context.Context, text string, params ...Params) (*WordstatFrequencyResponse, error) + func (c *Client) WordstatGraph(ctx context.Context, text string, params ...Params) (*WordstatGraphResponse, error) + func (c *Client) WordstatMap(ctx context.Context, text string, params ...Params) (*WordstatMapResponse, error) + func (c *Client) Yandex(ctx context.Context, text string, params ...Params) (*SearchResponse, error) + func (c *Client) YandexImages(ctx context.Context, query string, params ...Params) (*ImagesResponse, error) + func (c *Client) YandexRegions(ctx context.Context, name string, params ...Params) (*YandexRegionsResponse, error) + func (c *Client) YandexSuggest(ctx context.Context, text string, params ...Params) (*SuggestResponse, error) + func (c *Client) YandexVideo(ctx context.Context, query string, params ...Params) (*VideoResponse, error) + type DirectForecast struct + Phrase string + Positions map[string]DirectPosition + Shows int + type DirectPosition struct + Bid float64 + Budget float64 + CTR float64 + Clicks int + Shows int + type DirectResponse struct + Batches int + Errors []string + Geo int + Period string + Processed int + Results []DirectForecast + type GeoipResponse struct + Country struct{ ... } + IP string + Latitude float64 + Longitude float64 + Region struct{ ... } + type GoogleRegion struct + CanonicalName string + ID int + Lat float64 + Lon float64 + Name string + Subname string + Type string + TypeName string + UULE string + type GoogleRegionsResponse struct + Lang string + Name string + Regions []GoogleRegion + type ImageResult struct + Bytes int + Domain string + Height int + SourceURL string + Thumbnail string + ThumbnailHeight int + ThumbnailWidth int + Title string + URL string + Width int + type ImagesResponse struct + Ads []Ad + Exhausted bool + Pages int + Query string + Results []ImageResult + URL string + type Option func(*Client) error + func WithAttempts(attempts int) Option + func WithAuthInQuery() Option + func WithBaseURL(url string) Option + func WithHTTPClient(client *http.Client) Option + func WithMaxRetryDelay(delay time.Duration) Option + func WithRetryDelay(delay time.Duration) Option + func WithTimeout(timeout time.Duration) Option + func WithUserAgent(agent string) Option + type Params map[string]any + type ParseError struct + Body string + Err error + func (e *ParseError) Error() string + func (e *ParseError) Is(target error) bool + func (e *ParseError) Unwrap() error + type SearchResponse struct + Ads []Ad + AiAnswer *AiAnswer + BreakDomainHit bool + Exhausted bool + FilterDescription string + Found *int64 + FoundHuman string + Lang string + Lr int + Mkt string + Pages int + Query string + RawQuery string + Region string + Results []SearchResult + URL string + type SearchResult struct + Breadcrumbs string + Domain string + Mime string + MimeType string + Passage string + Title string + URL string + type SuggestResponse struct + Lr string + Query string + Results []string + type TransportError struct + Err error + Kind error + func (e *TransportError) Error() string + func (e *TransportError) Is(target error) bool + func (e *TransportError) Unwrap() error + type VideoResponse struct + Exhausted bool + Pages int + Query string + Results []VideoResult + URL string + type VideoResult struct + Breadcrumbs string + Channel string + Description string + Domain string + Duration *int + DurationText string + Provider string + Published int64 + PublishedText string + Thumbnail string + Title string + URL string + Views string + type WordstatFrequencyResponse struct + Device string + Region string + Results struct{ ... } + Text string + type WordstatGraphPoint struct + Absolute int + Date string + Relative float64 + Text string + type WordstatGraphResponse struct + Device string + Region string + Results struct{ ... } + Text string + Type string + type WordstatMapResponse struct + Device string + Results struct{ ... } + Text string + Type string + type WordstatMapRow struct + Absolute int + Popularity float64 + RegionID *int + Relative float64 + Text string + Type string + type WordstatPhrase struct + Text string + Value int + type WordstatResponse struct + Device string + Region string + Results struct{ ... } + Text string + type YandexRegion struct + ID int + Lat float64 + Lon float64 + Name string + Subname string + type YandexRegionsResponse struct + Lang string + Name string + Regions []YandexRegion