Versions in this module Expand all Collapse all v0 v0.1.1 Aug 5, 2026 Changes in this version type Video + Duration time.Duration v0.1.0 Jul 31, 2026 Changes in this version + var ErrNoResults = errors.New("ytsr: no results found") + var ErrParse = errors.New("ytsr: failed to parse search page") + func ExtractVideoID(u string) (string, error) + type Client struct + func New(opts ...Option) *Client + func (c *Client) First(ctx context.Context, query string) (Video, error) + func (c *Client) Search(ctx context.Context, query string, limit int) ([]Video, error) + type Option func(*Client) + func WithHTTPClient(client *http.Client) Option + func WithLanguage(hl string) Option + func WithRegion(gl string) Option + func WithUserAgent(ua string) Option + type Video struct + ID string + Thumbnail string + Title string + URL string + func GetByID(videoID string) (Video, error)