Skip to content

Preview Markdown-for-Agents conversion

GET
/analytics/markdown-tester
curl --request GET \
--url 'https://api.nsin.ir/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 single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

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

Missing, malformed, revoked or expired API key — or the owning account is inactive.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

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 single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

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

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

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

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