Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Views Bootstrap 5.5.4 — Minor update available for module views_bootstrap (5.5.4). Release: Rightup theme 1.0.3 — Minor update available for theme vartheme_bs5_rightup (1.0.3). Release: CommentOn 1.0.6 — Minor update available for module commenton (1.0.6). Release: ChatGPT Ads 1.0.3 — Minor update available for module chatgpt_ads (1.0.3). Release: Opensolr Search 5.1.3 — Minor update available for module opensolr_search (5.1.3). Release: ServiceM8 Webform Integration 1.2.1 — Minor update available for module servicem8_webform (1.2.1). Release: PostfixAdmin 1.0.0 — Initial release available for module postfix_admin (1.0.0)! Release: ip_analyser 1.0.3 — Minor update available for module ip_analyser (1.0.3). Module Revived: Swagger-PHP OpenAPI 3 documentation generator 1.0.0 — Module swagger_php updated after 10 months of inactivity (1.0.0). Security Coverage: Microsoft Azure AI — Module ai_provider_azure now has official Drupal security advisory coverage.

SerpApi is a service that can take a serch word and search in any region in any language in Google and give back the links as results.

SerpApi is a module that currently have two things available for it. The one thing is a service where you can link from the SerpApi service for any third party module that would want to use it for SEO or research reasons.

The other core feature is that it has one AI Automator type for the AI Automator module that can be found in the AI module. It makes it possible to take a search word and generate a list of links for the first results for that search word. This together with a scraper module makes it immensly powerful. Like below:


Using AI Automator with SerpApi to get real links from a search word

Note that this is the follow up module of the AI Interpolator Serp and makes that module obsolete for Drupal 10.3+.

Features

  • Search using Google search or Google news search.
  • Search from any location.
  • Search on any regional Google like google.de or google.jp.
  • Search for results in any language.

Requirements

  • Requires an account at SearchApi. There is a free trial.
  • To use it, you need to use a third party module using the service. Currently its only usable with the AI Automator submodule of the AI module

How to setup with AI Automator

  1. Install the AI module.
  2. Install this module.
  3. Visit /admin/config/serpapi/settingsand add your api key from your SerpApi account.
  4. Create some entity or node type with a string field.
  5. Create either a Link field with multiple results.
  6. Enable AI Automator checkbox and configure it.
  7. Create an entity of the type you generated, fill in some search word and save.
  8. The links will be filled out.

Use the service

This is a code example on how you can get links for the search word Why should I use Drupal?".

See https://serpapi.com/search-api for most of the configs available.

$serpapi = \Drupal::service('serpapi.api');
// Configure how you want it to run.
$parameters = [
  'engine' => google,
  'q' => 'Why should I use Drupal?'
];
// Get answers in a json array.
$response = $serpapi->searchCall($parameters);

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Jul 2024
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Dormant

Releases

Version Type Core Release date
1.0.x-dev Dev Jul 6, 2024