Skip to content

Preview Markdown-for-Agents conversion

GET
/analytics/markdown-tester
curl --request GET \
--url 'https://api.nsin.cloud/analytics/markdown-tester?domain=example.com&path=%2F' \
--header 'Authorization: Bearer <token>'

Fetches one page twice — once normally and once with Accept: text/markdown — and returns both responses so you can compare them. Ownership is checked but there is no plan gate: you may preview the conversion before enabling markdown_for_agents on the domain.

domain
required
string

The domain name (for example example.com). These endpoints take the domain as a query parameter rather than a path segment.

Example
example.com
hostname
string

Which hostname to fetch. Defaults to the domain apex.

path
string
default: /

Path to fetch.

Both fetches, side by side.

Media type application/json
object
url

The URL that was fetched.

string
feature_enabled

The domain’s markdown_for_agents setting at test time.

boolean
html
object
status
integer
content_type
string
content_length

Full body length observed, before truncation.

integer
body
string
truncated
boolean
binary

The body was not valid UTF-8, so body is omitted.

boolean
cache_status
string
markdown_tokens
integer
original_tokens
integer
converted

The response came back as text/markdown.

boolean
error
string
markdown
object
status
integer
content_type
string
content_length

Full body length observed, before truncation.

integer
body
string
truncated
boolean
binary

The body was not valid UTF-8, so body is omitted.

boolean
cache_status
string
markdown_tokens
integer
original_tokens
integer
converted

The response came back as text/markdown.

boolean
error
string
Example generated
{
"url": "example",
"feature_enabled": true,
"html": {
"status": 1,
"content_type": "example",
"content_length": 1,
"body": "example",
"truncated": true,
"binary": true,
"cache_status": "example",
"markdown_tokens": 1,
"original_tokens": 1,
"converted": true,
"error": "example"
},
"markdown": {
"status": 1,
"content_type": "example",
"content_length": 1,
"body": "example",
"truncated": true,
"binary": true,
"cache_status": "example",
"markdown_tokens": 1,
"original_tokens": 1,
"converted": true,
"error": "example"
}
}

Missing domain, or an invalid hostname or path.

Media type application/json

The error shape used by every endpoint. error is always present. code is present only on the failures that have one — do not require it, and do not parse error to recover it.

object
error
required

Human-readable description of what went wrong.

string
code

Stable machine-readable reason. Present on some failures only; the wording of error may change, this will not.

  • account_suspended403. The account behind the credential has been switched off, by an admin or by its provider. Every authenticated route answers this, so treat it as terminal rather than retrying.
  • domain_disabled409, not 403. You have every right to the operation; the domain is simply switched off and is not being served, so its configuration cannot change. It stays readable, and writes work again once it is enabled.
  • managed_by_reseller403. The account is a reseller’s client and this surface belongs to its provider. See If your account is managed by a reseller.
  • invite_email_mismatch403 from POST /invites/{token}/accept. The invitation was addressed to a different email; the body also carries invited_email, masked.

A panel session — not an API key — can additionally see session_check_failed on a 503, which means the session could not be verified, not that it is invalid. Retry it; do not discard the token.

string
Example
{
"error": "read-only API key"
}

Missing, malformed, revoked or expired API key, or a key whose owning user row is gone. A key whose owning account has merely been deactivated is not this: that is 403 with code: account_suspended, because the credential itself is intact and re-issuing it changes nothing.

Media type application/json

The error shape used by every endpoint. error is always present. code is present only on the failures that have one — do not require it, and do not parse error to recover it.

object
error
required

Human-readable description of what went wrong.

string
code

Stable machine-readable reason. Present on some failures only; the wording of error may change, this will not.

  • account_suspended403. The account behind the credential has been switched off, by an admin or by its provider. Every authenticated route answers this, so treat it as terminal rather than retrying.
  • domain_disabled409, not 403. You have every right to the operation; the domain is simply switched off and is not being served, so its configuration cannot change. It stays readable, and writes work again once it is enabled.
  • managed_by_reseller403. The account is a reseller’s client and this surface belongs to its provider. See If your account is managed by a reseller.
  • invite_email_mismatch403 from POST /invites/{token}/accept. The invitation was addressed to a different email; the body also carries invited_email, masked.

A panel session — not an API key — can additionally see session_check_failed on a 503, which means the session could not be verified, not that it is invalid. Retry it; do not discard the token.

string
Examples
Example invalidKey
{
"error": "invalid API key"
}

No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.

Media type application/json

The error shape used by every endpoint. error is always present. code is present only on the failures that have one — do not require it, and do not parse error to recover it.

object
error
required

Human-readable description of what went wrong.

string
code

Stable machine-readable reason. Present on some failures only; the wording of error may change, this will not.

  • account_suspended403. The account behind the credential has been switched off, by an admin or by its provider. Every authenticated route answers this, so treat it as terminal rather than retrying.
  • domain_disabled409, not 403. You have every right to the operation; the domain is simply switched off and is not being served, so its configuration cannot change. It stays readable, and writes work again once it is enabled.
  • managed_by_reseller403. The account is a reseller’s client and this surface belongs to its provider. See If your account is managed by a reseller.
  • invite_email_mismatch403 from POST /invites/{token}/accept. The invitation was addressed to a different email; the body also carries invited_email, masked.

A panel session — not an API key — can additionally see session_check_failed on a 503, which means the session could not be verified, not that it is invalid. Retry it; do not discard the token.

string
Example
{
"error": "read-only API key"
}

The key exceeded its request budget (300 requests per minute by default).

Media type application/json

The error shape used by every endpoint. error is always present. code is present only on the failures that have one — do not require it, and do not parse error to recover it.

object
error
required

Human-readable description of what went wrong.

string
code

Stable machine-readable reason. Present on some failures only; the wording of error may change, this will not.

  • account_suspended403. The account behind the credential has been switched off, by an admin or by its provider. Every authenticated route answers this, so treat it as terminal rather than retrying.
  • domain_disabled409, not 403. You have every right to the operation; the domain is simply switched off and is not being served, so its configuration cannot change. It stays readable, and writes work again once it is enabled.
  • managed_by_reseller403. The account is a reseller’s client and this surface belongs to its provider. See If your account is managed by a reseller.
  • invite_email_mismatch403 from POST /invites/{token}/accept. The invitation was addressed to a different email; the body also carries invited_email, masked.

A panel session — not an API key — can additionally see session_check_failed on a 503, which means the session could not be verified, not that it is invalid. Retry it; do not discard the token.

string
Examples
Example limited
{
"error": "rate limit exceeded"
}