GET /v1/codeThe design to code API for live websites: send a URL, get back a component you can paste - Tailwind, React, Vue or HTML, with the exact tokens it uses.
10 credits per call · 300 free credits a month · no credit card
GET /v1/code$
⠿ fetching stripe.com…
{
"selector": "section.hero",
"framework": "jsx",
"code": "export function Hero() {…}",
"tokens": {
"colors":"font":"Sohne"
} }
200 OK · 2.1s · 10 credits
Tokens it uses
#0a2540#635bffAaSohneexport function Hero() {
return (
<section className="relative w-full bg-white">
<h1 className="text-[#0a2540] text-5xl font-semibold">
Financial infrastructure
</h1>
<button className="bg-[#635bff] text-white rounded-full px-5 py-2.5">
Start now
</button>
</section>
)
}Rebuild a section, fast
Port a hero, pricing table, or feature grid you like into your own stack without opening devtools.
Ground truth for AI agents
Give Cursor or Claude Code the real component instead of a screenshot to guess at - no hallucinated spacing or colors.
Competitive teardowns
Pull a competitor’s pricing section as Tailwind, then restyle it to your brand in minutes.
One GET request to /v1/code with the page’s address and, if you want, the section by name.
It loads the page in a real browser and works out which CSS rule wins for each element.
Typed JSON, for 10 credits. A repeat call within 24 hours is free.
The same extraction, three doors: a REST endpoint for your app, an MCP tool for ChatGPT, Claude, Cursor or Codex, and a verified n8n node for automations. One account, one credit balance.
One REST call from any language, with your API key. Typed JSON back.
1const res = await fetch(2 'https://miromiro.app/api/v1/code?url=stripe.com',3 { headers: { Authorization: `Bearer ${process.env.MIROMIRO_API_KEY}` } }4)5const data = await res.json()6789
Connect once over MCP, then ask in plain words. No code.
Rebuild the hero section of stripe.com as a React component in my project.
Called MiroMiro · extract_code · stripe.com
Done. The component uses the section's real colors, fonts and spacing. Here is a preview link to compare it with the original.
A verified n8n node with free, ready-made templates. Make, Zapier and any tool that sends an HTTP request can call the API too.
The template for this job: Rebuild a whole page as code
Run
Click Execute
Settings
Your website
MiroMiro
Hero + find sections
Split
One per section
MiroMiro
Each section as code
Zip
One file per section
Why this one
Figma’s MCP can only read a Figma file, and scrapers return markup tied to a stylesheet you don’t have. This is the only API that reads a live URL and returns code that stands on its own.
Only url is required. Everything else narrows or reshapes the result.
urlrequired
any public URL
The page to extract from. With or without protocol (https:// is assumed).
framework
tailwind (default) · html · jsx · vue · elementor · shopify
The code you get back. tailwind returns markup with utility classes; html returns markup plus a companion stylesheet; jsx returns a React component; vue returns a single-file component.
section
hero · header · footer · pricing · features · testimonials · faq · cta
A part of the page by name, for callers that cannot see its markup (AI agents, mostly).
selector
any CSS selector
The section to extract, e.g. selector=%23hero or selector=.pricing-card - best taken from a previous response's sections list.
name
a component name
Component name for the jsx target - the identifier in "export default function ...".
theme
light (default) · dark
Which colour scheme to extract.
inline_svg
true · false (default)
Keep large inline SVGs inside code.
fields
field names
Comma-separated list of fields to return (e.g. fields=code,tokens).
render
true · false (default)
Load the page in a real browser and run its JavaScript before extracting.
fresh
true · false (default)
Skip the 24-hour cache and re-extract from the live page.
screenshot
true · full · false (default)
Requires render=true. The same real browser that renders the page also captures a screenshot - true for the 1440x900 viewport, full for the entire page height.
Every parameter, the response fields and the error codes are in the reference.
A scraper hands you the page’s raw HTML, still wired to a stylesheet you don’t have - the class names are meaningless outside the original site. This API resolves the page’s real CSS cascade (every stylesheet, specificity, media queries and var() references), then rewrites the section as a self-contained component with real Tailwind utilities. It is code you can paste, not markup you have to reverse-engineer.
Tailwind (default), plain HTML + a companion CSS file, React (JSX), and Vue, plus an importable Elementor template and a Shopify theme section. Pass &framework=tailwind|html|jsx|vue|elementor|shopify. For JSX and Vue you can also pass &name= to set the component name.
Omit it. The API scores the page’s sections and auto-detects the hero - the one with a headline, real copy, and a call to action - then tells you which selector it used, so you can reuse or adjust it.
By default it reads the static HTML and CSS a page serves, which covers most marketing and landing pages. For a client-rendered app, where the HTML ships empty and the DOM is built at runtime, add render=true: the page loads in a real browser with its scripts run first (+5 credits). When a static result looks thin, the response carries a hint saying so.
Deliberately not. It returns a clean, section-level component - the structure, the real classes, and the tokens - as a starting point you own and can restyle. Full-page pixel cloning produces code nobody can maintain; this produces code you would have written.
A code extraction is 10 credits, the same as a brand lookup, even though it loads the page in a real browser and resolves its entire cascade before generating the component. Failed and blocked requests are never billed, a repeat call within 24 hours is served from cache for free, and every key includes 300 free credits a month - no card.
No. It reads public pages the way a visitor without an account would see them. Pages that need a sign-in, and addresses on your own machine such as localhost, are out of reach.
Yes. The same call is the extract_code tool on the MiroMiro MCP server. Connect ChatGPT, Claude, Cursor, Codex or another agent once, with a sign-in and no API key, and ask in plain language.
The MiroMiro Design to Code API takes a URL and a CSS selector and returns a clean, self-contained component. It fetches the page, resolves every stylesheet it loads, and runs a real CSS cascade - matching each rule against each element, ordering by specificity and media query, and resolving var() references - so the code it emits reflects what the section actually looks like, not what its class names hint at. Omit the selector and it finds the page’s hero for you.
Figma’s design-to-code tools can only read a Figma file. Web scrapers return HTML soup that is useless without the original stylesheet. Neither can answer “this section exists on a live site - give me its code.” That is the gap this API fills, and it is why it is built for AI coding agents: point Cursor, Claude Code, or Windsurf at a URL through the MCP server, and they build from ground truth instead of guessing at colors, spacing, and structure.
This returns a component, not a page clone. That is a deliberate constraint: pixel-perfect full-site conversion reliably produces code nobody can maintain, while a clean, section-level scaffold - the structure, the real utilities, and the tokens it uses - is what developers and agents actually ask for. You get a starting point you own, in your stack, that you can restyle immediately.
300 free credits a month, no credit card. One key works for every endpoint, over REST or MCP.
Get a free API key