curl --request POST \
--url https://api.rankspot.ai/v1/gsc/performance \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"startDate": "2024-01-01",
"endDate": "2024-01-31",
"dimensions": [
"query"
],
"dimensionFilterGroups": [
{
"filters": [
{
"dimension": "country",
"expression": "ind",
"operator": "equals"
}
]
}
],
"startRow": 0,
"rowLimit": 123
}
'import requests
url = "https://api.rankspot.ai/v1/gsc/performance"
payload = {
"startDate": "2024-01-01",
"endDate": "2024-01-31",
"dimensions": ["query"],
"dimensionFilterGroups": [{ "filters": [
{
"dimension": "country",
"expression": "ind",
"operator": "equals"
}
] }],
"startRow": 0,
"rowLimit": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
startDate: '2024-01-01',
endDate: '2024-01-31',
dimensions: ['query'],
dimensionFilterGroups: [{filters: [{dimension: 'country', expression: 'ind', operator: 'equals'}]}],
startRow: 0,
rowLimit: 123
})
};
fetch('https://api.rankspot.ai/v1/gsc/performance', 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.rankspot.ai/v1/gsc/performance",
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([
'startDate' => '2024-01-01',
'endDate' => '2024-01-31',
'dimensions' => [
'query'
],
'dimensionFilterGroups' => [
[
'filters' => [
[
'dimension' => 'country',
'expression' => 'ind',
'operator' => 'equals'
]
]
]
],
'startRow' => 0,
'rowLimit' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.rankspot.ai/v1/gsc/performance"
payload := strings.NewReader("{\n \"startDate\": \"2024-01-01\",\n \"endDate\": \"2024-01-31\",\n \"dimensions\": [\n \"query\"\n ],\n \"dimensionFilterGroups\": [\n {\n \"filters\": [\n {\n \"dimension\": \"country\",\n \"expression\": \"ind\",\n \"operator\": \"equals\"\n }\n ]\n }\n ],\n \"startRow\": 0,\n \"rowLimit\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.rankspot.ai/v1/gsc/performance")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"startDate\": \"2024-01-01\",\n \"endDate\": \"2024-01-31\",\n \"dimensions\": [\n \"query\"\n ],\n \"dimensionFilterGroups\": [\n {\n \"filters\": [\n {\n \"dimension\": \"country\",\n \"expression\": \"ind\",\n \"operator\": \"equals\"\n }\n ]\n }\n ],\n \"startRow\": 0,\n \"rowLimit\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rankspot.ai/v1/gsc/performance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startDate\": \"2024-01-01\",\n \"endDate\": \"2024-01-31\",\n \"dimensions\": [\n \"query\"\n ],\n \"dimensionFilterGroups\": [\n {\n \"filters\": [\n {\n \"dimension\": \"country\",\n \"expression\": \"ind\",\n \"operator\": \"equals\"\n }\n ]\n }\n ],\n \"startRow\": 0,\n \"rowLimit\": 123\n}"
response = http.request(request)
puts response.read_bodyGet Search Console performance data
Returns clicks, impressions, CTR, and average position from Google Search Console for your connected property.
Requires: Google Search Console connected from the RankSpot dashboard (Integrations → Google Search Console).
Dimensions: Group results by query (search terms), page (landing pages), country, device, or searchAppearance. Combine up to 3 dimensions in a single request.
Date range: Use ISO dates (YYYY-MM-DD). Data is available with ~2-3 day delay. Maximum range: 16 months.
curl --request POST \
--url https://api.rankspot.ai/v1/gsc/performance \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"startDate": "2024-01-01",
"endDate": "2024-01-31",
"dimensions": [
"query"
],
"dimensionFilterGroups": [
{
"filters": [
{
"dimension": "country",
"expression": "ind",
"operator": "equals"
}
]
}
],
"startRow": 0,
"rowLimit": 123
}
'import requests
url = "https://api.rankspot.ai/v1/gsc/performance"
payload = {
"startDate": "2024-01-01",
"endDate": "2024-01-31",
"dimensions": ["query"],
"dimensionFilterGroups": [{ "filters": [
{
"dimension": "country",
"expression": "ind",
"operator": "equals"
}
] }],
"startRow": 0,
"rowLimit": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
startDate: '2024-01-01',
endDate: '2024-01-31',
dimensions: ['query'],
dimensionFilterGroups: [{filters: [{dimension: 'country', expression: 'ind', operator: 'equals'}]}],
startRow: 0,
rowLimit: 123
})
};
fetch('https://api.rankspot.ai/v1/gsc/performance', 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.rankspot.ai/v1/gsc/performance",
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([
'startDate' => '2024-01-01',
'endDate' => '2024-01-31',
'dimensions' => [
'query'
],
'dimensionFilterGroups' => [
[
'filters' => [
[
'dimension' => 'country',
'expression' => 'ind',
'operator' => 'equals'
]
]
]
],
'startRow' => 0,
'rowLimit' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.rankspot.ai/v1/gsc/performance"
payload := strings.NewReader("{\n \"startDate\": \"2024-01-01\",\n \"endDate\": \"2024-01-31\",\n \"dimensions\": [\n \"query\"\n ],\n \"dimensionFilterGroups\": [\n {\n \"filters\": [\n {\n \"dimension\": \"country\",\n \"expression\": \"ind\",\n \"operator\": \"equals\"\n }\n ]\n }\n ],\n \"startRow\": 0,\n \"rowLimit\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.rankspot.ai/v1/gsc/performance")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"startDate\": \"2024-01-01\",\n \"endDate\": \"2024-01-31\",\n \"dimensions\": [\n \"query\"\n ],\n \"dimensionFilterGroups\": [\n {\n \"filters\": [\n {\n \"dimension\": \"country\",\n \"expression\": \"ind\",\n \"operator\": \"equals\"\n }\n ]\n }\n ],\n \"startRow\": 0,\n \"rowLimit\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rankspot.ai/v1/gsc/performance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"startDate\": \"2024-01-01\",\n \"endDate\": \"2024-01-31\",\n \"dimensions\": [\n \"query\"\n ],\n \"dimensionFilterGroups\": [\n {\n \"filters\": [\n {\n \"dimension\": \"country\",\n \"expression\": \"ind\",\n \"operator\": \"equals\"\n }\n ]\n }\n ],\n \"startRow\": 0,\n \"rowLimit\": 123\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Start date in YYYY-MM-DD format
"2024-01-01"
End date in YYYY-MM-DD format
"2024-01-31"
Dimensions to group by. Pass multiple times for combined grouping (e.g. query + page).
query, page, country, device, date, searchAppearance ["query"]
Filter groups to narrow results. Filters within a group are ANDed together.
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
country, device, page, query, searchAppearance "country"
Value to match against. Country codes are ISO 3166-1 alpha-3 (e.g. ind, usa). Device values: DESKTOP, MOBILE, TABLET.
"ind"
equals, notEquals, contains, notContains, includingRegex, excludingRegex Zero-based index of the first row to return. Use with rowLimit for pagination.
0
Max rows to return (1–25000). Defaults to GSC API default (1000) when omitted.
Response
Performance data from Google Search Console
