Google Search
Google search results with support for pagination and geo/language parameters.
Call via @xylop/api-client-typescript
import { XylopSearchClient, XylopSearchEngines } from "@xylop/api-client-typescript";
interface SearchResponse {
[key: string]: unknown;
}
const client = new XylopSearchClient({
apiKey: "YOUR_API_KEY"
});
const response = await client.search<SearchResponse>(
XylopSearchEngines.Google,
{
q: "best laptop",
gl: "us",
hl: "en",
google_domain: "google.com",
start: "0",
});
The TypeScript SDK is written in TypeScript, generates `.d.ts`, supports generic response type and works via `fetch`.
Call via @xylop/api-client
import { XylopSearchClient, XylopSearchEngines } from "@xylop/api-client";
const client = new XylopSearchClient({
apiKey: "YOUR_API_KEY"
});
const response = await client.search(
XylopSearchEngines.Google,
{
q: "best laptop",
gl: "us",
hl: "en",
google_domain: "google.com",
start: "0",
});
JavaScript SDK works in Node.js 18+ and modern browsers via `fetch`; TypeScript declarations are included in the npm package.
Call via XylopSearchClient
using Xylop.Api.Client;
var client = new XylopSearchClient(new HttpClient(), "YOUR_API_KEY");
using var response = await client.SearchJsonAsync(
XylopSearchEngines.Google,
new Dictionary<string, string?>
{
["q"] = "best laptop",
["gl"] = "us",
["hl"] = "en",
["google_domain"] = "google.com",
["start"] = "0",
});
For typed mode, use `SearchAsync<TResponse>` and the response model from `Xylop.Logic.SerpApiResponses.*`, which is included in the C# SDK.
Call via xylop-api-client
from xylop_api_client import XylopSearchClient, XylopSearchEngines
client = XylopSearchClient("YOUR_API_KEY")
response = client.search(
XylopSearchEngines.GOOGLE,
{
"q": "best laptop",
"gl": "us",
"hl": "en",
"google_domain": "google.com",
"start": "0",
},
)
The Python SDK returns JSON as normal `dict`/`list` and does not require runtime dependencies.
Call via xylop/api-client
<?php
use Xylop\Api\Client\XylopSearchClient;
use Xylop\Api\Client\XylopSearchEngines;
$client = new XylopSearchClient('YOUR_API_KEY');
$response = $client->search(
XylopSearchEngines::GOOGLE,
[
'q' => 'best laptop',
'gl' => 'us',
'hl' => 'en',
'google_domain' => 'google.com',
'start' => '0',
]
);
PHP SDK uses standard stream wrappers, returns a decoded JSON array and does not require runtime dependencies.
Call via xylop-api-client
require "xylop_api_client"
client = XylopApiClient::Client.new(api_key: "YOUR_API_KEY")
response = client.search(
XylopApiClient::Engines::GOOGLE,
{
"q" => "best laptop",
"gl" => "us",
"hl" => "en",
"google_domain" => "google.com",
"start" => "0",
}
)
Ruby SDK uses standard `net/http`, `json` and returns JSON as normal Hash/Array values.
Call via xylop-api-client
import java.util.Map;
import ru.xylop.api.client.XylopSearchClient;
import ru.xylop.api.client.XylopSearchEngines;
var client = new XylopSearchClient("YOUR_API_KEY");
String responseJson = client.searchJson(
XylopSearchEngines.GOOGLE,
Map.of(
"q", "best laptop",
"gl", "us",
"hl", "en",
"google_domain", "google.com",
"start", "0"
));
The Java SDK uses `java.net.http.HttpClient`, returns a JSON string and does not require runtime dependencies.
Call via xylop-api-kotlin-client
import ru.xylop.api.kotlin.XylopSearchClient
import ru.xylop.api.kotlin.XylopSearchEngines
val client = XylopSearchClient("YOUR_API_KEY")
val responseJson = client.searchJson(
XylopSearchEngines.GOOGLE,
mapOf(
"q" to "best laptop",
"gl" to "us",
"hl" to "en",
"google_domain" to "google.com",
"start" to "0",
),
)
Kotlin SDK uses the JVM `HttpClient`, returns a JSON string and leaves the JSON mapping to the application.
Call via XylopApiClient
import XylopApiClient
let client = XylopSearchClient(apiKey: "YOUR_API_KEY")
let response = try await client.searchJSON(
engine: XylopSearchEngines.google,
parameters: [
"q": "best laptop",
"gl": "us",
"hl": "en",
"google_domain": "google.com",
"start": "0",
]
)
Swift SDK uses Foundation `URLSession`, supports async/await and returns Data, JSONSerialization values or caller-owned Decodable models.
Call via xylop_api_client
import 'package:xylop_api_client/xylop_api_client.dart';
Future<void> main() async {
final client = XylopSearchClient('YOUR_API_KEY');
final response = await client.search(
XylopSearchEngines.google,
<String, Object?>{
'q': 'best laptop',
'gl': 'us',
'hl': 'en',
'google_domain': 'google.com',
'start': '0',
},
);
print(response);
}
The Dart SDK uses `dart:io`, returns decoded JSON or raw response text, and does not require runtime dependencies.
Call via Xylop.Api.Cpp
#include <xylop/api/client.hpp>
#include <xylop/api/curl_transport.hpp>
int main()
{
xylop::api::search_client client(
"YOUR_API_KEY",
xylop::api::curl_transport);
auto response_json = client.search_text(
xylop::api::engines::google,
{
{"q", "best laptop"},
{"gl", "us"},
{"hl", "en"},
{"google_domain", "google.com"},
{"start", "0"},
});
return 0;
}
The C++ SDK has a header-only C++17 core, accepts a transport callback and can use the optional libcurl adapter `xylop::api::curl_transport`.
Call via Xylop.Api.Go
package main
import (
"context"
"log"
xylop "github.com/Leonid-Vizel/Xylop.AdminPanel/src/Xylop.Api.Go"
)
func main() {
client, err := xylop.NewClient("YOUR_API_KEY")
if err != nil {
log.Fatal(err)
}
var response map[string]any
err = client.SearchJSON(
context.Background(),
xylop.EngineGoogle,
xylop.Params(map[string]string{
"q": "best laptop",
"gl": "us",
"hl": "en",
"google_domain": "google.com",
"start": "0",
}),
&response)
if err != nil {
log.Fatal(err)
}
}
The Go SDK returns raw JSON bytes or decodes the response into a custom structure, `map[string]any` or another target.
HTTP contract
- URL
https://api.xylop.ru/search- Engine
google- API key
- The SDK is transferred automatically from the client settings.
Request parameters
| Parameter | Type | Required | Meaning | Description |
|---|---|---|---|---|
api_key
SDK
|
string | Yes | — | Xylop API key. In the SDK it is set once in the settings or client designer. |
engine
SDK
|
string | Yes |
google
|
Search source. |
q
|
string | Yes | best laptop | Search phrase. |
location
|
string | No | Austin, Texas, United States | Search city or region. Cannot be used with uule, lat and lon. |
uule
|
string | No | w+CAIQICINVW5pdGVkIFN0YXRlcw | Google encoded location. |
lat
|
number | No | 30.2672 | Latitude of the search point. Used together with lon. |
lon
|
number | No | -97.7431 | Longitude of the search point. Used together with lat. |
radius
|
number | No | 100 | Displacement radius in meters. |
gl
|
string | No |
us
|
Country code (geo). |
hl
|
string | No |
en
|
Interface language. |
google_domain
|
string | No |
google.com
|
Google regional domain. |
cr
|
string | No | countryUS | Limit results by country. |
lr
|
string | No | lang_en | Limiting the language of results. |
tbm
|
string | No | isch | Search type: empty, isch, lcl, vid, nws, shop, pts and others. |
tbs
|
string | No | qdr:w | Advanced Google filters. |
safe
|
string | No | active | Explicit content filter. |
nfpr
|
string | No | 1 | Disable query autocorrection. |
filter
|
string | No | 0 | Manage similar Google results. |
num
|
number | No | 10 | Number of results. |
start
|
number | No |
0
|
Pagination offset. |
device
|
string | No |
desktop
|
desktop, tablet or mobile. |
Response fields
| Field | Type | Source | Description |
|---|---|---|---|
search_metadata |
object | Sample answer | Request metadata: status, identifier, execution time and service information of the provider. |
search_parameters |
object | Sample answer | The normalized parameters with which the upstream search performed the request. |
organic_results |
array | Sample answer | Main organic results: positions, titles, links and snippets. |
Sample answer
{
"search_metadata": {
"status": "Success",
"id": "demo-google"
},
"search_parameters": {
"engine": "google",
"q": "best laptop"
},
"organic_results": [
{
"position": 1,
"title": "Best laptops of 2026",
"link": "https://example.com/laptops"
}
]
}