Google Images
Google Images output in a typed DTO contract: images, shopping blocks, suggested/related searches and explicitly described SerpApi links to continue navigation.
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.GoogleImages,
{
q: "coffee",
google_domain: "google.com",
gl: "us",
hl: "en",
ijn: "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.GoogleImages,
{
q: "coffee",
google_domain: "google.com",
gl: "us",
hl: "en",
ijn: "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.GoogleImages,
new Dictionary<string, string?>
{
["q"] = "coffee",
["google_domain"] = "google.com",
["gl"] = "us",
["hl"] = "en",
["ijn"] = "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_IMAGES,
{
"q": "coffee",
"google_domain": "google.com",
"gl": "us",
"hl": "en",
"ijn": "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_IMAGES,
[
'q' => 'coffee',
'google_domain' => 'google.com',
'gl' => 'us',
'hl' => 'en',
'ijn' => '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_IMAGES,
{
"q" => "coffee",
"google_domain" => "google.com",
"gl" => "us",
"hl" => "en",
"ijn" => "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_IMAGES,
Map.of(
"q", "coffee",
"google_domain", "google.com",
"gl", "us",
"hl", "en",
"ijn", "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_IMAGES,
mapOf(
"q" to "coffee",
"google_domain" to "google.com",
"gl" to "us",
"hl" to "en",
"ijn" 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.googleImages,
parameters: [
"q": "coffee",
"google_domain": "google.com",
"gl": "us",
"hl": "en",
"ijn": "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.googleImages,
<String, Object?>{
'q': 'coffee',
'google_domain': 'google.com',
'gl': 'us',
'hl': 'en',
'ijn': '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_images,
{
{"q", "coffee"},
{"google_domain", "google.com"},
{"gl", "us"},
{"hl", "en"},
{"ijn", "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.EngineGoogleImages,
xylop.Params(map[string]string{
"q": "coffee",
"google_domain": "google.com",
"gl": "us",
"hl": "en",
"ijn": "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_images- 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_images
|
Google Images engine. |
q
|
string | Yes | coffee | Search phrase for Google Images. |
location
|
string | No | Austin, Texas, United States | Search city or region. Cannot be used in conjunction with uule. |
uule
|
string | No | w+CAIQICINVW5pdGVkIFN0YXRlcw | Google encoded location. |
google_domain
|
string | No |
google.com
|
Google regional domain. |
gl
|
string | No |
us
|
Country code. |
hl
|
string | No |
en
|
Interface language. |
cr
|
string | No | countryUS | Limit results by country. |
period_unit
|
string | No | d | s, n, h, d, w, m or y for recent images. |
period_value
|
number | No | 7 | Period size for period_unit. |
start_date
|
string | No | 20260101 | Start of period YYYYMMDD. |
end_date
|
string | No | 20260131 | End of period YYYYMMDD. |
chips
|
string | No | q:coffee,g_1:cup:... | Filter from suggested_searches. |
uds
|
string | No | AMwkrP... | Google uds parameter from suggested_searches. |
tbs
|
string | No | sur:cl | Advanced Google Images filters. |
imgar
|
string | No | s | Aspect ratio, for example s for square. |
image_size
|
string | No | l | Image size: l, m, i, 2mp and others. |
image_color
|
string | No | trans | Color filter. |
image_type
|
string | No | photo | face, photo, clipart, lineart or animated. |
licenses
|
string | No | cl | License filter, for example cl or ol. |
safe
|
string | No | active | Explicit content filter. |
nfpr
|
string | No | 1 | Disable query autocorrection. |
filter
|
string | No | 0 | Management of similar/omitted results. |
ijn
|
number | No |
0
|
Google Images page number, 0..99. |
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. |
search_information |
object | Sample answer | Summary of results: approximate number of results, search time and additional statuses. |
images_results |
array | Sample answer | Images and associated links, previews and sources. |
suggested_searches |
array | Sample answer | Typed response field for this engine; the structure depends on the upstream provider and request parameters. |
related_searches |
array | Sample answer | Related search terms that you can use for your next search. |
serpapi_pagination |
object | Sample answer | Typed response field for this engine; the structure depends on the upstream provider and request parameters. |
Sample answer
{
"search_metadata": {
"id": "642d73b7de9834017010c43c",
"status": "Success",
"google_images_url": "https://www.google.com/search?q=Coffee&hl=en&gl=us&udm=2"
},
"search_parameters": {
"engine": "google_images",
"q": "Coffee",
"google_domain": "google.com",
"hl": "en",
"gl": "us",
"device": "desktop"
},
"search_information": {
"image_results_state": "Results for exact spelling"
},
"images_results": [
{
"position": 1,
"thumbnail": "https://serpapi.com/searches/.../images/example.jpeg",
"related_content_id": "Y0hoQW1Kcnc4RXRiV01cIixcIlU2b0pNbkYtZWVWVEFN",
"serpapi_related_content_link": "https://serpapi.com/search.json?engine=google_images_related_content&related_content_id=...",
"source": "Wikipedia",
"title": "Coffee - Wikipedia",
"link": "https://en.wikipedia.org/wiki/Coffee",
"original": "https://upload.wikimedia.org/wikipedia/commons/e/e4/Latte_and_dark_coffee.jpg",
"original_width": 3200,
"original_height": 2000,
"is_product": false
}
],
"suggested_searches": [
{
"name": "Cup",
"link": "https://www.google.com/search?q=coffee+cup&udm=2",
"chips": "q:coffee,g_1:cup:...",
"uds": "AMwkrP...",
"q": "coffee cup",
"serpapi_link": "https://serpapi.com/search.json?engine=google_images&q=coffee+cup",
"thumbnail": "https://serpapi.com/searches/.../images/chip.jpeg"
}
],
"related_searches": [
{
"query": "cup coffee",
"link": "https://www.google.com/search?q=cup+coffee&udm=2",
"serpapi_link": "https://serpapi.com/search.json?engine=google_images&q=cup+coffee",
"highlighted_words": [
"cup"
],
"thumbnail": "https://serpapi.com/searches/.../images/related.jpeg"
}
],
"serpapi_pagination": {
"current": 0,
"next": "https://serpapi.com/search.json?engine=google_images&ijn=1&q=Coffee"
}
}