Update SEO Guidelines competitor inclusion
curl --request PATCH \
--url https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/competitors \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"competitors": [
{
"included": true,
"url": "https://acme.io/seo-tools-guide"
},
{
"included": false,
"url": "https://example.com/best-seo-tools"
}
]
}
'import requests
url = "https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/competitors"
payload = { "competitors": [
{
"included": True,
"url": "https://acme.io/seo-tools-guide"
},
{
"included": False,
"url": "https://example.com/best-seo-tools"
}
] }
headers = {
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
competitors: [
{included: true, url: 'https://acme.io/seo-tools-guide'},
{included: false, url: 'https://example.com/best-seo-tools'}
]
})
};
fetch('https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/competitors', 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/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/competitors",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'competitors' => [
[
'included' => true,
'url' => 'https://acme.io/seo-tools-guide'
],
[
'included' => false,
'url' => 'https://example.com/best-seo-tools'
]
]
]),
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/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/competitors"
payload := strings.NewReader("{\n \"competitors\": [\n {\n \"included\": true,\n \"url\": \"https://acme.io/seo-tools-guide\"\n },\n {\n \"included\": false,\n \"url\": \"https://example.com/best-seo-tools\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/competitors")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"competitors\": [\n {\n \"included\": true,\n \"url\": \"https://acme.io/seo-tools-guide\"\n },\n {\n \"included\": false,\n \"url\": \"https://example.com/best-seo-tools\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/competitors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"competitors\": [\n {\n \"included\": true,\n \"url\": \"https://acme.io/seo-tools-guide\"\n },\n {\n \"included\": false,\n \"url\": \"https://example.com/best-seo-tools\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"description": "An overview of the SEO tools used by leading marketing teams.",
"domain_score": 78,
"id": 4519,
"included": true,
"position": 1,
"score": 91,
"title": "The Ultimate SEO Tools Guide",
"url": "https://acme.io/seo-tools-guide"
},
{
"description": "Hand-picked SEO software recommendations for in-house teams and agencies.",
"domain_score": 71,
"id": 4520,
"included": true,
"position": 2,
"score": 86,
"title": "Best SEO Software for 2025",
"url": "https://blog.foo.com/best-seo-software"
},
{
"description": "Compare the top SEO tools to grow organic traffic, audit your site, and outrank competitors.",
"domain_score": 67,
"id": 4521,
"included": false,
"position": 3,
"score": 82,
"title": "10 Best SEO Tools in 2025",
"url": "https://example.com/best-seo-tools"
}
],
"meta": {
"can_load_more_competitors": true,
"load_more_status": "idle",
"total": 3
}
}{
"error": {
"details": [
{
"field": "keywords",
"reason": "required"
}
],
"reason": "validation_error"
}
}{
"error": {
"details": [],
"reason": "unauthorized"
}
}{
"error": {
"details": [],
"reason": "permission_denied"
}
}{
"error": {
"details": [],
"reason": "not_found"
}
}{
"error": {
"details": [
{
"allowed": [
"application/json"
],
"field": "accept",
"reason": "unsupported"
}
],
"message": "Accept must be one of: application/json",
"reason": "not_acceptable"
}
}{
"error": {
"details": [],
"message": "The request conflicts with the current resource state.",
"reason": "conflict"
}
}{
"error": {
"details": [],
"message": "Set Content-Type: application/json.",
"reason": "unsupported_media_type"
}
}{
"error": {
"details": [],
"message": "The request was understood but could not be processed.",
"reason": "unprocessable_entity"
}
}{
"error": {
"details": [
{
"retry_after": 30
}
],
"reason": "rate_limit_exceeded"
}
}SEO Guidelines
Update SEO Guidelines competitor inclusion
Updates inclusion of listed competitors and recalculates the SEO Guidelines from the new selection.
The competitors array must contain at least one item and each url must be unique. Requires the editor to be in completed state.
Rate limit: 10 requests/sec
PATCH
/
api
/
v2
/
workspaces
/
{workspace_id}
/
content_editors
/
{content_editor_id}
/
seo_guidelines
/
competitors
Update SEO Guidelines competitor inclusion
curl --request PATCH \
--url https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/competitors \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"competitors": [
{
"included": true,
"url": "https://acme.io/seo-tools-guide"
},
{
"included": false,
"url": "https://example.com/best-seo-tools"
}
]
}
'import requests
url = "https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/competitors"
payload = { "competitors": [
{
"included": True,
"url": "https://acme.io/seo-tools-guide"
},
{
"included": False,
"url": "https://example.com/best-seo-tools"
}
] }
headers = {
"API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
competitors: [
{included: true, url: 'https://acme.io/seo-tools-guide'},
{included: false, url: 'https://example.com/best-seo-tools'}
]
})
};
fetch('https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/competitors', 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/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/competitors",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'competitors' => [
[
'included' => true,
'url' => 'https://acme.io/seo-tools-guide'
],
[
'included' => false,
'url' => 'https://example.com/best-seo-tools'
]
]
]),
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/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/competitors"
payload := strings.NewReader("{\n \"competitors\": [\n {\n \"included\": true,\n \"url\": \"https://acme.io/seo-tools-guide\"\n },\n {\n \"included\": false,\n \"url\": \"https://example.com/best-seo-tools\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/competitors")
.header("API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"competitors\": [\n {\n \"included\": true,\n \"url\": \"https://acme.io/seo-tools-guide\"\n },\n {\n \"included\": false,\n \"url\": \"https://example.com/best-seo-tools\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.surferseo.com/api/v2/workspaces/{workspace_id}/content_editors/{content_editor_id}/seo_guidelines/competitors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"competitors\": [\n {\n \"included\": true,\n \"url\": \"https://acme.io/seo-tools-guide\"\n },\n {\n \"included\": false,\n \"url\": \"https://example.com/best-seo-tools\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"description": "An overview of the SEO tools used by leading marketing teams.",
"domain_score": 78,
"id": 4519,
"included": true,
"position": 1,
"score": 91,
"title": "The Ultimate SEO Tools Guide",
"url": "https://acme.io/seo-tools-guide"
},
{
"description": "Hand-picked SEO software recommendations for in-house teams and agencies.",
"domain_score": 71,
"id": 4520,
"included": true,
"position": 2,
"score": 86,
"title": "Best SEO Software for 2025",
"url": "https://blog.foo.com/best-seo-software"
},
{
"description": "Compare the top SEO tools to grow organic traffic, audit your site, and outrank competitors.",
"domain_score": 67,
"id": 4521,
"included": false,
"position": 3,
"score": 82,
"title": "10 Best SEO Tools in 2025",
"url": "https://example.com/best-seo-tools"
}
],
"meta": {
"can_load_more_competitors": true,
"load_more_status": "idle",
"total": 3
}
}{
"error": {
"details": [
{
"field": "keywords",
"reason": "required"
}
],
"reason": "validation_error"
}
}{
"error": {
"details": [],
"reason": "unauthorized"
}
}{
"error": {
"details": [],
"reason": "permission_denied"
}
}{
"error": {
"details": [],
"reason": "not_found"
}
}{
"error": {
"details": [
{
"allowed": [
"application/json"
],
"field": "accept",
"reason": "unsupported"
}
],
"message": "Accept must be one of: application/json",
"reason": "not_acceptable"
}
}{
"error": {
"details": [],
"message": "The request conflicts with the current resource state.",
"reason": "conflict"
}
}{
"error": {
"details": [],
"message": "Set Content-Type: application/json.",
"reason": "unsupported_media_type"
}
}{
"error": {
"details": [],
"message": "The request was understood but could not be processed.",
"reason": "unprocessable_entity"
}
}{
"error": {
"details": [
{
"retry_after": 30
}
],
"reason": "rate_limit_exceeded"
}
}Authorizations
Path Parameters
Required range:
x >= 1Example:
123
Required range:
x >= 1Example:
123
Body
application/json
Competitor inclusion updates
Minimum array length:
1Show child attributes
Show child attributes
Was this page helpful?