GET /v1/codeThe website to code API: point it at a section of any website and get back clean HTML with its own stylesheet, breakpoints and hover states included. Tailwind, React or Vue are one parameter away.
10 credits per call · 300 free credits a month · no credit card
pricing.html + pricing.css
Use it in any stack
Plain HTML and CSS work in a static site, a CMS theme, an embed block, or a stack that has no format of its own here.
See how a section is built
Read the real sizes, spacing and breakpoints of a section you like as a stylesheet, not as a wall of utility classes.
Rebuild a whole page
On a paid plan, /v1/site/page returns every section of a page in the same format, from header to footer.
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&framework=html',3 { headers: { Authorization: `Bearer ${process.env.MIROMIRO_API_KEY}` } }4)5const data = await res.json()678910
Connect once over MCP, then ask in plain words. No code.
Get the pricing section of stripe.com as plain HTML and CSS.
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
Page downloaders save markup tied to a stylesheet you do not have, and screenshot tools invent the values. This returns the section with the CSS that really styles it.
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.
Two fields. code is the section’s markup, with short class names such as mm-h2-2 on the elements that carry styling. css is the stylesheet for those classes. Save them as two files, or put the CSS in a style tag next to the markup.
Yes. The section’s breakpoints come back as real @media rules and its hover and focus states as :hover and :focus rules, so it behaves on a phone the way the source did. Pass theme=dark for the dark version, where the site has one.
The class names all start with mm-, so they do not collide with yours. Rules your site sets on bare tags, such as h2 or a, can still reach the section, as with any HTML you paste in.
Yes, the same call with framework=tailwind, jsx or vue, at the same price. framework=elementor and framework=shopify return a file you import into WordPress or a Shopify theme.
Each /v1/code call returns one section, on every plan. On a paid plan, /v1/site/pages lists the pages of a site and /v1/site/page returns a whole page, every section, in the format you pick.
10 credits per section, the same as every other code format. Failed and blocked requests are never billed, a repeat call within 24 hours is free, and every key includes 300 free credits a month.
Yes. The page’s HTML and CSS are read first, which is enough for most sites. When a page only builds itself with JavaScript, or refuses a plain request, it is re-read in a real browser automatically at no extra cost. Add render=true to force the browser, for example for images that load on scroll: that costs 5 extra credits, on every plan including the free key.
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 website to code API takes a URL and returns a section of that page as plain HTML with its own stylesheet. It loads the page in a real browser, works out which CSS rule wins for each property on each element, and writes those values into a new stylesheet. You send a URL and, if you want, a section name such as pricing or footer.
Elements that carry styling get a short class such as mm-h2-2, and elements with identical styles share one class, so six feature cards use one rule instead of six copies. Wrappers with no styling get no class at all. Breakpoints come back as @media rules and hover states as :hover rules.
Each call returns one section. On a paid plan, /v1/site/pages lists every page of a site and /v1/site/page returns a whole page, section by section, in the same format. The source site’s JavaScript does not come along, so menus and sliders arrive as static markup and you add the behavior.
300 free credits a month, no credit card. One key works for every endpoint, over REST or MCP.
Get a free API key