slvler/serpapi-search-api

Scrape Google and other search engines from our fast, easy, and complete API. wrapper for Laravel

v1.1.0 2024-11-15 06:51 UTC

This package is auto-updated.

Last update: 2024-12-23 08:04:08 UTC


README

tests Latest Stable Version Latest Unstable Version License Total Downloads

Introduction

API endpoint allows you to scrape the results from Google search engine via our SerpApi service. Head to the playground for a live and interactive demo. You can query https://serpapi.com/search using a GET request.

Requirements

  • PHP 8.0+
  • Laravel 10.x

Installation

To install this package tou can use composer:

composer require slvler/serpapi-web-search

Usage

  • First, you should extract the config/serpapi.php file to the config folder.
php artisan vendor:publish --tag=serpapi
  • First of all we'll add the API key and API Url of the service we're using to our .env file of our project. If you don't have an account yet on serpapi.com, you should create one. Once you have an account you can copy your API key from the dashboard page and put it into you .env file.
SERPAPI_BASE_URL=https://serpapi.com
SERPAPI_API_VERSION=
SERPAPI_API_KEY=

Web text search

  • You can use it to search on serpapi api:
use Slvler\Serpapi\Facades\Serpapi;

Serpapi::search(['q' => "bitcoin"])->result();

Testing

composer test

Credits

License

The MIT License (MIT). Please see License File for more information.

Contributing

You're very welcome to contribute. Please see CONTRIBUTING for details.