https://github.com/raspi/googlecustomsearchapi
Google's custom search REST API client for Go
https://github.com/raspi/googlecustomsearchapi
go golang golang-library google google-search-api rest-api
Last synced: 8 months ago
JSON representation
Google's custom search REST API client for Go
- Host: GitHub
- URL: https://github.com/raspi/googlecustomsearchapi
- Owner: raspi
- License: apache-2.0
- Created: 2023-06-30T18:53:43.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-12T16:03:20.000Z (almost 3 years ago)
- Last Synced: 2025-02-25T22:46:31.248Z (over 1 year ago)
- Topics: go, golang, golang-library, google, google-search-api, rest-api
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# googlecustomsearchapi


[](https://goreportcard.com/report/github.com/raspi/googlecustomsearchapi)
Google's custom search REST API v1 client for Go
## Example
```go
func main() {
httpc := http.DefaultClient
gs := googlecustomsearchapi.New(httpc, "api-key-here", "engine-id-here")
custom := map[string]string{
`siteSearchFilter`: `i`,
`siteSearch`: `www.imdb.com`,
}
res, err := gs.Search(`the room`, 0, custom)
if err != nil {
panic(err)
}
for _, r := range res.Items {
fmt.Printf(`%v %v`+"\n", r.Link, r.Title)
}
}
```
## References
* https://developers.google.com/custom-search/v1/using_rest
* https://developers.google.com/custom-search/v1/overview
* https://console.cloud.google.com/apis/api/customsearch.googleapis.com/metrics
* https://programmablesearchengine.google.com/controlpanel/all