Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/outscraper/outscraper-go
The library provides convenient access to the Outscraper API from applications written in Go. Allows using Outscraper's services from your code.
https://github.com/outscraper/outscraper-go
google-maps-api google-rating-api google-reviews-api google-scraping google-serp-api scraping scraping-websites serp-api
Last synced: 1 day ago
JSON representation
The library provides convenient access to the Outscraper API from applications written in Go. Allows using Outscraper's services from your code.
- Host: GitHub
- URL: https://github.com/outscraper/outscraper-go
- Owner: outscraper
- License: mit
- Created: 2022-07-19T10:25:44.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-03-14T17:56:37.000Z (almost 2 years ago)
- Last Synced: 2024-06-20T00:33:12.941Z (6 months ago)
- Topics: google-maps-api, google-rating-api, google-reviews-api, google-scraping, google-serp-api, scraping, scraping-websites, serp-api
- Language: Go
- Homepage:
- Size: 15.6 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Outscraper Go Library
The library provides convenient access to the [Outscraper API](https://app.outscraper.com/api-docs) from applications written in the Go language. Allows using [Outscraper's services](https://outscraper.com/services/) from your code.
## Installation
Go 1.10+ must be already installed.
Make sure your project is using Go Modules (it will have a go.mod file in its root if it already is):
``` sh
go mod init
`````` go
go get -u github.com/outscraper/outscraper-go
```[Link to the Go module page](https://pkg.go.dev/github.com/outscraper/outscraper-go)
## Initialization
```go
package mainimport (
"fmt"
"github.com/outscraper/outscraper-go"
)client := outscraper.Client{ApiKey: "SECRET_API_KEY"}
```
[Link to the profile page to create the API key](https://app.outscraper.com/profile)## Usage
```go
// Search for businesses in specific locations:
results, _ := client.GoogleMapsSearch(map[string]string {
"query": "bars ny usa",
"limit": "10",
})
fmt.Println(results)// Get data of the specific place by id
results, _ := client.GoogleMapsSearch(map[string]string {
"query": "rChIJrc9T9fpYwokRdvjYRHT8nI4",
"language": "en",
})
fmt.Println(results)// Get reviews of the specific place by id
results, _ := client.GoogleMapsReviews(map[string]string {
"query": "rChIJrc9T9fpYwokRdvjYRHT8nI4",
"reviewsLimit": "20",
"language": "en",
})
fmt.Println(results)// Search contacts from website
results, _ := client.EmailsAndContacts(map[string]string {
"query": "outscraper.com",
})
fmt.Println(results)
```[More examples](https://github.com/outscraper/outscraper-go/tree/master/examples)
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/outscraper/outscraper-go.