nectr
API

API Documentation

Scan, Integrate, Publish and Monitor are open.

Scan a page

One public page per request, on any site, with or without a key. The page's markdown is for its site's owner: send an API key as a Bearer token, and a page on a site you've verified (the domain or a subdomain, wherever its redirects lead) comes back as markdown too. nectr reads the site's robots.txt, then fetches the page twice: as plain HTML, and in a headless browser that runs its JavaScript. It also checks up to 3 PDFs the page links to on the same site. nectr keeps neither the page nor the result: it goes back to you only.

curl -X POST https://nectr.ch/api/v1/scans \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer nct_…" \
  -d '{"url": "https://yoursite.ch/pricing"}'

The body has one field, url: any public http(s) page, up to 2048 characters. A scan takes a few seconds.

Response

FieldTypeMeaning
urlstringThe page that was scanned.
titlestring | nullThe page's title.
rendered_wordsintegerWords in the page as markdown, with JavaScript.
plain_wordsintegerWords in the page as markdown, without JavaScript.
rendered_markdownstring | nullThe page with JavaScript, as markdown. Null unless the page is on a site you've verified.
plain_markdownstring | nullThe page without JavaScript (its HTML), as markdown. Null unless the page is on a site you've verified.
markdown_tokensintegerEstimated tokens in rendered_markdown, at about 4 characters per token.
html_tokensintegerEstimated tokens in the page's plain HTML, what an agent fetching the URL receives.
only_with_javascriptstring[]Blocks of the rendered page whose words are nowhere in the plain HTML. At most 50, each cut at 300 characters.
missing_word_sharenumberWords in those blocks over words in the rendered page, from 0 to 1.
robots_foundbooleanfalse when the site has no robots.txt. Every crawler is then allowed.
robotsobject[]{agent, allowed} for GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot, PerplexityBot, Google-Extended and CCBot: whether the site's robots.txt lets each one fetch this page.
pdfsobject[]Up to 3 PDFs the page links to on its own site, in page order. Each one is described in the next table.
pdfs_not_checkedintegerLinked PDFs left out: past the first 3, or on another site.
scanned_atstringWhen the scan ran, in ISO 8601.
tablesobject[] | nullThe page's data tables, with JavaScript, in page order, at most 50. Each one is described in the table below. Null without an API key; each table's rows are null unless the page is on a site you've verified.
structured_dataobject | nullExperimental: what the page declares about itself as data (JSON-LD, microdata, schema.org RDFa) and its definition lists, with JavaScript. Described below. Null without an API key; the data itself is null unless the page is on a site you've verified.
markdown_includedbooleanWhether the markdown is in the response: only when the page is on a site you've verified. When it isn't, only_with_javascript holds the first 5 blocks, each cut at 200 characters.

Each entry in pdfs:

FieldTypeMeaning
urlstringThe PDF's address.
pagesinteger | nullIts page count.
wordsinteger | nullWords in its first 5 pages at most.
has_textboolean | nullfalse when it has no text layer (fewer than 5 words a page): probably a scanned image. null when it wasn't checked.
notestring | nullWhy it wasn't checked, when it wasn't.

Each entry in tables, a real <table> of at least two columns and one row (layout tables and tables built from other elements are left out):

FieldTypeMeaning
titlestring | nullThe table's caption, else its label, else the nearest heading before it.
columnsstring[]Column names from its header row (several header rows are joined), else Column 1, Column 2… Merged cells are expanded.
row_countintegerRows of data, at most 5,000.
rowsobject[] | nullEach row as an object keyed by column. Null unless the page is on a site you've verified.

structured_data, experimental (its shape may still change). Site-wide items, such as the site's Organization on every page, are kept as the page declares them; other RDFa vocabularies and Open Graph tags are left out:

FieldTypeMeaning
itemsobject[]What the page declares, in page order, at most 100. Each one is described in the next table.
definition_listsobject[]The page's definition lists (<dl>), in page order, at most 50.
skipped_json_ldintegerJSON-LD blocks left out: not valid JSON, or past a limit (500,000 characters a block, 1,000,000 a page, 32 levels deep).

Each entry in items:

FieldTypeMeaning
sourcestringWhere it was declared: json-ld, microdata or rdfa (schema.org only).
typesstring[]Its schema.org types by short name (Product, Event…); for a JSON-LD @graph, each node's.
dataobject | array | nullA JSON-LD block as the page has it. Microdata and RDFa in JSON-LD's shape: @type, @id, one key per property, a list when it repeats, links made absolute. Null unless the page is on a site you've verified.

Each entry in definition_lists:

FieldTypeMeaning
titlestring | nullThe list's label, else the nearest heading before it.
term_countintegerTerms in the list, at most 500.
termsobject[] | nullEach term as {term, details}, details being its descriptions. Null unless the page is on a site you've verified.

Example

example.com, shortened. Its HTML holds one English paragraph, and a script adds five translations, so 85% of the text only appears with JavaScript.

{
  "url": "https://example.com/",
  "title": "Example Domain",
  "rendered_words": 133,
  "plain_words": 25,
  "rendered_markdown": "This domain is for use in documentation examples …",
  "plain_markdown": "This domain is for use in documentation examples …",
  "markdown_tokens": 240,
  "html_tokens": 145,
  "only_with_javascript": [
    "L’usage de ce domaine est réservé à des exemples de documentation …",
    "…"
  ],
  "missing_word_share": 0.85,
  "robots_found": false,
  "robots": [
    { "agent": "GPTBot", "allowed": true },
    { "agent": "ClaudeBot", "allowed": true },
    "…"
  ],
  "pdfs": [],
  "pdfs_not_checked": 0,
  "scanned_at": "2026-10-09T20:31:12Z",
  "tables": [],
  "structured_data": { "items": [], "definition_lists": [], "skipped_json_ld": 0 },
  "markdown_included": true
}

Errors

Errors are JSON with a detail message you can show as it is. Two exceptions: a malformed body gets a 422 whose detail is a list of problems, and a 429 has an error message instead.

StatusWhen
403The site's robots.txt asks Nectrbot not to fetch this page.
422The URL isn't a public http(s) address, it's a document such as a PDF, the page answered with an HTTP error or couldn't be loaded, or the site's robots.txt couldn't be read.
429More than 10 scans in a minute from one address.
503nectr is busy. When every slot is taken a scan waits its turn, up to a minute, behind at most 10 others; it answers 503 only past that. Try again in a minute.

robots.txt

  • nectr's crawler is Nectrbot. A page your robots.txt disallows for it isn't fetched, and neither are PDFs it disallows.
  • A missing robots.txt (a 4xx answer) allows everything.
  • A robots.txt that can't be read (a 5xx answer, or none) stops the scan, as RFC 9309 asks.

Integrate a site

Integrate keeps a markdown version of every page of a site you own, fetched again every night, and serves them from nectr.ch for AI agents to read. It needs an account: Free covers one site of up to 50 pages, and Builder is $5 per site a month, up to 1,000 pages a site (Pricing).

Add and verify a site

On your dashboard, add the domain. nectr shows a DNS TXT record to publish: the name _nectr.yoursite.ch and the value nectr-verify=…. Add it at your DNS provider, then click Confirm DNS record. A new record can take a few minutes to show. The record covers the domain and its subdomains, www included.

nectr checks the record again every day. If it disappears, the site stays verified for 7 days; after that its markdown versions stop being served, and are deleted 30 days later unless the record comes back.

What each fetch takes

  • Every night, and on Fetch now (at most once an hour), nectr lists the site's pages: the sitemaps your robots.txt names, else /sitemap.xml, else the homepage, plus the links on every page it fetches. Each page is fetched in a browser, so text that scripts add is included.
  • It takes up to your plan's number of pages, nearest the homepage first. Under What to fetch you can name pages to always fetch or never fetch, and paths to fetch first or skip. The Pages view lists what the last fetch left out, and why.
  • Every hour, nectr also reads the sitemaps and fetches the pages that are new in them, or whose <lastmod> changed, up to 20 a site, so a new or edited page is usually served within the hour. A site without a sitemap, or without dates in it, gets its edits at night or on Fetch now.
  • A page nectr hasn't fetched yet is fetched the first time its markdown address is asked for, by an agent following your link tag or by the visitors' widget. An agent gets the markdown when it's ready within about 15 seconds, otherwise a 503 with Retry-After. Your rules, robots.txt and your plan's number of pages apply, at most 10 such fetches a site an hour, and an address that isn't a page is remembered for a day.
  • PDFs and Word documents count as pages, and are served as markdown like the rest.
  • robots.txt applies: a page it disallows for Nectrbot isn't fetched. A page behind a sign-in, or that only shows a placeholder, is marked unreadable.
  • If bot protection (a firewall or a service like Cloudflare) answers nectr with a block or a challenge, those pages can't be fetched. Allow nectr's user agent there: Mozilla/5.0 (compatible; Nectrbot/1.0; +https://nectr.ch).

The markdown addresses

  • Each page at https://nectr.ch/s/<host>/<path>.md: the homepage at https://nectr.ch/s/yoursite.ch/index.md, a folder /docs/ at /docs/index.md, a PDF /menu.pdf at /menu.pdf.md. A page with a query string has none.
  • A page's data tables, when it has any, next to its markdown: all of them as JSON at <path>.tables.json, and each as CSV at <path>.table-1.csv, .table-2.csv… A table is a real <table> of at least two columns and one row; layout tables and tables built from other elements are left out.
  • Experimental: what a page declares about itself as data, when it declares anything, at <path>.data.json: its JSON-LD, microdata and schema.org RDFa items and its definition lists, in the shape a scan's structured_data has, with the page's address as page.
  • https://nectr.ch/s/yoursite.ch/llms.txt lists them all, pages with tables in a Tables section and pages with structured data in a Structured data section.
  • The markdown is served as text/markdown, tables and data as JSON or CSV, each with a Link: <your page>; rel="canonical" header, so search engines credit your page.

Point AI agents at them

Your dashboard gives the snippets for your setup. Any of these works:

  • A <link rel="alternate" type="text/markdown" href="…"> in each page's head, from one line in your layout.
  • An HTTP Link header with the same relation, set by your server (Nginx, Apache or Caddy).
  • /llms.txt on your site redirecting (302) to nectr's.

Check my site shows which pages link to their markdown version, and what your /llms.txt does.

nectr.ch does this itself, with the header and the redirect, on its own subdomain: curl -I https://nectr.ch/docs shows the Link to this page's markdown version, and /llms.txt leads to its llms.txt.

For visitors, your dashboard also gives a short widget to paste where a “Markdown version” link should appear, such as your footer. The link shows only on pages nectr serves a markdown version of. Its check, <path>.md?check, answers 204 or 404 to any site and isn't counted as a read.

Your own subdomain

On Builder, a site's markdown versions, llms.txt and datasets can be served from a subdomain of its domain, such as ai.yoursite.ch, instead of https://nectr.ch/s/yoursite.ch/. On your dashboard, open the site's Your own domain, choose the name, and add the DNS record it shows: a CNAME from that name to nectr.ch. Once nectr sees the record (when you check it, and every day), it gets the HTTPS certificate and serves the same paths there: https://ai.yoursite.ch/pricing.md, /llms.txt, /datasets.json. Your dashboard's snippets, the llms.txt and the datasets' addresses then use the subdomain.

The addresses at nectr.ch keep working, so links you've already given still do. Pages on other subdomains of your site keep their nectr.ch address. If the record goes, or your plan stops including it, nectr's addresses are used again.

Read your sites

With an API key, two read-only requests list what you've added. A scan returns its markdown only for pages on these sites while they're verified and not paused.

curl https://nectr.ch/api/v1/sites -H "Authorization: Bearer nct_…"
curl https://nectr.ch/api/v1/sites/<id>/pages -H "Authorization: Bearer nct_…"
  • /sites: a list of your sites, each with its id, domain, verified, paused_at, pages_copied and llms_txt_url.
  • /sites/<id>/pages: a list of the site's pages, each with its url, title, status (copied when it has a markdown version, with a reason when it hasn't), words and copy_url, the markdown version's address.

Reads, changes and alerts

  • nectr counts the requests for each markdown version, by day and by agent: ClaudeBot, GPTBot and the rest. It keeps no IP address and no user agent with them. Free shows the last 30 days, Builder all of it.
  • Each page keeps its last 10 changes. Builder adds a sentence saying what changed.
  • Builder emails you when a page loses more than half its text, or can't be fetched two nights in a row. Every plan gets a weekly email about its sites.

Publish datasets

Publish shares data from a site you've verified in Integrate as datasets, each at an address you name. It is part of Builder (Pricing). Nothing is published until you choose it.

Choose what to publish

On your dashboard, open the site and its Publish tab. Pick a page to see what its latest markdown version holds: its tables, its lists, what it declares as data (JSON-LD, microdata or RDFa), and the page itself. Publish one under a name of lower-case letters, digits and hyphens, such as opening-hours. The name is part of the address, so renaming a dataset changes it.

The addresses

  • Each dataset as JSON at https://nectr.ch/s/yoursite.ch/datasets/<name>.json, and tables and lists also as CSV at https://nectr.ch/s/yoursite.ch/datasets/<name>.csv. Both name the source page in a canonical Link header and say when it was fetched in Last-Modified.
  • The site's catalogue at https://nectr.ch/s/yoursite.ch/datasets.json: every dataset that is on its page now, with its addresses but not its data. The site's llms.txt links to it.
  • Reads of a dataset count as reads of the page it comes from, in the site's Reads.
  • A dataset is under the terms and licence of the page it comes from; nectr grants no licence of its own. Its source names that page.

The JSON

FieldWhat it holds
datasetIts name, as in its address.
kindtable, list, structured (what the page declares as data) or content (the whole page).
titleThe table's or list's title, else the page's.
sourceThe page it comes from.
fetched_atWhen that page was last fetched, ISO 8601.
changed_atWhen the page's markdown version last changed.
json, csvIts two addresses; csv is null for structured data and content.
dataThe data: columns and rows for a table; ordered and items (each with text, url and any children) for a list; items and definition_lists for structured data; title, words and markdown for a page.

A table's CSV has its columns as the header line; a list's has Item,Link, and a Level column first when the list is nested. In every CSV, a cell a spreadsheet would run as a formula (one starting with = or @, or with + or - and more than a number) starts with '; numbers such as -5 are as on the page.

When the page changes

A dataset is refreshed with every fetch of its page. nectr finds a table again by its title or its columns, and a list by its title or most of its items, so a page that is reordered keeps its datasets pointing at the same data. A dataset that is no longer on its page answers not found, and it's deleted if it's still missing at a fetch a day later. Every dataset of a site that isn't served, or of an account whose plan no longer includes Publish, answers not found too, without being deleted.

Accounts and API keys

  • Scans need no account or key. With an API key, a scan of a page on one of your verified sites also returns it as markdown.
  • Create keys under Settings → API keys, and send one as a Bearer token.
  • Integrate is managed from your dashboard. An API key can read your sites and their pages: see Read your sites.

The MCP server

nectr-mcp gives an MCP client, such as Claude Desktop or an editor, two tools. scan_page(url) calls the scan endpoint above with your API key and returns the result as text a model can read: size in words and tokens, robots.txt for the AI crawlers, linked PDFs, its data tables and the structured data it declares, the text that only appears with JavaScript, and, for a page on one of your verified sites, the page as markdown last, with the tables' rows and the structured data itself as JSON. list_sites() lists your sites and their pages' addresses, so a model can see which pages it gets markdown for, and the datasets you've published from each site, with their JSON and CSV addresses.

{
  "mcpServers": {
    "nectr": {
      "command": "npx",
      "args": ["-y", "nectr-mcp"],
      "env": { "NECTR_API_KEY": "nct_your_key_here" }
    }
  }
}

Create the key under Settings → API keys. markdown picks "full" (the default), "without_javascript" or "none", and max_chars raises the 40,000-character cut. The limits and errors are the scan endpoint's. list_sites needs version 0.4.0 or later, and the tables, structured data and datasets 0.5.0; npx -y nectr-mcp always runs the latest. The README on GitHub has the details.

Questions? Get in touch.