Docs / Network and contact checks

Web pages API

Link previews, a page as Markdown for agents, and HTML and Markdown to each other.

Pages are fetched from India through the same guard as the probe: public addresses and the usual ports only, at most 10 fetches of one site a minute from every caller together. The reader respects robots.txt. Addresses are never logged.

Base URL https://api.dharun.devNo key needed for most600 units a minute, 3000 with a free keyThis page as Markdown

A web page as Markdown

GET/v1/read

One page fetched and turned into clean Markdown, its main content only, for agents and retrieval. One page per call; robots.txt is respected (agent IndiaAPI-Reader). Needs a free API key once keys are required (see /keys).

Model endpoint: it will need a free API key, sent as Authorization: Bearer <key> or X-API-Key. Until the date on API keys it answers without one and says so in the X-Key-Notice header. With a key: 500 model requests a day.

What you send here is never written to the log, and the answer is not cached.

ParameterDescription
urlquery, requiredThe page.
fullquerytrue keeps navigation, headers and footers.
formatquerymarkdown answers with the Markdown itself. One of: json, markdown.

curl

curl "https://api.dharun.dev/v1/read?url=https://dharun.dev&utm_medium=docs"

JavaScript

const response = await fetch("https://api.dharun.dev/v1/read?url=https://dharun.dev&utm_medium=docs");
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);

Python

import requests

response = requests.get("https://api.dharun.dev/v1/read?url=https://dharun.dev&utm_medium=docs", timeout=10)
body = response.json()
if not response.ok:
    raise RuntimeError(body["error"]["message"])
print(body["data"])
Try it here

Change the values and send the request from your browser. Needs JavaScript.

HTML and Markdown to each other

GET/v1/markdownPOST

Markdown to safe HTML (GitHub-flavoured, raw HTML left out), or HTML to Markdown.

Also takes POST: The text, as text/plain or JSON {"text": "...", "to": "html"}. Send it as text/plain, or as JSON {"text": "..."} with the other options beside it, up to 256 KB.

What you send here is never written to the log, and the answer is not cached.

ParameterDescription
textqueryThe text.
toqueryDefault: markdown when the text has tags, else html. One of: html, markdown.
mainqueryHTML to Markdown: keep only the main content.

curl

curl "https://api.dharun.dev/v1/markdown?to=html&text=%23%20Hello%0A%0A*India*%20API&utm_medium=docs"

JavaScript

const response = await fetch("https://api.dharun.dev/v1/markdown?to=html&text=%23%20Hello%0A%0A*India*%20API&utm_medium=docs");
const body = await response.json();
if (!response.ok) throw new Error(body.error.message);
console.log(body.data);

Python

import requests

response = requests.get("https://api.dharun.dev/v1/markdown?to=html&text=%23%20Hello%0A%0A*India*%20API&utm_medium=docs", timeout=10)
body = response.json()
if not response.ok:
    raise RuntimeError(body["error"]["message"])
print(body["data"])
Try it here

Change the values and send the request from your browser. Needs JavaScript.

Response

{
  "data": {
    "html": "<h1>Hello</h1>\n<p><em>India</em> API</p>\n"
  },
  "meta": {
    "note": "GitHub-flavoured Markdown. Raw HTML in the input is left out, so the output is safe to show."
  }
}

Using an AI assistant? Connect the MCP server and it can call this API by itself. Want every endpoint on one bench? Open the playground.