outscraper / outscraper-php

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

Home Page:https://outscraper.com/google-maps-api/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Outscraper PHP Library

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

API Docs

screencast

Installation

Composer

You can install the bindings via Composer. Run the following command:

composer require outscraper/outscraper

To use the bindings, use Composer's autoload:

require_once('vendor/autoload.php');

Manual Installation

If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the init.php file.

require_once('/path/to/outscraper-php/init.php');

Link to the PHP package page

Initialization

$client = new OutscraperClient("SECRET_API_KEY");

Link to the profile page to create the API key

Google Maps Scraper

Scrape Google Mpas results bu query "asian restaurants Berlin, Germany".

$results = $client->google_maps_search(['asian restaurants Berlin, Germany'], 'en', 'DE');

print_r($results);

Google Maps Reviews Scraper

Scrape Google Mpas reviews from Statue of Liberty National Monument.

$results = $client->google_maps_reviews([
    'https://www.google.com/maps/place/Statue+of+Liberty+National+Monument/@40.6892494,-74.0466891,17z/data=!3m1!4b1!4m5!3m4!1s0x89c25090129c363d:0x40c6a5770d25022b!8m2!3d40.6892494!4d-74.0445004'
], limit: 10, sort: 'newest');
// you can use direct links, IDs, or names as input for query

print_r($results);

Scrape Emails & Contacts from domains.

$results = $client->emails_and_contacts([
    'outscraper.com'
]);

print_r($results);

More examples

Contributing

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

About

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

https://outscraper.com/google-maps-api/

License:MIT License


Languages

Language:PHP 100.0%