dimensions.dr
Domain authority (DR)
Assess a domain's backlink strength and relative authority for competitor screening, backlink prioritization and an initial quality review.
- Domain Rating on a 0–100 scale
- DR source attribution and link
Sign in to manage your API key. Members have unlimited API calls.
/api/v1/site-data/Authorization: Bearer YOUR_API_KEY · Content-Type: application/json
A request can select one dimension or combine several. These are the main fields returned by each dimension; individual values may be unavailable depending on source coverage and the target site's state.
dimensions.dr
Assess a domain's backlink strength and relative authority for competitor screening, backlink prioritization and an initial quality review.
dimensions.registration
Review how long a domain has existed, its registration state and basic DNS setup to assess site history, renewal risk and infrastructure.
dimensions.traffic
Use third-party estimates to understand visit scale and engagement, plus where traffic comes from, leading markets and search demand.
dimensions.onpage
Read public structured data from a site's homepage to review content completeness and common technical SEO issues.
Traffic data is a third-party estimate and may differ from first-party analytics. A null value means data is unavailable, not zero.
Structures below come directly from generated OpenAPI. Expand for nested types, enums, defaults and every safe business field. All 15 non-empty dimension combinations are supported; onpage takes {profile: basic}, not true.
query: action · domain · dimensions · cache · wait_ms
result: action · request_id
response: schema_version · request_id · status · domain · registrable_domain · dimensions · usage · retry_after_seconds
{
"anyOf": [
{
"type": "object",
"properties": {
"action": {
"default": "query",
"type": "string",
"const": "query"
},
"domain": {
"type": "string",
"minLength": 1,
"maxLength": 253
},
"dimensions": {
"type": "object",
"properties": {
"dr": {
"default": false,
"type": "boolean"
},
"registration": {
"default": false,
"type": "boolean"
},
"traffic": {
"default": false,
"type": "boolean"
},
"onpage": {
"default": false,
"anyOf": [
{
"type": "boolean",
"const": false
},
{
"type": "object",
"properties": {
"profile": {
"default": "basic",
"type": "string",
"const": "basic"
}
},
"additionalProperties": false
}
]
}
},
"additionalProperties": false,
"anyOf": [
{
"required": [
"dr"
],
"properties": {
"dr": {
"const": true
}
}
},
{
"required": [
"registration"
],
"properties": {
"registration": {
"const": true
}
}
},
{
"required": [
"traffic"
],
"properties": {
"traffic": {
"const": true
}
}
},
{
"required": [
"onpage"
],
"properties": {
"onpage": {
"type": "object"
}
}
}
]
},
"cache": {
"default": "prefer",
"type": "string",
"enum": [
"prefer",
"only"
]
},
"wait_ms": {
"default": 10000,
"type": "integer",
"minimum": 0,
"maximum": 10000
}
},
"required": [
"domain",
"dimensions"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"action": {
"type": "string",
"const": "result"
},
"request_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": [
"action",
"request_id"
],
"additionalProperties": false
}
]
}{
"type": "object",
"properties": {
"schema_version": {
"type": "string",
"const": "site-data.v1"
},
"request_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"status": {
"type": "string",
"enum": [
"complete",
"partial",
"pending",
"failed"
]
},
"domain": {
"type": "string",
"minLength": 1
},
"registrable_domain": {
"type": "string",
"minLength": 1
},
"dimensions": {
"type": "object",
"properties": {
"dr": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "ahrefs"
},
"queried_target": {
"type": "string",
"minLength": 1
},
"fetched_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"data_as_of": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"cached": {
"type": "boolean"
},
"stale": {
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"INVALID_INPUT",
"UNAUTHORIZED",
"FORBIDDEN",
"IDEMPOTENCY_CONFLICT",
"RATE_LIMITED",
"DAILY_LIMIT_EXCEEDED",
"CACHE_MISS",
"TARGET_REJECTED",
"TARGET_DNS_FAILED",
"PROVIDER_UNAVAILABLE",
"UPSTREAM_INVALID",
"REQUEST_EXPIRED",
"REQUEST_NOT_FOUND",
"INTERNAL_ERROR"
]
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"retry_after_seconds": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"code",
"message"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"const": "ok"
},
"data": {
"type": "object",
"properties": {
"domain_rating": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"attribution": {
"type": "object",
"properties": {
"text": {
"type": "string",
"minLength": 1
},
"url": {
"type": "string",
"format": "uri"
}
},
"required": [
"text",
"url"
],
"additionalProperties": false
}
},
"required": [
"domain_rating",
"attribution"
],
"additionalProperties": false
}
},
"required": [
"source",
"queried_target",
"fetched_at",
"data_as_of",
"cached",
"stale",
"error",
"status",
"data"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "ahrefs"
},
"queried_target": {
"type": "string",
"minLength": 1
},
"fetched_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"data_as_of": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"cached": {
"type": "boolean"
},
"stale": {
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"INVALID_INPUT",
"UNAUTHORIZED",
"FORBIDDEN",
"IDEMPOTENCY_CONFLICT",
"RATE_LIMITED",
"DAILY_LIMIT_EXCEEDED",
"CACHE_MISS",
"TARGET_REJECTED",
"TARGET_DNS_FAILED",
"PROVIDER_UNAVAILABLE",
"UPSTREAM_INVALID",
"REQUEST_EXPIRED",
"REQUEST_NOT_FOUND",
"INTERNAL_ERROR"
]
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"retry_after_seconds": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"code",
"message"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"enum": [
"no_data",
"unsupported",
"pending",
"unavailable",
"error"
]
},
"data": {
"type": "null"
}
},
"required": [
"source",
"queried_target",
"fetched_at",
"data_as_of",
"cached",
"stale",
"error",
"status",
"data"
],
"additionalProperties": false
}
]
},
"registration": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "rdap"
},
"queried_target": {
"type": "string",
"minLength": 1
},
"fetched_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"data_as_of": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"cached": {
"type": "boolean"
},
"stale": {
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"INVALID_INPUT",
"UNAUTHORIZED",
"FORBIDDEN",
"IDEMPOTENCY_CONFLICT",
"RATE_LIMITED",
"DAILY_LIMIT_EXCEEDED",
"CACHE_MISS",
"TARGET_REJECTED",
"TARGET_DNS_FAILED",
"PROVIDER_UNAVAILABLE",
"UPSTREAM_INVALID",
"REQUEST_EXPIRED",
"REQUEST_NOT_FOUND",
"INTERNAL_ERROR"
]
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"retry_after_seconds": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"code",
"message"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"const": "ok"
},
"data": {
"type": "object",
"properties": {
"registered_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"expires_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"updated_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"registrar_name": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"registrar_iana_id": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"type": "null"
}
]
},
"statuses": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"nameservers": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"dnssec": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
]
},
"source_url": {
"type": "string",
"format": "uri"
}
},
"required": [
"registered_at",
"expires_at",
"updated_at",
"registrar_name",
"registrar_iana_id",
"statuses",
"nameservers",
"dnssec",
"source_url"
],
"additionalProperties": false
}
},
"required": [
"source",
"queried_target",
"fetched_at",
"data_as_of",
"cached",
"stale",
"error",
"status",
"data"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "rdap"
},
"queried_target": {
"type": "string",
"minLength": 1
},
"fetched_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"data_as_of": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"cached": {
"type": "boolean"
},
"stale": {
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"INVALID_INPUT",
"UNAUTHORIZED",
"FORBIDDEN",
"IDEMPOTENCY_CONFLICT",
"RATE_LIMITED",
"DAILY_LIMIT_EXCEEDED",
"CACHE_MISS",
"TARGET_REJECTED",
"TARGET_DNS_FAILED",
"PROVIDER_UNAVAILABLE",
"UPSTREAM_INVALID",
"REQUEST_EXPIRED",
"REQUEST_NOT_FOUND",
"INTERNAL_ERROR"
]
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"retry_after_seconds": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"code",
"message"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"enum": [
"no_data",
"unsupported",
"pending",
"unavailable",
"error"
]
},
"data": {
"type": "null"
}
},
"required": [
"source",
"queried_target",
"fetched_at",
"data_as_of",
"cached",
"stale",
"error",
"status",
"data"
],
"additionalProperties": false
}
]
},
"traffic": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "scrappa_similarweb"
},
"queried_target": {
"type": "string",
"minLength": 1
},
"fetched_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"data_as_of": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"cached": {
"type": "boolean"
},
"stale": {
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"INVALID_INPUT",
"UNAUTHORIZED",
"FORBIDDEN",
"IDEMPOTENCY_CONFLICT",
"RATE_LIMITED",
"DAILY_LIMIT_EXCEEDED",
"CACHE_MISS",
"TARGET_REJECTED",
"TARGET_DNS_FAILED",
"PROVIDER_UNAVAILABLE",
"UPSTREAM_INVALID",
"REQUEST_EXPIRED",
"REQUEST_NOT_FOUND",
"INTERNAL_ERROR"
]
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"retry_after_seconds": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"code",
"message"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"refresh": {
"default": null,
"anyOf": [
{
"type": "object",
"properties": {
"expected_period": {
"type": "string",
"pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
},
"update_status": {
"type": "string",
"enum": [
"current",
"pending",
"cooldown",
"unavailable",
"period_unknown"
]
},
"next_check_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
}
},
"required": [
"expected_period",
"update_status",
"next_check_at"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"const": "ok"
},
"data": {
"type": "object",
"properties": {
"is_estimate": {
"type": "boolean",
"const": true
},
"period": {
"anyOf": [
{
"type": "string",
"pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
},
{
"type": "null"
}
]
},
"estimated_visits": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"average_visit_duration_seconds": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"pages_per_visit": {
"anyOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "null"
}
]
},
"bounce_rate": {
"anyOf": [
{
"type": "number",
"minimum": 0,
"maximum": 1
},
{
"type": "null"
}
]
},
"global_rank": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"country_rank": {
"anyOf": [
{
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"provider_data": {
"default": null,
"anyOf": [
{
"type": "object",
"properties": {
"domain": {
"type": "string"
},
"site_name": {
"default": null,
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"title": {
"default": null,
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"default": null,
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"category": {
"default": null,
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"global_rank": {
"default": null,
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
{
"type": "object",
"properties": {
"Rank": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"rank": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"value": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
]
},
{
"type": "null"
}
]
},
"country_rank": {
"default": null,
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
{
"type": "object",
"properties": {
"Rank": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"rank": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"value": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"Country": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"CountryCode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
]
},
{
"type": "null"
}
]
},
"country_code": {
"default": null,
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"category_rank": {
"default": null,
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
{
"type": "object",
"properties": {
"Rank": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"rank": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"value": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"Category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
]
},
{
"type": "null"
}
]
},
"engagement": {
"default": null,
"anyOf": [
{
"type": "object",
"properties": {
"visits": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"time_on_site": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"page_per_visit": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"bounce_rate": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"month": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"year": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"period": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"estimated_visits": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"average_visit_duration_seconds": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"pages_per_visit": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"traffic_sources": {
"default": null,
"anyOf": [
{
"type": "object",
"properties": {
"direct": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"search": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"social": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"referrals": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"mail": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"paid_referrals": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
{
"type": "null"
}
]
},
"top_countries": {
"default": null,
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"country_code": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"country_id": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"share": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"estimated_monthly_visits": {
"default": null,
"anyOf": [
{
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^\\d{4}-(0[1-9]|1[0-2])-01$"
},
"additionalProperties": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
}
},
{
"type": "null"
}
]
},
"top_keywords": {
"default": null,
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"keyword": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"share": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"volume": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
},
"cpc": {
"anyOf": [
{
"anyOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
{
"type": "null"
}
]
},
"screenshot": {
"default": null,
"anyOf": [
{
"type": "string",
"pattern": "^https?:\\/\\/"
},
{
"type": "null"
}
]
}
},
"required": [
"domain",
"site_name",
"title",
"description",
"category",
"global_rank",
"country_rank",
"country_code",
"category_rank",
"engagement",
"traffic_sources",
"top_countries",
"estimated_monthly_visits",
"top_keywords",
"screenshot"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"is_estimate",
"period",
"estimated_visits",
"average_visit_duration_seconds",
"pages_per_visit",
"bounce_rate",
"global_rank",
"country_rank",
"provider_data"
],
"additionalProperties": false
}
},
"required": [
"source",
"queried_target",
"fetched_at",
"data_as_of",
"cached",
"stale",
"error",
"refresh",
"status",
"data"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "scrappa_similarweb"
},
"queried_target": {
"type": "string",
"minLength": 1
},
"fetched_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"data_as_of": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"cached": {
"type": "boolean"
},
"stale": {
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"INVALID_INPUT",
"UNAUTHORIZED",
"FORBIDDEN",
"IDEMPOTENCY_CONFLICT",
"RATE_LIMITED",
"DAILY_LIMIT_EXCEEDED",
"CACHE_MISS",
"TARGET_REJECTED",
"TARGET_DNS_FAILED",
"PROVIDER_UNAVAILABLE",
"UPSTREAM_INVALID",
"REQUEST_EXPIRED",
"REQUEST_NOT_FOUND",
"INTERNAL_ERROR"
]
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"retry_after_seconds": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"code",
"message"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"refresh": {
"default": null,
"anyOf": [
{
"type": "object",
"properties": {
"expected_period": {
"type": "string",
"pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
},
"update_status": {
"type": "string",
"enum": [
"current",
"pending",
"cooldown",
"unavailable",
"period_unknown"
]
},
"next_check_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
}
},
"required": [
"expected_period",
"update_status",
"next_check_at"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"enum": [
"no_data",
"unsupported",
"pending",
"unavailable",
"error"
]
},
"data": {
"type": "null"
}
},
"required": [
"source",
"queried_target",
"fetched_at",
"data_as_of",
"cached",
"stale",
"error",
"refresh",
"status",
"data"
],
"additionalProperties": false
}
]
},
"onpage": {
"oneOf": [
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "dataforseo_onpage"
},
"queried_target": {
"type": "string",
"minLength": 1
},
"fetched_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"data_as_of": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"cached": {
"type": "boolean"
},
"stale": {
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"INVALID_INPUT",
"UNAUTHORIZED",
"FORBIDDEN",
"IDEMPOTENCY_CONFLICT",
"RATE_LIMITED",
"DAILY_LIMIT_EXCEEDED",
"CACHE_MISS",
"TARGET_REJECTED",
"TARGET_DNS_FAILED",
"PROVIDER_UNAVAILABLE",
"UPSTREAM_INVALID",
"REQUEST_EXPIRED",
"REQUEST_NOT_FOUND",
"INTERNAL_ERROR"
]
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"retry_after_seconds": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"code",
"message"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"const": "ok"
},
"data": {
"type": "object",
"properties": {
"final_url": {
"type": "string",
"format": "uri"
},
"http_status_code": {
"type": "integer",
"minimum": 100,
"maximum": 599
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"canonical": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"type": "null"
}
]
},
"h1": {
"type": "array",
"items": {
"type": "string"
}
},
"h2": {
"type": "array",
"items": {
"type": "string"
}
},
"internal_links": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"external_links": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"images": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"word_count": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"checks": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}
}
},
"required": [
"final_url",
"http_status_code",
"title",
"description",
"canonical",
"h1",
"h2",
"internal_links",
"external_links",
"images",
"word_count",
"checks"
],
"additionalProperties": false
}
},
"required": [
"source",
"queried_target",
"fetched_at",
"data_as_of",
"cached",
"stale",
"error",
"status",
"data"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"source": {
"type": "string",
"const": "dataforseo_onpage"
},
"queried_target": {
"type": "string",
"minLength": 1
},
"fetched_at": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"data_as_of": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
{
"type": "null"
}
]
},
"cached": {
"type": "boolean"
},
"stale": {
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"INVALID_INPUT",
"UNAUTHORIZED",
"FORBIDDEN",
"IDEMPOTENCY_CONFLICT",
"RATE_LIMITED",
"DAILY_LIMIT_EXCEEDED",
"CACHE_MISS",
"TARGET_REJECTED",
"TARGET_DNS_FAILED",
"PROVIDER_UNAVAILABLE",
"UPSTREAM_INVALID",
"REQUEST_EXPIRED",
"REQUEST_NOT_FOUND",
"INTERNAL_ERROR"
]
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"retry_after_seconds": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"code",
"message"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"status": {
"type": "string",
"enum": [
"no_data",
"unsupported",
"pending",
"unavailable",
"error"
]
},
"data": {
"type": "null"
}
},
"required": [
"source",
"queried_target",
"fetched_at",
"data_as_of",
"cached",
"stale",
"error",
"status",
"data"
],
"additionalProperties": false
}
]
}
},
"additionalProperties": false
},
"usage": {
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"used": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"remaining": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"reset_at": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
}
},
"required": [
"limit",
"used",
"remaining",
"reset_at"
],
"additionalProperties": false
},
"retry_after_seconds": {
"anyOf": [
{
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"schema_version",
"request_id",
"status",
"domain",
"registrable_domain",
"dimensions",
"usage",
"retry_after_seconds"
],
"additionalProperties": false
}{
"type": "object",
"properties": {
"schema_version": {
"type": "string",
"const": "site-data.v1"
},
"error": {
"type": "object",
"properties": {
"code": {
"type": "string",
"enum": [
"INVALID_INPUT",
"UNAUTHORIZED",
"FORBIDDEN",
"IDEMPOTENCY_CONFLICT",
"RATE_LIMITED",
"DAILY_LIMIT_EXCEEDED",
"CACHE_MISS",
"TARGET_REJECTED",
"TARGET_DNS_FAILED",
"PROVIDER_UNAVAILABLE",
"UPSTREAM_INVALID",
"REQUEST_EXPIRED",
"REQUEST_NOT_FOUND",
"INTERNAL_ERROR"
]
},
"message": {
"type": "string",
"minLength": 1,
"maxLength": 500
},
"retry_after_seconds": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"code",
"message"
],
"additionalProperties": false
},
"request_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
]
}
},
"required": [
"schema_version",
"error",
"request_id"
],
"additionalProperties": false
}Overall status is complete / partial / pending / failed; partial is not full success. Dimension states are ok / no_data / unsupported / pending / unavailable / error. null is not zero. traffic.provider_data contains the permitted business fields, not an unfiltered upstream response.
| HTTP | Response description |
|---|---|
| 200 | Terminal complete/partial result, including cache-only misses with failed status. No fabricated values. |
| 202 | At least one selected dimension remains pending; completed dimensions are preserved. |
| 400 | Invalid action, hostname, dimensions, profile or wait budget. |
| 401 | Missing, invalid, expired or revoked API Key. |
| 403 | Ineligible or suspended account, insufficient scopes or rejected public-target policy. |
| 404 | Unknown request or request owned by another account. |
| 409 | Idempotency key conflicts with the accepted query identity. |
| 410 | The owning caller's result retention period has expired. |
| 429 | The request cannot be accepted yet. Follow the retry guidance in the response. |
| 500 | Internal failure; no credentials or upstream raw body exposed. |
| 502 | Invalid upstream payload; never pass through raw provider responses. |
| 503 | Service unavailable or all selected providers failed. A dimension result envelope is retained when a query was accepted. |
Follow the retry guidance on 429. Check key and paid access on 401 / 403. Keep an accepted request_id on 503 and read it with result, never loop new queries. If a response is lost, retain the payload and Idempotency-Key for an explicit retry.
# Server-side shell. Requires curl and jq. Never ship YOUR_API_KEY to a browser.
API_KEY='YOUR_API_KEY'
IDEMPOTENCY_KEY="$(uuidgen)" # Keep this value for retries of this query.
headers_file=$(mktemp)
body_file=$(mktemp)
trap 'rm -f "$headers_file" "$body_file"' EXIT
payload='{"action":"query","domain":"example.com","dimensions":{"dr":true,"registration":false,"traffic":false,"onpage":false},"cache":"prefer","wait_ms":0}'
while true; do
status=$(curl --silent --show-error --output "$body_file" --dump-header "$headers_file" --write-out '%{http_code}' \
'https://buildorskip.dev/api/v1/site-data/' \
-H "Authorization: Bearer $API_KEY" -H 'Content-Type: application/json' \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" --data "$payload") || break
cat "$body_file"
wait_seconds=$(awk 'tolower($1)=="retry-after:" {gsub("\r", "", $2); print $2}' "$headers_file" | tail -1)
[ -n "$wait_seconds" ] || wait_seconds=0
wait_seconds=$(jq -n --arg header "$wait_seconds" --slurpfile body "$body_file" '[5, ($header|tonumber), ($body[0].retry_after_seconds // 0)] | max')
if [ "$status" = 429 ] && [ "$(jq -r '.error.code' "$body_file")" = RATE_LIMITED ]; then
sleep "$wait_seconds"; continue # Same query identity or same result ID.
fi
if [ "$(jq -r '.status' "$body_file")" != pending ]; then break; fi
payload=$(jq -c '{action:"result",request_id:.request_id}' "$body_file")
sleep "$wait_seconds"
done// Node.js 20+. Server-side only. Keep this idempotency key if a response is lost.
const apiKey = 'YOUR_API_KEY';
const idempotencyKey = crypto.randomUUID();
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
let payload = {
"action": "query",
"domain": "example.com",
"dimensions": {
"dr": true,
"registration": false,
"traffic": false,
"onpage": false
},
"cache": "prefer",
"wait_ms": 0
};
while (true) {
const response = await fetch('https://buildorskip.dev/api/v1/site-data/', {
method: 'POST', headers: { 'Authorization': 'Bearer ' + apiKey,
'Content-Type': 'application/json', 'Idempotency-Key': idempotencyKey },
body: JSON.stringify(payload),
});
const body = await response.json();
console.log(body);
const wait = Math.max(5, Number(response.headers.get('retry-after')) || 0,
body.retry_after_seconds || 0) * 1000;
if (response.status === 429 && body.error?.code === 'RATE_LIMITED') {
await sleep(wait); continue; // Retry the same payload, never a new query ID.
}
if (body.status !== 'pending') break; // Includes terminal and expired/error results.
payload = { action: 'result', request_id: body.request_id };
await sleep(wait);
}# Python 3 standard library. Server-side only.
import json, time, uuid, urllib.request, urllib.error
api_key = 'YOUR_API_KEY'
idempotency_key = str(uuid.uuid4()) # Retain for unknown-response retries.
payload = json.loads('{"action":"query","domain":"example.com","dimensions":{"dr":true,"registration":false,"traffic":false,"onpage":false},"cache":"prefer","wait_ms":0}')
while True:
request = urllib.request.Request('https://buildorskip.dev/api/v1/site-data/',
data=json.dumps(payload).encode(), method='POST', headers={
'Authorization': 'Bearer ' + api_key, 'Content-Type': 'application/json',
'Idempotency-Key': idempotency_key})
try:
response = urllib.request.urlopen(request, timeout=30)
except urllib.error.HTTPError as error:
response = error
with response:
status = response.status
body = json.load(response)
wait = max(5, int(response.headers.get('Retry-After', '0')),
body.get('retry_after_seconds') or 0)
print(json.dumps(body, ensure_ascii=False, indent=2))
if status == 429 and body.get('error', {}).get('code') == 'RATE_LIMITED':
time.sleep(wait)
continue
if body.get('status') != 'pending':
break
payload = {'action': 'result', 'request_id': body['request_id']}
time.sleep(wait)