Create SERP Analyzer query
curl --request POST \
--url https://app.surferseo.com/api/v1/serp_analyzer \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"keyword": "How to write content that ranks?",
"analyze_nlp_entity_sentiment": false,
"analyze_nlp_sentiment": false,
"device": "mobile",
"location": "United States",
"screenshot": false
}
'import requests
url = "https://app.surferseo.com/api/v1/serp_analyzer"
payload = {
"keyword": "How to write content that ranks?",
"analyze_nlp_entity_sentiment": False,
"analyze_nlp_sentiment": False,
"device": "mobile",
"location": "United States",
"screenshot": False
}
headers = {
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
keyword: 'How to write content that ranks?',
analyze_nlp_entity_sentiment: false,
analyze_nlp_sentiment: false,
device: 'mobile',
location: 'United States',
screenshot: false
})
};
fetch('https://app.surferseo.com/api/v1/serp_analyzer', 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://app.surferseo.com/api/v1/serp_analyzer",
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' => 'How to write content that ranks?',
'analyze_nlp_entity_sentiment' => false,
'analyze_nlp_sentiment' => false,
'device' => 'mobile',
'location' => 'United States',
'screenshot' => false
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"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://app.surferseo.com/api/v1/serp_analyzer"
payload := strings.NewReader("{\n \"keyword\": \"How to write content that ranks?\",\n \"analyze_nlp_entity_sentiment\": false,\n \"analyze_nlp_sentiment\": false,\n \"device\": \"mobile\",\n \"location\": \"United States\",\n \"screenshot\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("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://app.surferseo.com/api/v1/serp_analyzer")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"keyword\": \"How to write content that ranks?\",\n \"analyze_nlp_entity_sentiment\": false,\n \"analyze_nlp_sentiment\": false,\n \"device\": \"mobile\",\n \"location\": \"United States\",\n \"screenshot\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.surferseo.com/api/v1/serp_analyzer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"keyword\": \"How to write content that ranks?\",\n \"analyze_nlp_entity_sentiment\": false,\n \"analyze_nlp_sentiment\": false,\n \"device\": \"mobile\",\n \"location\": \"United States\",\n \"screenshot\": false\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"state": "scheduled"
}SERP Analyzer
Create SERP Analyzer query
deprecated
Deprecated: Use /api/v1/serp_analyzers instead.
Rate limits:
- 10 requests/sec
- each query created will count against your daily limit. Fair Use Policy applies, by default 100 queries a day.
POST
/
api
/
v1
/
serp_analyzer
Create SERP Analyzer query
curl --request POST \
--url https://app.surferseo.com/api/v1/serp_analyzer \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"keyword": "How to write content that ranks?",
"analyze_nlp_entity_sentiment": false,
"analyze_nlp_sentiment": false,
"device": "mobile",
"location": "United States",
"screenshot": false
}
'import requests
url = "https://app.surferseo.com/api/v1/serp_analyzer"
payload = {
"keyword": "How to write content that ranks?",
"analyze_nlp_entity_sentiment": False,
"analyze_nlp_sentiment": False,
"device": "mobile",
"location": "United States",
"screenshot": False
}
headers = {
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
keyword: 'How to write content that ranks?',
analyze_nlp_entity_sentiment: false,
analyze_nlp_sentiment: false,
device: 'mobile',
location: 'United States',
screenshot: false
})
};
fetch('https://app.surferseo.com/api/v1/serp_analyzer', 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://app.surferseo.com/api/v1/serp_analyzer",
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' => 'How to write content that ranks?',
'analyze_nlp_entity_sentiment' => false,
'analyze_nlp_sentiment' => false,
'device' => 'mobile',
'location' => 'United States',
'screenshot' => false
]),
CURLOPT_HTTPHEADER => [
"API-KEY: <api-key>",
"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://app.surferseo.com/api/v1/serp_analyzer"
payload := strings.NewReader("{\n \"keyword\": \"How to write content that ranks?\",\n \"analyze_nlp_entity_sentiment\": false,\n \"analyze_nlp_sentiment\": false,\n \"device\": \"mobile\",\n \"location\": \"United States\",\n \"screenshot\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("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://app.surferseo.com/api/v1/serp_analyzer")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"keyword\": \"How to write content that ranks?\",\n \"analyze_nlp_entity_sentiment\": false,\n \"analyze_nlp_sentiment\": false,\n \"device\": \"mobile\",\n \"location\": \"United States\",\n \"screenshot\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.surferseo.com/api/v1/serp_analyzer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"keyword\": \"How to write content that ranks?\",\n \"analyze_nlp_entity_sentiment\": false,\n \"analyze_nlp_sentiment\": false,\n \"device\": \"mobile\",\n \"location\": \"United States\",\n \"screenshot\": false\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"state": "scheduled"
}Authorizations
Headers
Workspace ID to create the query in. If not provided, uses the oldest active workspace.
Required range:
x >= 1Body
application/json
keyword
Minimum string length:
1Example:
"How to write content that ranks?"
Available options:
mobile, desktop Location; get the list of supported locations from /api/v1/locations (no auth required)
Example:
"United States"
Toggles creating screenshots of pages from the SERP
Was this page helpful?