Skip to content

Commit

Permalink
add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad-stack committed Jul 19, 2022
1 parent a045760 commit 5c2daf3
Show file tree
Hide file tree
Showing 4 changed files with 166 additions and 0 deletions.
50 changes: 50 additions & 0 deletions examples/Google Maps Reviews.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Google Maps Reviews Scraper With PHP

The library provides real-time access to the reviews from Google Maps via [Outscraper API](https://app.outscraper.com/api-docs#tag/Google-Reviews).

## Installation

### Composer

You can install the bindings via [Composer](http://getcomposer.org/). Run the following command:

```bash
composer require outscraper/outscraper
```

To use the bindings, use Composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading):

```php
require_once('vendor/autoload.php');
```

### Manual Installation

If you do not wish to use Composer, you can download the [latest release](https://github.com/outscraper/outscraper-php/releases). Then, to use the bindings, include the `init.php` file.

```php
require_once('/path/to/outscraper-php/init.php');
```
[Link to the PHP package page](https://packagist.org/packages/outscraper/outscraper)

## Usage

```php
# Get reviews of the specific place by id
result = client.google_maps_reviews_v3(['ChIJrc9T9fpYwokRdvjYRHT8nI4'], reviews_limit=20, language='en')

# Get reviews for places found by search query
result = client.google_maps_reviews_v3(['Memphis Seoul brooklyn usa'], reviews_limit=20, limit=500, language='en')

# Get only new reviews during last 24 hours
yesterday_timestamp = 1657980986
result = client.google_maps_reviews_v3(
['ChIJrc9T9fpYwokRdvjYRHT8nI4'], sort='newest', cutoff=yesterday_timestamp, reviews_limit=100, language='en')

# Scrap Places Reviews by Place Ids
results = client.google_maps_reviews_v3(
["ChIJN5X_gWdZwokRck9rk2guJ1M", "ChIJxWLy8DlawokR1jvfXUPSTUE"],
reviews_limit=20, # limit of reviews per each place
limit=1, # limit of palces per each query
)
```
46 changes: 46 additions & 0 deletions examples/Google Maps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Google Maps Scraper With PHP

The library provides real-time access to the places from Google Maps via [Outscraper API](https://app.outscraper.com/api-docs#tag/Google-Maps).

## Installation

### Composer

You can install the bindings via [Composer](http://getcomposer.org/). Run the following command:

```bash
composer require outscraper/outscraper
```

To use the bindings, use Composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading):

```php
require_once('vendor/autoload.php');
```

### Manual Installation

If you do not wish to use Composer, you can download the [latest release](https://github.com/outscraper/outscraper-php/releases). Then, to use the bindings, include the `init.php` file.

```php
require_once('/path/to/outscraper-php/init.php');
```
[Link to the PHP package page](https://packagist.org/packages/outscraper/outscraper)

## Usage

```php
# Search for businesses in specific locations:
result = client.google_maps_search_v2(['restaurants brooklyn usa'], limit=20, language='en', region='us')

# Get data of the specific place by id
result = client.google_maps_search_v2(['ChIJrc9T9fpYwokRdvjYRHT8nI4'], language='en')

# Scrap Places by Two Queries
results = client.google_maps_search_v2(
['restaurants brooklyn usa', 'bars brooklyn usa'],
limit=50, # limit of palces per each query
language='en',
region='US',
)
```
35 changes: 35 additions & 0 deletions examples/Google SERP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Google Search Results Scraper With PHP

The library returns search results from Google based on a given search query via [Outscraper API](https://app.outscraper.com/api-docs#tag/Google-Search).

## Installation

### Composer

You can install the bindings via [Composer](http://getcomposer.org/). Run the following command:

```bash
composer require outscraper/outscraper
```

To use the bindings, use Composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading):

```php
require_once('vendor/autoload.php');
```

### Manual Installation

If you do not wish to use Composer, you can download the [latest release](https://github.com/outscraper/outscraper-php/releases). Then, to use the bindings, include the `init.php` file.

```php
require_once('/path/to/outscraper-php/init.php');
```
[Link to the PHP package page](https://packagist.org/packages/outscraper/outscraper)

## Usage

```php
# Search for SERP results:
result = client.google_search(['buy iphone 13 TX'], language='en', region='us')
```
35 changes: 35 additions & 0 deletions examples/Phones Validator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Phone Numbers Enricher/Validator With PHP

Returns phones carrier data (name/type), validates phones, ensures messages deliverability via [Outscraper API](https://app.outscraper.com/api-docs#tag/Phones/paths/~1phones-enricher/get).

## Installation

### Composer

You can install the bindings via [Composer](http://getcomposer.org/). Run the following command:

```bash
composer require outscraper/outscraper
```

To use the bindings, use Composer's [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading):

```php
require_once('vendor/autoload.php');
```

### Manual Installation

If you do not wish to use Composer, you can download the [latest release](https://github.com/outscraper/outscraper-php/releases). Then, to use the bindings, include the `init.php` file.

```php
require_once('/path/to/outscraper-php/init.php');
```
[Link to the PHP package page](https://packagist.org/packages/outscraper/outscraper)

## Usage

```php
# Search contacts from website:
result = client.phones_enricher(['12812368208'])
```

0 comments on commit 5c2daf3

Please sign in to comment.