curl --request GET \
--url https://devtune.ai/api/v2/projects/{projectId}/traffic/page-search-queries \
--header 'Authorization: Bearer <token>'import requests
url = "https://devtune.ai/api/v2/projects/{projectId}/traffic/page-search-queries"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://devtune.ai/api/v2/projects/{projectId}/traffic/page-search-queries', 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://devtune.ai/api/v2/projects/{projectId}/traffic/page-search-queries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://devtune.ai/api/v2/projects/{projectId}/traffic/page-search-queries"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://devtune.ai/api/v2/projects/{projectId}/traffic/page-search-queries")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://devtune.ai/api/v2/projects/{projectId}/traffic/page-search-queries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"status": "measured",
"generation": "<string>",
"page": {
"domain": "<string>",
"pagePath": "<string>"
},
"filters": {
"windowDays": 30,
"minPosition": 123,
"maxPosition": 123,
"minImpressions": 123,
"limit": 123
},
"searchConsole": {
"current": {
"aggregates": {
"clicks": 123,
"impressions": 123,
"ctr": 123,
"avgPosition": 123,
"measurement": {
"availability": "unavailable",
"status": "unmeasured",
"isCurrent": true,
"asOfDate": "2023-11-07T05:31:56Z",
"explanation": "<string>",
"sourceDateFrom": "2023-12-25",
"sourceDateTo": "2023-12-25",
"finalityBoundary": "2023-12-25",
"contributors": [
{}
],
"coveredRanges": [
{
"connectionId": "<string>",
"dateFrom": "2023-12-25",
"dateTo": "2023-12-25"
}
],
"storedEvidence": [
{}
],
"coverageFrom": "2023-12-25",
"coverageThrough": "2023-12-25"
}
},
"window": {
"days": 7,
"dateFrom": "2023-12-25",
"dateTo": "2023-12-25"
}
},
"prior": {
"aggregates": {
"clicks": 123,
"impressions": 123,
"ctr": 123,
"avgPosition": 123,
"measurement": {
"availability": "unavailable",
"status": "unmeasured",
"isCurrent": true,
"asOfDate": "2023-11-07T05:31:56Z",
"explanation": "<string>",
"sourceDateFrom": "2023-12-25",
"sourceDateTo": "2023-12-25",
"finalityBoundary": "2023-12-25",
"contributors": [
{}
],
"coveredRanges": [
{
"connectionId": "<string>",
"dateFrom": "2023-12-25",
"dateTo": "2023-12-25"
}
],
"storedEvidence": [
{}
],
"coverageFrom": "2023-12-25",
"coverageThrough": "2023-12-25"
}
},
"window": {
"days": 7,
"dateFrom": "2023-12-25",
"dateTo": "2023-12-25"
}
},
"delta": {
"clicks": 123,
"impressions": 123
}
},
"pageQueryCount": 123,
"matchingCount": 123,
"truncated": true,
"queries": [
{
"query": "<string>",
"clicks": 123,
"impressions": 123,
"position": 123,
"prior": {
"clicks": 123,
"impressions": 123,
"position": 123
}
}
]
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}Get a page's Search Console queries
Returns the Search Console queries one page ranks for in a fixed 30- or 90-day window, filtered to a position band and an impression floor, ordered by impressions. The defaults (positions 8 to 20, at least 20 impressions, 90 days) select queries where the page already ranks and an edit to the page can move it. Each query carries its current clicks, impressions and average position and the prior values when the prior window is measured and Search Console reported the query in it. status is not_connected when no active Search Console connection covers the host and path of the page, and unmeasured when the window is not fully verified at the current publication; queries are returned only when status is measured, so an empty list then means no query qualified. truncated is true when more queries qualified than limit. searchConsole reports the window dates and coverage the queries were read from. Requires the traffic.read scope.
curl --request GET \
--url https://devtune.ai/api/v2/projects/{projectId}/traffic/page-search-queries \
--header 'Authorization: Bearer <token>'import requests
url = "https://devtune.ai/api/v2/projects/{projectId}/traffic/page-search-queries"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://devtune.ai/api/v2/projects/{projectId}/traffic/page-search-queries', 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://devtune.ai/api/v2/projects/{projectId}/traffic/page-search-queries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://devtune.ai/api/v2/projects/{projectId}/traffic/page-search-queries"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://devtune.ai/api/v2/projects/{projectId}/traffic/page-search-queries")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://devtune.ai/api/v2/projects/{projectId}/traffic/page-search-queries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"status": "measured",
"generation": "<string>",
"page": {
"domain": "<string>",
"pagePath": "<string>"
},
"filters": {
"windowDays": 30,
"minPosition": 123,
"maxPosition": 123,
"minImpressions": 123,
"limit": 123
},
"searchConsole": {
"current": {
"aggregates": {
"clicks": 123,
"impressions": 123,
"ctr": 123,
"avgPosition": 123,
"measurement": {
"availability": "unavailable",
"status": "unmeasured",
"isCurrent": true,
"asOfDate": "2023-11-07T05:31:56Z",
"explanation": "<string>",
"sourceDateFrom": "2023-12-25",
"sourceDateTo": "2023-12-25",
"finalityBoundary": "2023-12-25",
"contributors": [
{}
],
"coveredRanges": [
{
"connectionId": "<string>",
"dateFrom": "2023-12-25",
"dateTo": "2023-12-25"
}
],
"storedEvidence": [
{}
],
"coverageFrom": "2023-12-25",
"coverageThrough": "2023-12-25"
}
},
"window": {
"days": 7,
"dateFrom": "2023-12-25",
"dateTo": "2023-12-25"
}
},
"prior": {
"aggregates": {
"clicks": 123,
"impressions": 123,
"ctr": 123,
"avgPosition": 123,
"measurement": {
"availability": "unavailable",
"status": "unmeasured",
"isCurrent": true,
"asOfDate": "2023-11-07T05:31:56Z",
"explanation": "<string>",
"sourceDateFrom": "2023-12-25",
"sourceDateTo": "2023-12-25",
"finalityBoundary": "2023-12-25",
"contributors": [
{}
],
"coveredRanges": [
{
"connectionId": "<string>",
"dateFrom": "2023-12-25",
"dateTo": "2023-12-25"
}
],
"storedEvidence": [
{}
],
"coverageFrom": "2023-12-25",
"coverageThrough": "2023-12-25"
}
},
"window": {
"days": 7,
"dateFrom": "2023-12-25",
"dateTo": "2023-12-25"
}
},
"delta": {
"clicks": 123,
"impressions": 123
}
},
"pageQueryCount": 123,
"matchingCount": 123,
"truncated": true,
"queries": [
{
"query": "<string>",
"clicks": 123,
"impressions": 123,
"position": 123,
"prior": {
"clicks": 123,
"impressions": 123,
"position": 123
}
}
]
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {
"retryable": true,
"retryAfterSeconds": 2
}
}