Skip to content

The library provides convenient access to the Outscraper API from applications written in Go. Allows using Outscraper's services from your code.

License

Notifications You must be signed in to change notification settings

outscraper/outscraper-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Outscraper Go Library

The library provides convenient access to the Outscraper API from applications written in the Go language. Allows using Outscraper's 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):

go mod init
go get -u github.com/outscraper/outscraper-go

Link to the Go module page

Initialization

package main

import (
	"fmt"
	"github.com/outscraper/outscraper-go"
)

client := outscraper.Client{ApiKey: "SECRET_API_KEY"}

Link to the profile page to create the API key

Usage

// 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

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/outscraper/outscraper-go.

About

The library provides convenient access to the Outscraper API from applications written in Go. Allows using Outscraper's services from your code.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages