serper

package
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WebSearch

func WebSearch(query string) (string, error)

WebSearch は Serper API を使って Web 検索を実行し、上位5件の結果を返す

Types

type Response

type Response struct {
	Organic []SearchResult `json:"organic"`
}

Response は Serper API のレスポンス構造

type SearchRequest

type SearchRequest struct {
	Q  string `json:"q"`
	Gl string `json:"gl,omitempty"` // 地域コード (optional)
	Hl string `json:"hl,omitempty"` // 言語コード (optional)
}

SearchRequest は Serper API へのリクエスト構造

type SearchResult

type SearchResult struct {
	Title   string `json:"title"`
	Link    string `json:"link"`
	Snippet string `json:"snippet"`
}

SearchResult は検索結果の1件

Jump to

Keyboard shortcuts

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