The library provides convenient access to the Outscraper API from applications written in the PHP language. Allows using Outscraper's services from your code.
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');
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');
$client = new OutscraperClient("SECRET_API_KEY");
Link to the profile page to create the API key
Scrape Google Mpas results bu query "asian restaurants Berlin, Germany".
$results = $client->google_maps_search(['asian restaurants Berlin, Germany'], 'en', 'DE');
print_r($results);
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);
Bug reports and pull requests are welcome on GitHub at https://github.com/outscraper/outscraper-php.