Rifframe
SectionsFor AI agentsPricing

API Reference

Sections API & MCP

Browse and fetch 270+ production-ready website sections over REST or MCP. Free during the beta, no API key required.

Base URL: https://rifframe.app | Rate limit: 300 req/min | OpenAPI spec


Contents

  1. REST API
  2. List sections
  3. Get section
  4. Get tokens
  5. MCP Server
  6. search_sections
  7. get_section
  8. compare_sections
  9. get_tokens
  10. Connect

REST API

Three public endpoints. All return JSON by default, support CORS (any origin), and share the same rate limit.

GET

/api/v1/sections

List or search the section catalog

Search by free-text query (English) and/or type filter. Without query or type, returns a curated featured set (one section per type). Use ?all=1 for a complete dump of all 270+ sections.

Parameters

NameInDescription
qqueryFree-text search in English (matches id, title, tags, description)
typequeryFilter by section type (hero, pricing, faq, testimonials, ...)
allquerySet to 1 for a complete catalog dump
limitqueryMaximum results to return (1-250)

Responses

200Section list with count and summaries
429Rate limit exceeded

Example

curl "https://rifframe.app/api/v1/sections?q=pricing+toggle&limit=3"
{
  "count": 3,
  "sections": [
    {
      "id": "pricing/cards/with-toggle",
      "type": "pricing",
      "title": "Pricing with billing toggle",
      "description": "Three pricing cards with monthly/yearly toggle...",
      "tags": ["pricing", "toggle", "billing", "plans"],
      "elements": ["heading", "subhead", "toggle", "cards", "buttons"],
      "density": "default",
      "preview": "https://rifframe.app/preview/pricing/cards/with-toggle",
      "thumbnail": "https://rifframe.app/thumbs/pricing--cards--with-toggle.jpg",
      "scalable": true
    }
  ]
}
GET

/api/v1/sections/{type}/{style}/{name}

Get a section as HTML

Fetch one section by its three-part id. Returns Tailwind v4 HTML markup with typed slot specs (sample text + writing hints) and group specs (repeatable units). Colors come from the token contract.

Parameters

NameInDescription
typerequiredpathSection type (e.g. hero)
stylerequiredpathStyle variant (e.g. split)
namerequiredpathVariant name (e.g. with-stats)
surfacequeryBackground role for page rhythm(default: light)
formatqueryjson = metadata + HTML; document = standalone HTML page(default: json)
anchorsqueryKeep data-slot attributes for deterministic filling(default: false)
itemsqueryRender with N items in the main repeatable group (1-12)

Responses

200Section detail with HTML, slots, groups, and usage instructions
400Invalid items value or section does not support scaling
404Unknown section id
429Rate limit exceeded

Example

curl "https://rifframe.app/api/v1/sections/hero/split/with-stats?anchors=true"
{
  "id": "hero/split/with-stats",
  "type": "hero",
  "title": "Split hero with stats",
  "slots": [
    { "name": "heading", "kind": "text", "sample": "Ship faster...", "hint": "5-8 words, action-oriented" },
    { "name": "hero-image", "kind": "image", "aspect": "4/3" }
  ],
  "groups": [
    { "name": "stats", "unit": "container", "repeatable": true, "count": 3,
      "items": [["stat-1-value", "stat-1-label"], ["stat-2-value", "stat-2-label"], ...],
      "scalable": true, "min": 1, "max": 12 }
  ],
  "preview": "https://rifframe.app/preview/hero/split/with-stats",
  "surface": "light",
  "anchors": true,
  "html": "<section class=\"border-b border-border bg-background\">...",
  "usage": "Tailwind v4 utility markup using Rifframe semantic tokens..."
}
GET

/api/v1/tokens

Get the CSS token contract

Returns the CSS variable block consumed by every section. Paste it into your Tailwind v4 CSS entry file and override values with your brand colors. All sections stay on-brand automatically.

Parameters

NameInDescription
formatqueryjson = object with css and usage; css = raw CSS text(default: json)

Responses

200Token contract (JSON or raw CSS)
429Rate limit exceeded

Example

curl "https://rifframe.app/api/v1/tokens?format=css"
@theme {
  --color-background: #ffffff;
  --color-foreground: #171717;
  --color-muted: #fafafa;
  --color-muted-foreground: #525252;
  --color-subtle: #a3a3a3;
  --color-border: #e5e5e5;
  --color-primary: #171717;
  --color-primary-foreground: #ffffff;
  --color-primary-hover: #262626;
}

MCP Server

Streamable HTTP transport at POST /api/mcp. Stateless (no SSE sessions). Four tools:

tool

search_sections

Search the catalog by intent. Always use English queries (the index is English-only). Empty query returns a curated featured set.

ParamTypeDescription
querystringFree-text intent in English
typestringFilter by section type
tool

get_section

Fetch one section as Tailwind HTML with typed slot specs (sample text + writing hints) and repeatable group specs. Pass anchors=true for data-slot attributes, items=N for parametric rendering.

ParamTypeDescription
idrequiredstringSection id from search_sections
surfacelight | muted | darkBackground role
anchorsbooleanKeep data-slot attributes
itemsinteger (1-12)Render with N items in the main group (when scalable)
tool

compare_sections

Get rendered screenshots of up to 4 sections for visual comparison. Use after search_sections when several candidates look plausible.

ParamTypeDescription
idsrequiredstring[]Section ids to compare (1-4)
tool

get_tokens

Get the CSS variable block every section consumes. Install once, override with your brand colors, all sections stay consistent.


Connect your agent

Claude Code

claude mcp add --transport http rifframe https://rifframe.app/api/mcp

Cursor

// .cursor/mcp.json
{
  "mcpServers": {
    "rifframe": {
      "url": "https://rifframe.app/api/mcp"
    }
  }
}

Windsurf

// .windsurf/mcp.json
{
  "mcpServers": {
    "rifframe": {
      "url": "https://rifframe.app/api/mcp"
    }
  }
}

VS Code

// .vscode/mcp.json
{
  "servers": {
    "rifframe": {
      "type": "http",
      "url": "https://rifframe.app/api/mcp"
    }
  }
}

Any MCP-compatible client works. Point it at https://rifframe.app/api/mcp with HTTP transport. More details on the agents page.


Back to docs
RifframeBuilt by afedb ⚡
Privacy·Terms·Contact·© 2026