Download the PHP package serpwow/google-search-results without Composer
On this page you can find all versions of the php package serpwow/google-search-results. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download serpwow/google-search-results
More information about serpwow/google-search-results
Files in serpwow/google-search-results
Package google-search-results
Short Description Google Search Results PHP package via SerpWow.com
License MIT
Homepage http://github.com/serpwow/google-search-results-php
Rated 1.00 based on 1 reviews
Informations about the package google-search-results
Google Search Results in PHP
This PHP package allows you to scrape and parse Google Search Results using SerpWow. In addition to Search you can also use this package to access the SerpWow Locations API, Batches API and Account API.
Installation
You can install google-search-results with Composer.
View package on Packagist.com
Documentation
We have included examples here but full SerpWow API documentation is available at the API Docs:
You can also use the API Playground to visually build Google search requests using SerpWow.
Examples
- Simple Example
- Example Response
- Getting an API Key
- Searching with a Location
- Searching Google Places, Google Videos, Google Images, Google Shopping and Google News
- Returning results as JSON, HTML and CSV
- Requesting mobile and tablet results
- Parsing Results
- Paginating results, returning up to 100 results per page
- Search example with all parameters
- Locations API Example
- Account API Example
- Batches API
Simple Example
Simplest example for a standard query "pizza", returning the Google SERP (Search Engine Results Page) data as JSON.
Getting an API Key
To get a free API Key head over to app.serpwow.com/signup.
Example Response
A snapshot (shortened for brevity) of the JSON response returned is shown below. For details of all of the fields from the Google search results page that are parsed please see the docs.
Searching with a location
Example of a Google query geo-locating the query as if the user were located in New York.
Searching Google Places, Google Videos, Google Images, Google Shopping and Google News
Use the search_type
param to search Google Places, Videos, Images and News. See the Search API Parameters Docs for full details of the additional params available for each search type.
Returning results as JSON, HTML and CSV
SerpWow can return data in JSON, HTML and CSV formats using the json
, html
and csv
methods. For CSV results use the csv_fields
param (docs) to request specific result fields.
Requesting mobile and tablet results
To request that SerpWow renders the Google search results via a mobile or tablet browser use the device
param:
Parsing results
When making a request via the json
method an object is returned. You can inspect this dict to iterate, parse and store the results in your app.
Paginating results, returning up to 100 results per page
Use the page
and num
parameters to paginate through Google search results. The maximum number of results returned per page (controlled by the num
param) is 100 (a Google-imposed limitation) for all search_type
's apart from Google Places, where the maximum is 20. Here's an example.
Search example with all parameters
Locations API Example
The Locations API allows you to search for SerpWow supported Google search locations. You can supply the full_name
returned by the Locations API as the location
parameter in a Search API query (see Searching with a location example above) to retrieve search results geo-located to that location.
Account API Example
The Account API allows you to check your current SerpWow usage and billing information.
Batches API
The Batches API allows you to create, update and delete Batches on your SerpWow account (Batches allow you to save up to 15,000 Searches and have SerpWow run them on a schedule).
For more information and extensive code samples please see the Batches API Docs.
All versions of google-search-results with dependencies
ext-curl Version *
ext-json Version *
tcdent/php-restclient Version ^0.1.7
serpwow/google-search-results Version ^0.2.4