SERP API
Retrieve Google search results programmatically with customizable location, language, and device settings. Supports web search, images, news, videos, maps, and AI mode.
Authentication
All API requests require authentication using an API key. Include your API key in the request header.
INFO — Get your API key
Sign up for a free account to receive your API key instantly at ujeebu.com/signup.
Header Format
GET ApiKey: YOUR_API_KEY
Basic Request
Make a search request by sending a GET request to the endpoint with your search query.
Endpoint
GET https://api.ujeebu.com/serp
Code Examples
curl -X GET 'https://api.ujeebu.com/serp?search=web+scraping' \
-H "ApiKey: YOUR_API_KEY"const response = await fetch('https://api.ujeebu.com/serp?search=web+scraping', {
headers: {
'ApiKey': 'YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data);import { UjeebuClient } from '@ujeebu-org/ujeebu-sdk';
const client = new UjeebuClient(process.env.UJEEBU_API_KEY);
const results = await client.searchText('web scraping', {
results_count: 10
});
console.log(results.data);import requests
response = requests.get(
'https://api.ujeebu.com/serp',
params={'search': 'web scraping'},
headers={'ApiKey': 'YOUR_API_KEY'}
)
print(response.json())from ujeebu_python import UjeebuClient
ujeebu = UjeebuClient(api_key='YOUR_API_KEY')
results = ujeebu.search_text(
search='web scraping',
params={'results_count': 10}
)
print(results)OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.ujeebu.com/serp?search=web+scraping")
.addHeader("ApiKey", "YOUR_API_KEY")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.ujeebu.com/serp?search=web+scraping',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'ApiKey: YOUR_API_KEY'
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://api.ujeebu.com/serp?search=web+scraping", nil)
req.Header.Add("ApiKey", "YOUR_API_KEY")
res, err := client.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}package main
import (
"fmt"
"github.com/ujeebu/ujeebu-go"
)
func main() {
client, err := ujeebu.NewClient("YOUR_API_KEY")
if err != nil {
panic(err)
}
results, _, err := client.GoogleSearch(ujeebu.SerpParams{
Search: "web scraping",
ResultsCount: 10,
})
if err != nil {
panic(err)
}
fmt.Println(results)
}Request Parameters
TIP — Required Parameters
You must provide either
url(full Google search URL) orsearch(search query). Choose the method that best fits your use case.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
url |
string |
No | - |
URL of the search page to retrieve. Either this or search parameter is required: provide either the search term or the Google search page URL. |
search |
string |
No | - |
The search query to perform on Google. Either this or url parameter is required: provide either the search term or the Google search page URL. |
search_type |
string |
No | search |
Specifies the type of search. Possible values include 'search', 'images', 'news', 'videos', 'maps', or 'ai'. |
lang |
string |
No | en |
Language of search results. Expects an ISO 639-1 language code (e.g., 'en' for English, 'es' for Spanish). |
location |
string |
No | US |
Geographic location for the search (e.g., 'fr', 'uk'). |
device |
string |
No | desktop |
The type of device to simulate during the search. Possible values: 'desktop', 'mobile'. |
results_count |
number |
No | 10 |
The maximum number of results to retrieve per page. |
page |
number |
No | 1 |
The specific results page to retrieve, for paginated searches. |
extra_params |
string |
No | - |
Additional custom query parameters to include in the search query (e.g., '&safe=active'). |
with_html |
boolean |
No | false |
Include the raw HTML of the search results page alongside the parsed data. |
html_only |
boolean |
No | false |
Return only the raw HTML of the search results page, without any parsing. |
Response Format
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | successful operation | SuccessResponse |
| 400 | Bad Request | Invalid parameter value | APIResponseError |
Success Response Schema
The response schema depends on the specified search type (e.g., search, images, news, videos, maps, or ai). Each search type has a unique response structure. Please refer to the example sections below to see the specific schema for each search type.
For a search search type, the response schema is as follows:
{
"knowledge_graph": {
"born": "July 10, 1856, Smiljan, Croatia",
"died": "January 7, 1943 (age 86\u00a0years), The New Yorker A Wyndham Hotel, New York, NY",
"education": "TU Graz (1875\u20131878), Gimnazija Karlovac (1870\u20131873)",
"height": "6\u2032 2\u2033",
"parents": "Milutin Tesla, \u0110uka Tesla",
"siblings": "Dane Tesla, Angelina Tesla, Milka Tesla, Marica Kosanovi\u0107",
"title": "Nikola Tesla",
"type": "Engineer and futurist"
},
"metadata": {
"google_url": "https:\/\/www.google.com\/search?gl=US&hl=en&num=10&q=Nikola+Tesla&sei=defQZ8riGZOt5NoPk7_S4AU",
"number_of_results": 36800000,
"query_displayed": "Nikola Tesla",
"results_time": "0.29 seconds"
},
"organic_results": [
{
"cite": "https:\/\/en.wikipedia.org \u203a wiki \u203a Nikola_Tesla",
"link": "https:\/\/en.wikipedia.org\/wiki\/Nikola_Tesla",
"position": 1,
"site_name": "Wikipedia",
"title": "Nikola Tesla"
},
{
"cite": "https:\/\/www.britannica.com \u203a ... \u203a Matter & Energy",
"link": "https:\/\/www.britannica.com\/biography\/Nikola-Tesla",
"position": 2,
"site_name": "Britannica",
"title": "Nikola Tesla | Biography, Facts, & Inventions"
},
...
],
"pagination": {
"google": {
"current": "https:\/\/google.com\/search?gl=US&hl=en&num=10&q=Nikola+Tesla&",
"next": "https:\/\/google.com\/search?gl=US&hl=en&num=10&q=Nikola+Tesla&start=20&tbm=&",
"other_pages": {
"3": "https:\/\/google.com\/search?gl=US&hl=en&num=10&q=Nikola+Tesla&start=30&tbm=&",
"4": "https:\/\/google.com\/search?gl=US&hl=en&num=10&q=Nikola+Tesla&start=40&tbm=&",
...
}
},
"api": {
"current": "https:\/\/api.ujeebu.com\/serp?device=desktop&lang=en&location=US&page=1&results_count=10&search=Nikola+Tesla&",
"next": "https:\/\/api.ujeebu.com\/serp?device=desktop&lang=en&location=US&page=2&results_count=10&search=Nikola+Tesla&",
"other_pages": {
"3": "https:\/\/api.ujeebu.com\/serp?device=desktop&lang=en&location=US&page=3&results_count=10&search=Nikola+Tesla&",
"4": "https:\/\/api.ujeebu.com\/serp?device=desktop&lang=en&location=US&page=4&results_count=10&search=Nikola+Tesla&",
...
}
}
},
"related_questions": [
"What is Nikola Tesla famous for?",
"How much money did Nikola Tesla have when he died?",
...
],
"top_stories": [],
"videos": [
{
"author": "BMResearch",
"date": "1 month ago",
"link": "https:\/\/www.google.com\/search?gl=US&hl=en&num=10&q=Nikola+Tesla&sei=defQZ8riGZOt5NoPk7_S4AU#",
"title": "Nikola Tesla: The Forgotten Genius of Electricity! (1856\u20131943)"
},
...
],
"ai_overview": {
"text": "Nikola Tesla was a Serbian-American inventor, electrical engineer, and futurist...",
"text_blocks": [
{
"type": "paragraph",
"content": "Nikola Tesla was a Serbian-American inventor, electrical engineer, and futurist best known for his contributions to the design of the modern alternating current (AC) electricity supply system.",
"links": [{"text": "alternating current", "link": "https://en.wikipedia.org/wiki/Alternating_current"}]
},
{
"type": "list",
"content": [
"Invented the Tesla coil and AC induction motor",
"Pioneered wireless communication and radio technology",
"Held over 300 patents worldwide"
]
}
],
"references": [
{"title": "Nikola Tesla - Wikipedia", "link": "https://en.wikipedia.org/wiki/Nikola_Tesla"},
{"title": "Nikola Tesla | Biography & Facts", "link": "https://www.britannica.com/biography/Nikola-Tesla"}
]
}
}
:::note
The ai_overview field may be null if Google does not display an AI Overview for the given query. It is only included in standard web search results (search_type=search).
:::
Error Response Schema
{
"status": "error",
"message": "Description of the error.",
"code": 400
}
Rate Limits & Credits
All SERP requests are billed at 25 credits per successful request.
INFO — Credits Header
Consumed credits are returned in the
Ujb-creditsheader
Examples
Google Web Search
Use the following example to perform a standard web search on Google. Pass parameters like search term, language, and results count as needed.
curl --location 'https://api.ujeebu.com/serp?timeout=90000&lang=en&results_count=10&search=Nikola%20Tesla' \
--header 'ApiKey: YOUR_API_KEY'const response = await fetch('https://api.ujeebu.com/serp?timeout=90000&lang=en&results_count=10&search=Nikola%20Tesla', {
headers: {
'ApiKey': 'YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data.organic_results);
console.log(data.knowledge_graph);import { UjeebuClient } from '@ujeebu-org/ujeebu-sdk';
const client = new UjeebuClient(process.env.UJEEBU_API_KEY);
const results = await client.searchText('Nikola Tesla', {
lang: 'en',
results_count: 10,
location: 'US'
});
console.log(results.data.organic_results);
console.log(results.data.knowledge_graph);import requests
response = requests.get(
'https://api.ujeebu.com/serp',
params={
'search': 'Nikola Tesla',
'lang': 'en',
'results_count': 10,
'timeout': 90000
},
headers={'ApiKey': 'YOUR_API_KEY'}
)
data = response.json()
print(data['organic_results'])
print(data['knowledge_graph'])from ujeebu_python import UjeebuClient
ujeebu = UjeebuClient(api_key='YOUR_API_KEY')
response = ujeebu.search_text(
search='Nikola Tesla',
params={
'lang': 'en',
'results_count': 10,
'location': 'US'
}
)
data = response.json()
print(data['organic_results'])
print(data['knowledge_graph'])OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.ujeebu.com/serp?timeout=90000&lang=en&results_count=10&search=Nikola%20Tesla")
.addHeader("ApiKey", "YOUR_API_KEY")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.ujeebu.com/serp?timeout=90000&lang=en&results_count=10&search=Nikola%20Tesla',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'ApiKey: YOUR_API_KEY'
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://api.ujeebu.com/serp?timeout=90000&lang=en&results_count=10&search=Nikola%20Tesla", nil)
req.Header.Add("ApiKey", "YOUR_API_KEY")
res, err := client.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}package main
import (
"fmt"
"github.com/ujeebu/ujeebu-go"
)
func main() {
client, err := ujeebu.NewClient("YOUR_API_KEY")
if err != nil {
panic(err)
}
results, _, err := client.GoogleSearch(ujeebu.SerpParams{
Search: "Nikola Tesla",
Lang: "en",
ResultsCount: 10,
Location: "US",
})
if err != nil {
panic(err)
}
fmt.Println(results.OrganicResults)
fmt.Println(results.KnowledgeGraph)
}Google News Search
Search for news articles using the SDK helper methods.
curl --location 'https://api.ujeebu.com/serp?search=artificial%20intelligence&search_type=news&lang=en&results_count=20' \
--header 'ApiKey: YOUR_API_KEY'const response = await fetch('https://api.ujeebu.com/serp?search=artificial%20intelligence&search_type=news&lang=en&results_count=20', {
headers: {
'ApiKey': 'YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data.news);import { UjeebuClient } from '@ujeebu-org/ujeebu-sdk';
const client = new UjeebuClient(process.env.UJEEBU_API_KEY);
const newsResults = await client.searchNews('artificial intelligence', {
lang: 'en',
results_count: 20
});
console.log(newsResults.data.news);import requests
response = requests.get(
'https://api.ujeebu.com/serp',
params={
'search': 'artificial intelligence',
'search_type': 'news',
'lang': 'en',
'results_count': 20
},
headers={'ApiKey': 'YOUR_API_KEY'}
)
data = response.json()
print(data['news'])from ujeebu_python import UjeebuClient
ujeebu = UjeebuClient(api_key='YOUR_API_KEY')
response = ujeebu.search_news(
search='artificial intelligence',
params={
'lang': 'en',
'results_count': 20
}
)
data = response.json()
print(data['news'])OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.ujeebu.com/serp?search=artificial%20intelligence&search_type=news&lang=en&results_count=20")
.addHeader("ApiKey", "YOUR_API_KEY")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.ujeebu.com/serp?search=artificial%20intelligence&search_type=news&lang=en&results_count=20',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'ApiKey: YOUR_API_KEY'
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://api.ujeebu.com/serp?search=artificial%20intelligence&search_type=news&lang=en&results_count=20", nil)
req.Header.Add("ApiKey", "YOUR_API_KEY")
res, err := client.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}package main
import (
"fmt"
"github.com/ujeebu/ujeebu-go"
)
func main() {
client, err := ujeebu.NewClient("YOUR_API_KEY")
if err != nil {
panic(err)
}
newsResults, _, err := client.GoogleNewsSearch(ujeebu.SerpParams{
Search: "artificial intelligence",
Lang: "en",
ResultsCount: 20,
})
if err != nil {
panic(err)
}
fmt.Println(newsResults.News)
}Google Images Search
Search for images using the SDK helper methods.
curl --location 'https://api.ujeebu.com/serp?search=nature%20photography&search_type=images&results_count=50' \
--header 'ApiKey: YOUR_API_KEY'const response = await fetch('https://api.ujeebu.com/serp?search=nature%20photography&search_type=images&results_count=50', {
headers: {
'ApiKey': 'YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data.images);import { UjeebuClient } from '@ujeebu-org/ujeebu-sdk';
const client = new UjeebuClient(process.env.UJEEBU_API_KEY);
const imageResults = await client.searchImages('nature photography', {
results_count: 50
});
console.log(imageResults.data.images);import requests
response = requests.get(
'https://api.ujeebu.com/serp',
params={
'search': 'nature photography',
'search_type': 'images',
'results_count': 50
},
headers={'ApiKey': 'YOUR_API_KEY'}
)
data = response.json()
print(data['images'])from ujeebu_python import UjeebuClient
ujeebu = UjeebuClient(api_key='YOUR_API_KEY')
response = ujeebu.search_images(
search='nature photography',
params={'results_count': 50}
)
data = response.json()
print(data['images'])OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.ujeebu.com/serp?search=nature%20photography&search_type=images&results_count=50")
.addHeader("ApiKey", "YOUR_API_KEY")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.ujeebu.com/serp?search=nature%20photography&search_type=images&results_count=50',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'ApiKey: YOUR_API_KEY'
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://api.ujeebu.com/serp?search=nature%20photography&search_type=images&results_count=50", nil)
req.Header.Add("ApiKey", "YOUR_API_KEY")
res, err := client.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}package main
import (
"fmt"
"github.com/ujeebu/ujeebu-go"
)
func main() {
client, err := ujeebu.NewClient("YOUR_API_KEY")
if err != nil {
panic(err)
}
imageResults, _, err := client.GoogleImageSearch(ujeebu.SerpParams{
Search: "nature photography",
ResultsCount: 50,
})
if err != nil {
panic(err)
}
fmt.Println(imageResults.Images)
}Google Videos Search
Search for videos using the SDK helper methods.
curl --location 'https://api.ujeebu.com/serp?search=machine%20learning%20tutorial&search_type=videos&lang=en&results_count=25' \
--header 'ApiKey: YOUR_API_KEY'const response = await fetch('https://api.ujeebu.com/serp?search=machine%20learning%20tutorial&search_type=videos&lang=en&results_count=25', {
headers: {
'ApiKey': 'YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data.videos);import { UjeebuClient } from '@ujeebu-org/ujeebu-sdk';
const client = new UjeebuClient(process.env.UJEEBU_API_KEY);
const videoResults = await client.searchVideos('machine learning tutorial', {
lang: 'en',
results_count: 25
});
console.log(videoResults.data.videos);import requests
response = requests.get(
'https://api.ujeebu.com/serp',
params={
'search': 'machine learning tutorial',
'search_type': 'videos',
'lang': 'en',
'results_count': 25
},
headers={'ApiKey': 'YOUR_API_KEY'}
)
data = response.json()
print(data['videos'])from ujeebu_python import UjeebuClient
ujeebu = UjeebuClient(api_key='YOUR_API_KEY')
response = ujeebu.search_videos(
search='machine learning tutorial',
params={
'lang': 'en',
'results_count': 25
}
)
data = response.json()
print(data['videos'])OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.ujeebu.com/serp?search=machine%20learning%20tutorial&search_type=videos&lang=en&results_count=25")
.addHeader("ApiKey", "YOUR_API_KEY")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.ujeebu.com/serp?search=machine%20learning%20tutorial&search_type=videos&lang=en&results_count=25',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'ApiKey: YOUR_API_KEY'
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://api.ujeebu.com/serp?search=machine%20learning%20tutorial&search_type=videos&lang=en&results_count=25", nil)
req.Header.Add("ApiKey", "YOUR_API_KEY")
res, err := client.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}package main
import (
"fmt"
"github.com/ujeebu/ujeebu-go"
)
func main() {
client, err := ujeebu.NewClient("YOUR_API_KEY")
if err != nil {
panic(err)
}
videoResults, _, err := client.GoogleVideoSearch(ujeebu.SerpParams{
Search: "machine learning tutorial",
Lang: "en",
ResultsCount: 25,
})
if err != nil {
panic(err)
}
fmt.Println(videoResults.Videos)
}Google Maps Search
Search for local businesses and places using the SDK helper methods.
curl --location 'https://api.ujeebu.com/serp?search=coffee%20shops%20near%20me&search_type=maps&location=US&results_count=15' \
--header 'ApiKey: YOUR_API_KEY'const response = await fetch('https://api.ujeebu.com/serp?search=coffee%20shops%20near%20me&search_type=maps&location=US&results_count=15', {
headers: {
'ApiKey': 'YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data.maps_results);import { UjeebuClient } from '@ujeebu-org/ujeebu-sdk';
const client = new UjeebuClient(process.env.UJEEBU_API_KEY);
const mapsResults = await client.searchMaps('coffee shops near me', {
location: 'US',
results_count: 15
});
console.log(mapsResults.data.maps_results);import requests
response = requests.get(
'https://api.ujeebu.com/serp',
params={
'search': 'coffee shops near me',
'search_type': 'maps',
'location': 'US',
'results_count': 15
},
headers={'ApiKey': 'YOUR_API_KEY'}
)
data = response.json()
print(data['maps_results'])from ujeebu_python import UjeebuClient
ujeebu = UjeebuClient(api_key='YOUR_API_KEY')
response = ujeebu.search_maps(
search='coffee shops near me',
params={
'location': 'US',
'results_count': 15
}
)
data = response.json()
print(data['maps_results'])OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.ujeebu.com/serp?search=coffee%20shops%20near%20me&search_type=maps&location=US&results_count=15")
.addHeader("ApiKey", "YOUR_API_KEY")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.ujeebu.com/serp?search=coffee%20shops%20near%20me&search_type=maps&location=US&results_count=15',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'ApiKey: YOUR_API_KEY'
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://api.ujeebu.com/serp?search=coffee%20shops%20near%20me&search_type=maps&location=US&results_count=15", nil)
req.Header.Add("ApiKey", "YOUR_API_KEY")
res, err := client.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}package main
import (
"fmt"
"github.com/ujeebu/ujeebu-go"
)
func main() {
client, err := ujeebu.NewClient("YOUR_API_KEY")
if err != nil {
panic(err)
}
mapsResults, _, err := client.GoogleMapSearch(ujeebu.SerpParams{
Search: "coffee shops near me",
Location: "US",
ResultsCount: 15,
})
if err != nil {
panic(err)
}
fmt.Println(mapsResults.Maps)
}Google AI Mode Search
Get AI-generated answers with cited sources using Google's AI Mode. Ideal for question-answering use cases where you need comprehensive, synthesized answers.
curl --location 'https://api.ujeebu.com/serp?search=what%20is%20quantum%20computing&search_type=ai&lang=en' \
--header 'ApiKey: YOUR_API_KEY'const response = await fetch('https://api.ujeebu.com/serp?search=what%20is%20quantum%20computing&search_type=ai&lang=en', {
headers: {
'ApiKey': 'YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data.ai_results.answer_text);
console.log(data.ai_results.citations);import { UjeebuClient } from '@ujeebu-org/ujeebu-sdk';
const client = new UjeebuClient(process.env.UJEEBU_API_KEY);
const aiResults = await client.searchAI('what is quantum computing', {
lang: 'en'
});
console.log(aiResults.data.ai_results.answer_text);
console.log(aiResults.data.ai_results.citations);import requests
response = requests.get(
'https://api.ujeebu.com/serp',
params={
'search': 'what is quantum computing',
'search_type': 'ai',
'lang': 'en'
},
headers={'ApiKey': 'YOUR_API_KEY'}
)
data = response.json()
print(data['ai_results']['answer_text'])
print(data['ai_results']['citations'])from ujeebu_python import UjeebuClient
ujeebu = UjeebuClient(api_key='YOUR_API_KEY')
response = ujeebu.search_ai(
search='what is quantum computing',
params={'lang': 'en'}
)
data = response.json()
print(data['ai_results']['answer_text'])
print(data['ai_results']['citations'])OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.ujeebu.com/serp?search=what%20is%20quantum%20computing&search_type=ai&lang=en")
.addHeader("ApiKey", "YOUR_API_KEY")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.ujeebu.com/serp?search=what%20is%20quantum%20computing&search_type=ai&lang=en',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'ApiKey: YOUR_API_KEY'
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://api.ujeebu.com/serp?search=what%20is%20quantum%20computing&search_type=ai&lang=en", nil)
req.Header.Add("ApiKey", "YOUR_API_KEY")
res, err := client.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}package main
import (
"fmt"
"github.com/ujeebu/ujeebu-go"
)
func main() {
client, err := ujeebu.NewClient("YOUR_API_KEY")
if err != nil {
panic(err)
}
aiResults, _, err := client.GoogleAIModeSearch(ujeebu.SerpParams{
Search: "what is quantum computing",
Lang: "en",
})
if err != nil {
panic(err)
}
fmt.Println(aiResults.AIResults)
}Paginated Search Results
Retrieve multiple pages of search results.
# Get first page
curl --location 'https://api.ujeebu.com/serp?search=web%20scraping&page=1&results_count=10' \
--header 'ApiKey: YOUR_API_KEY'
# Get second page
curl --location 'https://api.ujeebu.com/serp?search=web%20scraping&page=2&results_count=10' \
--header 'ApiKey: YOUR_API_KEY'// Get first page
const page1Response = await fetch('https://api.ujeebu.com/serp?search=web%20scraping&page=1&results_count=10', {
headers: { 'ApiKey': 'YOUR_API_KEY' }
});
const page1 = await page1Response.json();
// Get second page
const page2Response = await fetch('https://api.ujeebu.com/serp?search=web%20scraping&page=2&results_count=10', {
headers: { 'ApiKey': 'YOUR_API_KEY' }
});
const page2 = await page2Response.json();
console.log(page1.pagination.next);import { UjeebuClient } from '@ujeebu-org/ujeebu-sdk';
const client = new UjeebuClient(process.env.UJEEBU_API_KEY);
// Get first page
const page1 = await client.searchText('web scraping', {
page: 1,
results_count: 10
});
// Get second page
const page2 = await client.searchText('web scraping', {
page: 2,
results_count: 10
});
console.log(page1.data.pagination.next);import requests
# Get first page
page1_response = requests.get(
'https://api.ujeebu.com/serp',
params={'search': 'web scraping', 'page': 1, 'results_count': 10},
headers={'ApiKey': 'YOUR_API_KEY'}
)
page1 = page1_response.json()
# Get second page
page2_response = requests.get(
'https://api.ujeebu.com/serp',
params={'search': 'web scraping', 'page': 2, 'results_count': 10},
headers={'ApiKey': 'YOUR_API_KEY'}
)
page2 = page2_response.json()
print(page1['pagination']['next'])from ujeebu_python import UjeebuClient
ujeebu = UjeebuClient(api_key='YOUR_API_KEY')
# Get first page
page1 = ujeebu.search_text(
search='web scraping',
params={'page': 1, 'results_count': 10}
)
# Get second page
page2 = ujeebu.search_text(
search='web scraping',
params={'page': 2, 'results_count': 10}
)
data = page1.json()
print(data['pagination']['next'])OkHttpClient client = new OkHttpClient();
// Get first page
Request request1 = new Request.Builder()
.url("https://api.ujeebu.com/serp?search=web%20scraping&page=1&results_count=10")
.addHeader("ApiKey", "YOUR_API_KEY")
.build();
Response response1 = client.newCall(request1).execute();
System.out.println(response1.body().string());
// Get second page
Request request2 = new Request.Builder()
.url("https://api.ujeebu.com/serp?search=web%20scraping&page=2&results_count=10")
.addHeader("ApiKey", "YOUR_API_KEY")
.build();
Response response2 = client.newCall(request2).execute();
System.out.println(response2.body().string());<?php
// Get first page
$curl1 = curl_init();
curl_setopt_array($curl1, [
CURLOPT_URL => 'https://api.ujeebu.com/serp?search=web%20scraping&page=1&results_count=10',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['ApiKey: YOUR_API_KEY'],
]);
$page1 = curl_exec($curl1);
curl_close($curl1);
// Get second page
$curl2 = curl_init();
curl_setopt_array($curl2, [
CURLOPT_URL => 'https://api.ujeebu.com/serp?search=web%20scraping&page=2&results_count=10',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['ApiKey: YOUR_API_KEY'],
]);
$page2 = curl_exec($curl2);
curl_close($curl2);
echo $page1;package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
client := &http.Client{}
// Get first page
req1, _ := http.NewRequest("GET", "https://api.ujeebu.com/serp?search=web%20scraping&page=1&results_count=10", nil)
req1.Header.Add("ApiKey", "YOUR_API_KEY")
res1, _ := client.Do(req1)
body1, _ := ioutil.ReadAll(res1.Body)
res1.Body.Close()
// Get second page
req2, _ := http.NewRequest("GET", "https://api.ujeebu.com/serp?search=web%20scraping&page=2&results_count=10", nil)
req2.Header.Add("ApiKey", "YOUR_API_KEY")
res2, _ := client.Do(req2)
body2, _ := ioutil.ReadAll(res2.Body)
res2.Body.Close()
fmt.Println(string(body1))
}package main
import (
"fmt"
"github.com/ujeebu/ujeebu-go"
)
func main() {
client, err := ujeebu.NewClient("YOUR_API_KEY")
if err != nil {
panic(err)
}
// Get first page
page1, _, err := client.GoogleSearch(ujeebu.SerpParams{
Search: "web scraping",
Page: 1,
ResultsCount: 10,
})
if err != nil {
panic(err)
}
// Get second page
page2, _, _ := client.GoogleSearch(ujeebu.SerpParams{
Search: "web scraping",
Page: 2,
ResultsCount: 10,
})
fmt.Println(page1.Pagination.Next)
fmt.Println(page2)
}The example code provided returns a JSON response formatted as follows:
{
"knowledge_graph": {
"born": "July 10, 1856, Smiljan, Croatia",
"died": "January 7, 1943 (age 86\u00a0years), The New Yorker A Wyndham Hotel, New York, NY",
"education": "TU Graz (1875\u20131878), Gimnazija Karlovac (1870\u20131873)",
"height": "6\u2032 2\u2033",
"parents": "Milutin Tesla, \u0110uka Tesla",
"siblings": "Dane Tesla, Angelina Tesla, Milka Tesla, Marica Kosanovi\u0107",
"title": "Nikola Tesla",
"type": "Engineer and futurist"
},
"metadata": {
"google_url": "https:\/\/www.google.com\/search?gl=US&hl=en&num=10&q=Nikola+Tesla&sei=defQZ8riGZOt5NoPk7_S4AU",
"number_of_results": 36800000,
"query_displayed": "Nikola Tesla",
"results_time": "0.29 seconds"
},
"organic_results": [
{
"cite": "https:\/\/en.wikipedia.org \u203a wiki \u203a Nikola_Tesla",
"link": "https:\/\/en.wikipedia.org\/wiki\/Nikola_Tesla",
"position": 1,
"site_name": "Wikipedia",
"title": "Nikola Tesla"
},
{
"cite": "https:\/\/www.britannica.com \u203a ... \u203a Matter & Energy",
"link": "https:\/\/www.britannica.com\/biography\/Nikola-Tesla",
"position": 2,
"site_name": "Britannica",
"title": "Nikola Tesla | Biography, Facts, & Inventions"
},
{
"cite": "https:\/\/theoatmeal.com \u203a comics \u203a tesla",
"link": "https:\/\/theoatmeal.com\/comics\/tesla",
"position": 3,
"site_name": "The Oatmeal",
"title": "Why Nikola Tesla was the greatest geek who ever lived"
},
{
"cite": "https:\/\/www.biography.com \u203a inventors \u203a nikola-tesla",
"link": "https:\/\/www.biography.com\/inventors\/nikola-tesla",
"position": 4,
"site_name": "Biography",
"title": "Nikola Tesla: An Electric Inventor"
},
{
"cite": "https:\/\/tesla-museum.org \u203a ...",
"description": "Explore the priceless scientific heritage. The Nikola Tesla Museum inherits the original archive of the famous scientist. UNESCO included this rich collection\u00a0...",
"link": "https:\/\/tesla-museum.org\/en\/home\/",
"position": 5,
"site_name": "\u041c\u0443\u0437\u0435\u0458 \u041d\u0438\u043a\u043e\u043b\u0435 \u0422\u0435\u0441\u043b\u0435",
"title": "Welcome to the Nikola Tesla Museum."
},
{
"cite": "http:\/\/www.teslasociety.com \u203a biography",
"link": "http:\/\/www.teslasociety.com\/biography.htm",
"position": 6,
"site_name": "Tesla Memorial Society of New York",
"title": "Tesla's Biography"
},
{
"cite": "https:\/\/teslasciencecenter.org \u203a nikola-tesla-inventions",
"link": "https:\/\/teslasciencecenter.org\/nikola-tesla-inventions\/",
"position": 7,
"site_name": "Tesla Science Center at Wardenclyffe -",
"title": "Nikola Tesla Inventions"
},
{
"cite": "https:\/\/lemelson.mit.edu \u203a resources \u203a nikola-tesla",
"link": "https:\/\/lemelson.mit.edu\/resources\/nikola-tesla",
"position": 8,
"site_name": "Lemelson-MIT Program",
"title": "Nikola Tesla - Lemelson-MIT Program"
},
{
"cite": "https:\/\/www.amazon.com \u203a Wizard-Nikola-Biography-...",
"link": "https:\/\/www.amazon.com\/Wizard-Nikola-Biography-Genius-Citadel\/dp\/0806519606",
"position": 9,
"site_name": "Amazon.com",
"title": "Wizard: The Life and Times of Nikola Tesla : Biography ..."
}
],
"pagination": {
"google": {
"current": "https:\/\/google.com\/search?gl=US&hl=en&num=10&q=Nikola+Tesla&",
"next": "https:\/\/google.com\/search?gl=US&hl=en&num=10&q=Nikola+Tesla&start=20&tbm=&",
"other_pages": {
"3": "https:\/\/google.com\/search?gl=US&hl=en&num=10&q=Nikola+Tesla&start=30&tbm=&",
"4": "https:\/\/google.com\/search?gl=US&hl=en&num=10&q=Nikola+Tesla&start=40&tbm=&",
"5": "https:\/\/google.com\/search?gl=US&hl=en&num=10&q=Nikola+Tesla&start=50&tbm=&",
"6": "https:\/\/google.com\/search?gl=US&hl=en&num=10&q=Nikola+Tesla&start=60&tbm=&",
"7": "https:\/\/google.com\/search?gl=US&hl=en&num=10&q=Nikola+Tesla&start=70&tbm=&",
"8": "https:\/\/google.com\/search?gl=US&hl=en&num=10&q=Nikola+Tesla&start=80&tbm=&"
}
},
"api": {
"current": "https:\/\/api.ujeebu.com\/serp?device=desktop&lang=en&location=US&page=1&results_count=10&search=Nikola+Tesla&",
"next": "https:\/\/api.ujeebu.com\/serp?device=desktop&lang=en&location=US&page=2&results_count=10&search=Nikola+Tesla&",
"other_pages": {
"3": "https:\/\/api.ujeebu.com\/serp?device=desktop&lang=en&location=US&page=3&results_count=10&search=Nikola+Tesla&",
"4": "https:\/\/api.ujeebu.com\/serp?device=desktop&lang=en&location=US&page=4&results_count=10&search=Nikola+Tesla&",
"5": "https:\/\/api.ujeebu.com\/serp?device=desktop&lang=en&location=US&page=5&results_count=10&search=Nikola+Tesla&",
"6": "https:\/\/api.ujeebu.com\/serp?device=desktop&lang=en&location=US&page=6&results_count=10&search=Nikola+Tesla&",
"7": "https:\/\/api.ujeebu.com\/serp?device=desktop&lang=en&location=US&page=7&results_count=10&search=Nikola+Tesla&",
"8": "https:\/\/api.ujeebu.com\/serp?device=desktop&lang=en&location=US&page=8&results_count=10&search=Nikola+Tesla&"
}
}
},
"related_questions": [
"What is Nikola Tesla famous for?",
"How much money did Nikola Tesla have when he died?",
"Why was Tesla's work destroyed?",
"Who was Nikola Tesla to Elon Musk?"
],
"top_stories": null,
"videos": [
{
"author": "BMResearch",
"date": "1 month ago",
"link": "https:\/\/www.google.com\/search?gl=US&hl=en&num=10&q=Nikola+Tesla&sei=defQZ8riGZOt5NoPk7_S4AU#",
"title": "Nikola Tesla: The Forgotten Genius of Electricity! (1856\u20131943)"
},
{
"author": "Newsthink",
"date": "Jul 16, 2020",
"link": "https:\/\/www.google.com\/search?gl=US&hl=en&num=10&q=Nikola+Tesla&sei=defQZ8riGZOt5NoPk7_S4AU#",
"title": "The Tragic Story of Nikola Tesla"
},
{
"author": "Dare to do. Motivation",
"date": "2 weeks ago",
"link": "https:\/\/www.google.com\/search?gl=US&hl=en&num=10&q=Nikola+Tesla&sei=defQZ8riGZOt5NoPk7_S4AU#",
"title": "The Story Of Nikola Tesla And The Broken Lightbulb"
}
],
"ai_overview": null
}
:::note
The ai_overview field is included in web search responses. It contains Google's AI-generated overview when available, or null when Google does not display one for the given query. See the Search Types page for the full AI Overview and AI Mode response schemas.
:::
Usage Tracking
To track credit usage programmatically, call the /account endpoint. See Account API for the full reference, response shape, and rate limit (10 calls/minute).
Spin up an API key in 60 seconds
Free tier: 5,000 credits, no card, full access to every endpoint on this page.