API för validering av strukturerad data API-referens
Extrahera och validera schema.org-markering i JSON-LD, Microdata och RDFa. Använd denna referens för att välja en operation och integrera dess dokumenterade svarskontrakt.
Operationer
GET /v1/structured-data
GET
/v1/structured-data
Krediter: 2-6
Frågeparametrar
| Parameter | Typ | obligatorisk |
|---|---|---|
| url | string | obligatorisk |
| render | boolean | valfri |
Svarsfält
| Fält | Typ |
|---|---|
url |
string |
final_url |
string |
status |
string |
reason |
string | null |
checked_at |
string |
fetch |
object |
fetch.http_status |
integer | null |
fetch.final_url |
string |
fetch.content_type |
string | null |
fetch.bytes |
integer |
fetch.truncated |
boolean |
fetch.redirect_count |
integer |
fetch.duration_ms |
integer |
fetch.rendered |
boolean |
summary |
object |
summary.json_ld |
integer |
summary.microdata |
integer |
summary.rdfa |
integer |
summary.total_items |
integer |
summary.valid_items |
integer |
summary.errors |
integer |
summary.warnings |
integer |
types[] |
string[] |
block_errors[] |
string[] |
items[] |
object[] |
items[] |
object |
items[].format |
string |
items[].types[] |
string[] |
items[].properties[] |
string[] |
items[].values |
object |
items[].children[] |
object[] |
items[].children[] |
object |
items[].children[].format |
string |
items[].children[].types[] |
string[] |
items[].children[].properties[] |
string[] |
items[].children[].values |
object |
items[].children[].children[] |
object[] |
items[].children[].children[] |
object |
items[].children[].path |
string |
items[].children[].status |
string |
items[].children[].errors[] |
object[] |
items[].children[].errors[] |
object |
items[].children[].errors[].code |
string |
items[].children[].errors[].property |
string |
items[].children[].warnings[] |
object[] |
items[].children[].warnings[] |
object |
items[].children[].warnings[].code |
string |
items[].children[].warnings[].property |
string |
items[].path |
string |
items[].status |
string |
items[].errors[] |
object[] |
items[].errors[] |
object |
items[].errors[].code |
string |
items[].errors[].property |
string |
items[].warnings[] |
object[] |
items[].warnings[] |
object |
items[].warnings[].code |
string |
items[].warnings[].property |
string |
Exempelbegäran
curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/structured-data?url=https%3A%2F%2Fexample.com&render=false"const response = await fetch("https://domscan.net/v1/structured-data?url=https%3A%2F%2Fexample.com&render=false", {
headers: { "X-API-Key": process.env.DOMSCAN_API_KEY },
});
const data = await response.json();
console.log(data);import os
import requests
response = requests.get(
"https://domscan.net/v1/structured-data?url=https%3A%2F%2Fexample.com&render=false",
headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
)
print(response.json())package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest(http.MethodGet, "https://domscan.net/v1/structured-data?url=https%3A%2F%2Fexample.com&render=false", nil)
if err != nil {
panic(err)
}
req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
data, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(resp.Status, string(data))
}require "json"
require "net/http"
uri = URI("https://domscan.net/v1/structured-data?url=https%3A%2F%2Fexample.com&render=false")
request = Net::HTTP::Get.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts JSON.pretty_generate(JSON.parse(response.body))Exempelsvar
{
"url": "https://example.com/shoes/trail-runner",
"final_url": "https://example.com/shoes/trail-runner",
"status": "ok",
"reason": null,
"checked_at": "2026-10-13T12:00:00.000Z",
"fetch": {
"http_status": 200,
"final_url": "https://example.com/shoes/trail-runner",
"content_type": "text/html",
"bytes": 3535,
"truncated": false,
"redirect_count": 0,
"duration_ms": 412,
"rendered": false
},
"summary": {
"json_ld": 2,
"microdata": 1,
"rdfa": 0,
"total_items": 9,
"valid_items": 3,
"errors": 1,
"warnings": 5
},
"types": [
"AggregateRating",
"Brand",
"BreadcrumbList",
"ListItem",
"Offer",
"Product",
"Rating",
"Review"
],
"block_errors": [],
"items": [
{
"format": "json-ld",
"types": [
"Product"
],
"properties": [
"name",
"image",
"sku",
"brand",
"offers",
"aggregateRating"
],
"values": {
"name": "Trail Runner 2",
"image": "https://example.com/images/trail-runner.jpg",
"sku": "TR-2"
},
"children": [
{
"format": "json-ld",
"types": [
"Brand"
],
"properties": [
"name"
],
"values": {
"name": "Example Outdoor"
},
"children": [],
"path": "json_ld[0].children[0]",
"status": "unchecked",
"errors": [],
"warnings": []
},
{
"format": "json-ld",
"types": [
"Offer"
],
"properties": [
"price",
"priceCurrency",
"availability"
],
"values": {
"price": "129.00",
"priceCurrency": "EUR",
"availability": "https://schema.org/InStock"
},
"children": [],
"path": "json_ld[0].children[1]",
"status": "warnings",
"errors": [],
"warnings": [
{
"code": "missing_recommended",
"property": "url"
}
]
},
{
"format": "json-ld",
"types": [
"AggregateRating"
],
"properties": [
"ratingValue",
"reviewCount"
],
"values": {
"ratingValue": "4.6",
"reviewCount": "87"
},
"children": [],
"path": "json_ld[0].children[2]",
"status": "warnings",
"errors": [],
"warnings": [
{
"code": "missing_recommended",
"property": "bestRating"
}
]
}
],
"path": "json_ld[0]",
"status": "warnings",
"errors": [],
"warnings": [
{
"code": "missing_recommended",
"property": "description"
}
]
},
{
"format": "json-ld",
"types": [
"BreadcrumbList"
],
"properties": [
"itemListElement"
],
"values": {},
"children": [
{
"format": "json-ld",
"types": [
"ListItem"
],
"properties": [
"position",
"name",
"item"
],
"values": {
"position": "1",
"name": "Shoes",
"item": "https://example.com/shoes"
},
"children": [],
"path": "json_ld[1].children[0]",
"status": "valid",
"errors": [],
"warnings": []
},
{
"format": "json-ld",
"types": [
"ListItem"
],
"properties": [
"name"
],
"values": {
"name": "Trail Runner 2"
},
"children": [],
"path": "json_ld[1].children[1]",
"status": "errors",
"errors": [
{
"code": "missing_required",
"property": "position"
}
],
"warnings": [
{
"code": "missing_recommended",
"property": "item"
}
]
}
],
"path": "json_ld[1]",
"status": "valid",
"errors": [],
"warnings": []
}
]
}
HTTP-statuskoder
200OK400Felaktig begäran401Obehörig402Betalning krävs429För många begäranden