Preview Markdown-for-Agents conversion
Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.
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.
Query parameters
- domainstringrequiredquery
The domain name (for example
example.com). These endpoints take the domain as a query parameter rather than a path segment. - hostnamestringquery
Which hostname to fetch. Defaults to the domain apex.
- pathstringquery
Path to fetch.
Default:"/"
Responses
200Both fetches, side by side.
Content type: application/json
- urlstring
The URL that was fetched.
- feature_enabledboolean
The domain's
markdown_for_agentssetting at test time. - htmlMarkdownTesterFetch
Fields
- statusinteger
- content_typestring
- content_lengthinteger
Full body length observed, before truncation.
- bodystring
- truncatedboolean
- binaryboolean
The body was not valid UTF-8, so
bodyis omitted. - cache_statusstring
- markdown_tokensinteger
- original_tokensinteger
- convertedboolean
The response came back as
text/markdown. - errorstring
- markdownMarkdownTesterFetch
Fields
- statusinteger
- content_typestring
- content_lengthinteger
Full body length observed, before truncation.
- bodystring
- truncatedboolean
- binaryboolean
The body was not valid UTF-8, so
bodyis omitted. - cache_statusstring
- markdown_tokensinteger
- original_tokensinteger
- convertedboolean
The response came back as
text/markdown. - errorstring
{
"url": "string",
"feature_enabled": true,
"html": {
"status": 0,
"content_type": "string",
"content_length": 0,
"body": "string",
"truncated": true,
"binary": true,
"cache_status": "string",
"markdown_tokens": 0,
"original_tokens": 0,
"converted": true,
"error": "string"
},
"markdown": {
"status": 0,
"content_type": "string",
"content_length": 0,
"body": "string",
"truncated": true,
"binary": true,
"cache_status": "string",
"markdown_tokens": 0,
"original_tokens": 0,
"converted": true,
"error": "string"
}
}400Missing domain, or an invalid hostname or path.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}401Missing, malformed, revoked or expired API key. (A valid key whose
account has been deactivated gets 403 account is inactive instead.)
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "invalid API key"
}404No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}429The key exceeded its request budget (300 requests per minute by default).
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "rate limit exceeded"
}Example request
curl -X GET "https://api.nsin.ir/analytics/markdown-tester?domain=example.com" \
-H "Authorization: Bearer $NSIN_API_KEY"