Check a page's SEO: titles, tags, headings and links
curl --request POST \
--url https://api.stophy.dev/v1/site/seo \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://www.shopify.com"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://www.shopify.com'})
};
fetch('https://api.stophy.dev/v1/site/seo', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/site/seo"
payload = { "url": "https://www.shopify.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"url": "<string>",
"title": {
"length": 0,
"text": "<string>"
},
"description": {
"length": 0,
"text": "<string>"
},
"hasViewport": true,
"canonical": {
"isSelf": true,
"url": "<string>"
},
"robots": {
"isNoindex": true,
"isNofollow": true,
"meta": "<string>",
"isAllowedByRobotsTxt": true
},
"hreflang": [
{
"url": "<string>",
"language": "<string>"
}
],
"jsonLd": {
"blocks": 0,
"invalid": 0,
"types": [
"<string>"
]
},
"images": {
"total": 0,
"missingAlt": 0,
"emptyAlt": 0,
"missingAltExamples": [
"<string>"
]
},
"links": {
"internal": 0,
"external": 0,
"nofollow": 0,
"checked": [
{
"url": "<string>",
"status": 0
}
],
"broken": [
{
"url": "<string>",
"status": 0
}
]
},
"words": 0,
"issues": [
"<string>"
],
"language": "<string>",
"headings": {
"h1": [
"<string>"
],
"h2": [
"<string>"
],
"outline": [
{
"level": 0,
"text": "<string>"
}
]
},
"openGraph": {},
"twitter": {}
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}Site
Site SEO check API
Call the Site SEO check API to get url, title, description, language and has viewport, as JSON or markdown. 2 credits per 2 items, at least 2 credits.
POST
/
v1
/
site
/
seo
Check a page's SEO: titles, tags, headings and links
curl --request POST \
--url https://api.stophy.dev/v1/site/seo \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://www.shopify.com"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://www.shopify.com'})
};
fetch('https://api.stophy.dev/v1/site/seo', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/site/seo"
payload = { "url": "https://www.shopify.com" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"url": "<string>",
"title": {
"length": 0,
"text": "<string>"
},
"description": {
"length": 0,
"text": "<string>"
},
"hasViewport": true,
"canonical": {
"isSelf": true,
"url": "<string>"
},
"robots": {
"isNoindex": true,
"isNofollow": true,
"meta": "<string>",
"isAllowedByRobotsTxt": true
},
"hreflang": [
{
"url": "<string>",
"language": "<string>"
}
],
"jsonLd": {
"blocks": 0,
"invalid": 0,
"types": [
"<string>"
]
},
"images": {
"total": 0,
"missingAlt": 0,
"emptyAlt": 0,
"missingAltExamples": [
"<string>"
]
},
"links": {
"internal": 0,
"external": 0,
"nofollow": 0,
"checked": [
{
"url": "<string>",
"status": 0
}
],
"broken": [
{
"url": "<string>",
"status": 0
}
]
},
"words": 0,
"issues": [
"<string>"
],
"language": "<string>",
"headings": {
"h1": [
"<string>"
],
"h2": [
"<string>"
],
"outline": [
{
"level": 0,
"text": "<string>"
}
]
},
"openGraph": {},
"twitter": {}
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}- Endpoint:
site.seo - Returns:
datahasurl,title,description,language,hasViewport,canonical,robots,headings,hreflang,openGraph,twitter,jsonLd,images,links,words,issues. - Cost: 2 credits per 2 items, at least 2 credits. Failed calls cost nothing.
- Paging: No.
Example
import { Stophy } from "stophy";
const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
const result = await stophy.site.seo({ url: "https://www.shopify.com" });
console.log(result.data.url);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.site.seo(url="https://www.shopify.com")
print(result["data"]["url"])
curl -X POST https://api.stophy.dev/v1/site/seo \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"url":"https://www.shopify.com"}'
stophy site seo https://www.shopify.com
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.