Skip to content

Latest commit

 

History

History
58 lines (43 loc) · 3.15 KB

File metadata and controls

58 lines (43 loc) · 3.15 KB

AnyAPI docs (Mintlify)

This is the AnyAPI documentation site. AnyAPI is a unified marketplace for scraping/data APIs: any API, one wallet, USD, no subscriptions. Reach hundreds of third-party APIs through one interface and one key; pay per request in real dollars.

This repo is cloned into ./docs of the main app repo but is a separate git repo with its own history, deployed by Mintlify on push to main.

Mintlify conventions

See AGENTS.md in this directory for the canonical Mintlify rules (MDX + frontmatter, docs.json config, MCP servers, style preferences). Everything there applies. Highlights:

  • Pages are .mdx with YAML frontmatter. Add new pages to a navigation.pages group in docs.json.
  • Active voice, second person, sentence-case headings, one idea per sentence.

AnyAPI rules that override the starter defaults

  • Price in USD, never "credits." Credits are an internal accounting unit and must never appear in docs. Show prices as USD ($/1k requests, per-call cost in USD).
  • AnyAPI is the provider everywhere. Never name the upstream backend that actually serves a request — routing/secrets/billing stay internal. Docs describe "AnyAPI", one key, one wallet.
  • Keep docs.json name, colors, and logo aligned with the AnyAPI brand (replace the leftover "Mintlify Starter Kit" defaults as the site is built out).

API reference (OpenAPI)

The API Reference section is auto-generated by Mintlify from openapi.json (referenced by the "API Reference" group in docs.json). The gateway generates this spec live from its registry — one POST operation per SKU at /v1/run/{sku} — so the spec is never hand-written.

Keep a pages key on the openapi nav group; use "pages": [] to auto-generate every operation with nothing pinned (that is the current config). scripts/check-docs-nav.sh (the check workflow) enforces this convention, and the workflow also runs mint validate + mint broken-links on every PR so content errors are caught before they deploy. Endpoint page slugs derive from each operation's summary, not the SKU slug (e.g. rednote.search -> api-reference/rednote/rednote-xiaohongshu-search) - so guessing a URL from the SKU name gives false 404s. When checking the deployed origin directly, keep the /docs prefix (anyapi-948b1df7.mintlify.dev/docs/...); and remember getanyapi.com serves /docs* through a Cloudflare cache, so a change can look absent there for a while purely from cache lag.

To refresh the committed snapshot when the catalog changes, dump the gateway's live spec with the production server URL:

curl -s localhost:8080/openapi.json \
  -H 'Host: api.getanyapi.com' -H 'X-Forwarded-Proto: https' -H 'X-Forwarded-Host: api.getanyapi.com' \
  | python3 -m json.tool > openapi.json

Once https://api.getanyapi.com/openapi.json is deployed, you can instead point the group's openapi field straight at that URL so docs auto-refresh on every Mintlify build (no snapshot to maintain).

Workflow

  • npm i -g mint then mint dev to preview locally (http://localhost:3000).
  • Commit and push here; Mintlify auto-builds. This repo is independent of the app's Vite build.