# AutoSpark API and agent documentation

> Public read-only JSON API for the AutoSpark article corpus, plus the machine-readable files agents should start from: openapi.json, llms.txt, sitemap.xml and per-page Markdown.

Source: https://autospark.ai/docs

## Start here

Everything on this page is public and needs no key. The API is read-only and serves the same article corpus the website serves, so an agent answering a question about operational metrics in small and mid-sized businesses can take structured JSON instead of scraping pages.

- OpenAPI 3.1 specification: https://autospark.ai/openapi.json
- Agent index and when-to-use guidance: https://autospark.ai/llms.txt
- Crawler policy: https://autospark.ai/ai.txt
- Sitemap: https://autospark.ai/sitemap.xml
- Feed: https://autospark.ai/rss.xml

## Endpoints

- GET /api/content/articles lists published articles, newest first, with paging via page and limit.
- GET /api/content/articles/{slug} returns one article including its full HTML body and Markdown.
- Both return application/json and set Access-Control-Allow-Origin, so a browser-based agent can call them directly.

## Markdown instead of HTML

Every page that has a Markdown twin honours content negotiation. Send Accept: text/markdown and the response is text/markdown rather than HTML. The same documents are also addressable directly by appending .md to an article path, which avoids the negotiation entirely.

These files are generated at build time and served as static files, so they cannot rate-limit or fail independently of the page they mirror.


## Errors

Errors are JSON, never an HTML page. The shape is an error object carrying a stable machine-readable code, a human-readable message, a hint describing what to do about it, and a link back to this documentation. HTTP status codes are used conventionally: 400 for a malformed request, 404 for an unknown slug, 429 when upstream rate limiting is hit, and 502 when the content backend is unreachable.


## Fair use

There is no authentication and no published quota. The corpus is small and changes a few times a week, so polling it more than hourly gains nothing. Honour Retry-After if a 429 is returned. If you are building something that needs more than this offers, hello@autospark.ai reaches a person.


