Download the PHP package serpapi/google-search-results-php without Composer

On this page you can find all versions of the php package serpapi/google-search-results-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package google-search-results-php

Google Search Results in PHP

PHP build

This PHP API is meant to scrape and parse Google, Bing or Baidu results using SerpApi.

The full documentation is available here.

The following services are provided:

SerpApi provides a script builder to get you started quickly.

Installation

Php 7+ must be already installed and composer dependency management tool.

Package available from packagist.

Quick start

if you're using composer, you can add this package (link to packagist).

Then you need to load the dependency in your script.

if not, you must clone this repository and link the class.

Get "your secret key" from https://serpapi.com/dashboard

Then you can start coding something like:

This example runs a search about "coffee" using your secret api key.

The SerpApi service (backend)

Alternatively, you can search:

See the playground to generate your code. https://serpapi.com/playground

Example

How to set SERP API key

The SerpApi api_key can be set globally using a singleton pattern.

Or

Search API capability

Location API

it prints the first 3 location matching Austin (Texas, Texas, Rochester)

Search Archive API

Let's run a search to get a search_id.

Now let's retrieve the previous search from the archive.

it prints the search from the archive.

Account API

it prints your account information.

Search Google Images

this code prints all the images links, and download image if you un-comment the line with wget (linux/osx tool to download image).

Example by specification

The code described above is tested in the file test.php and example.php. To run the test locally.

Composer example

see: https://github.com/serpapi/google-search-results-php/example_composer/

To run the code.

Change log

SerpApi supports all the major search engines. Google has the more advance support with all the major services available: Images, News, Shopping and more.. To enable a type of search, the field tbm (to be matched) must be set to:

The full documentation is available here.

Author: Victor Benarbia [email protected] For more information: https://serpapi.com

Thanks Rest API for Php


All versions of google-search-results-php with dependencies

PHP Build Version
Package Version
Requires php Version ^5.5 || ^7.0
ext-curl Version *
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package serpapi/google-search-results-php contains the following files

Loading the files please wait ....