Google SERP
curl --request POST \
--url https://api.growthmarketing.ai/google-serp \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"keyword": "marketing",
"language_code": "en",
"location_code": 2840,
"device": "desktop"
}
'import requests
url = "https://api.growthmarketing.ai/google-serp"
payload = {
"keyword": "marketing",
"language_code": "en",
"location_code": 2840,
"device": "desktop"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
keyword: 'marketing',
language_code: 'en',
location_code: 2840,
device: 'desktop'
})
};
fetch('https://api.growthmarketing.ai/google-serp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.growthmarketing.ai/google-serp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'keyword' => 'marketing',
'language_code' => 'en',
'location_code' => 2840,
'device' => 'desktop'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.growthmarketing.ai/google-serp"
payload := strings.NewReader("{\n \"keyword\": \"marketing\",\n \"language_code\": \"en\",\n \"location_code\": 2840,\n \"device\": \"desktop\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.growthmarketing.ai/google-serp")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"keyword\": \"marketing\",\n \"language_code\": \"en\",\n \"location_code\": 2840,\n \"device\": \"desktop\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.growthmarketing.ai/google-serp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"keyword\": \"marketing\",\n \"language_code\": \"en\",\n \"location_code\": 2840,\n \"device\": \"desktop\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"data": {
"api": "serp",
"function": "live",
"se": "google",
"se_type": "organic",
"language_name": "English",
"location_name": "United States",
"keyword": "marketing",
"device": "desktop",
"os": "windows",
"se_domain": "google.co.uk"
},
"result": [
{
"type": "featured_snippet",
"rank_group": 1,
"rank_absolute": 2,
"domain": "www.ama.org",
"title": "What is Marketing? — The Definition of Marketing — AMA",
"description": "Marketing is the activity, set of institutions, and processes for creating, communicating, delivering, and exchanging offerings that have value for customers, clients, partners, and society at large.",
"url": "https://www.ama.org/the-definition-of-marketing-what-is-marketing/"
},
{
"type": "organic",
"rank_group": 1,
"rank_absolute": 4,
"domain": "www.investopedia.com",
"title": "Marketing in Business: Strategies and Types Explained",
"description": "Marketing refers to the activities of a company associated with buying, advertising, distributing, or selling a product or service.",
"url": "https://www.investopedia.com/terms/m/marketing.asp",
"breadcrumb": "https://www.investopedia.com › ... › Marketing Essentials"
}
]
}
}{
"success": false,
"error": "Error message",
"details": "Additional error details"
}{
"success": false,
"error": "Error message",
"details": "Additional error details"
}{
"success": false,
"error": "Error message",
"details": "Additional error details"
}API Reference
Google SERP
Retrieves search engine results from Google.
POST
/
google-serp
Google SERP
curl --request POST \
--url https://api.growthmarketing.ai/google-serp \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"keyword": "marketing",
"language_code": "en",
"location_code": 2840,
"device": "desktop"
}
'import requests
url = "https://api.growthmarketing.ai/google-serp"
payload = {
"keyword": "marketing",
"language_code": "en",
"location_code": 2840,
"device": "desktop"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
keyword: 'marketing',
language_code: 'en',
location_code: 2840,
device: 'desktop'
})
};
fetch('https://api.growthmarketing.ai/google-serp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.growthmarketing.ai/google-serp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'keyword' => 'marketing',
'language_code' => 'en',
'location_code' => 2840,
'device' => 'desktop'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.growthmarketing.ai/google-serp"
payload := strings.NewReader("{\n \"keyword\": \"marketing\",\n \"language_code\": \"en\",\n \"location_code\": 2840,\n \"device\": \"desktop\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.growthmarketing.ai/google-serp")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"keyword\": \"marketing\",\n \"language_code\": \"en\",\n \"location_code\": 2840,\n \"device\": \"desktop\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.growthmarketing.ai/google-serp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"keyword\": \"marketing\",\n \"language_code\": \"en\",\n \"location_code\": 2840,\n \"device\": \"desktop\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"data": {
"api": "serp",
"function": "live",
"se": "google",
"se_type": "organic",
"language_name": "English",
"location_name": "United States",
"keyword": "marketing",
"device": "desktop",
"os": "windows",
"se_domain": "google.co.uk"
},
"result": [
{
"type": "featured_snippet",
"rank_group": 1,
"rank_absolute": 2,
"domain": "www.ama.org",
"title": "What is Marketing? — The Definition of Marketing — AMA",
"description": "Marketing is the activity, set of institutions, and processes for creating, communicating, delivering, and exchanging offerings that have value for customers, clients, partners, and society at large.",
"url": "https://www.ama.org/the-definition-of-marketing-what-is-marketing/"
},
{
"type": "organic",
"rank_group": 1,
"rank_absolute": 4,
"domain": "www.investopedia.com",
"title": "Marketing in Business: Strategies and Types Explained",
"description": "Marketing refers to the activities of a company associated with buying, advertising, distributing, or selling a product or service.",
"url": "https://www.investopedia.com/terms/m/marketing.asp",
"breadcrumb": "https://www.investopedia.com › ... › Marketing Essentials"
}
]
}
}{
"success": false,
"error": "Error message",
"details": "Additional error details"
}{
"success": false,
"error": "Error message",
"details": "Additional error details"
}{
"success": false,
"error": "Error message",
"details": "Additional error details"
}Authorizations
Body
application/json
⌘I