serpapi

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FnPrototype

type FnPrototype = func(Input) Output

type Input

type Input struct {
	Query string `json:"query" jsonschema:"description=the query to search for"`
}

type OrganicResults

type OrganicResults struct {
	Position                int         `json:"position"`
	Title                   string      `json:"title"`
	Link                    string      `json:"link"`
	RedirectLink            string      `json:"redirect_link"`
	DisplayedLink           string      `json:"displayed_link"`
	Thumbnail               string      `json:"thumbnail,omitempty"`
	Favicon                 string      `json:"favicon"`
	Snippet                 string      `json:"snippet"`
	Source                  string      `json:"source"`
	RichSnippet             RichSnippet `json:"rich_snippet,omitempty"`
	SnippetHighlightedWords []string    `json:"snippet_highlighted_words,omitempty"`
}

type Output

type Output struct {
	Error   string   `json:"error,omitempty"`
	Results []result `json:"results,omitempty"`
}

type RichSnippet

type RichSnippet struct {
	Top Top `json:"top"`
}

type Tool

type Tool struct {
	// contains filtered or unexported fields
}

func New

func New() *Tool

func (*Tool) Description

func (t *Tool) Description() string

func (*Tool) Fn

func (t *Tool) Fn() any

func (*Tool) Name

func (t *Tool) Name() string

func (*Tool) WithAPIKey

func (t *Tool) WithAPIKey(apiKey string) *Tool

func (*Tool) WithCountryCode

func (t *Tool) WithCountryCode(countryCode string) *Tool

func (*Tool) WithGoogleDomain

func (t *Tool) WithGoogleDomain(googleDomain string) *Tool

func (*Tool) WithLanguageCode

func (t *Tool) WithLanguageCode(languageCode string) *Tool

type Top

type Top struct {
	Extensions []string `json:"extensions"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL