HTML to Elementor API ·GET /v1/code

Turn any website section into an Elementor template

The HTML to Elementor converter, as an API: point it at a section of any website and get back an Elementor JSON template you import into WordPress. One call, no plugin to install.

10 credits per call · 300 free credits a month · no credit card

What you get

What the HTML to Elementor API returns

stripe.com · pricing section Download

pricing.elementor.json

{
"title": "MiroMiro - stripe.com section",
"type": "section",
"version": "0.4",
"content": [{
"elType": "container",
"settings": { "content_width": "full" },
"elements": [{ "widgetType": "html" }]
}]
Elementor file ready to import
  • template .json
  • HTML widget
  • scoped CSS
  • responsive rules
  • hover states
  • web fonts
  • section tokens
Perfect for

Who uses it

  • Rebuild a client site in WordPress

    Pull the hero, pricing and footer of the old site as templates and assemble the new page from them.

  • Start from a reference

    Import a section you like, then change the copy and colors in the HTML widget instead of building from a blank container.

  • Let an agent do the import prep

    Ask ChatGPT or Claude for a section as an Elementor file through the MCP server and get the .json back in the chat.

How it works

From a URL to a file you can import

  1. 1

    Send one URL

    One GET request to /v1/code with the page’s address and, if you want, the section by name.

  2. 2

    MiroMiro reads the live page

    It loads the page in a real browser and works out which CSS rule wins for each element.

  3. 3

    Get it back, ready to use

    One file to import, for 10 credits. A repeat call within 24 hours is free.

Three ways to use it

From your code, your agent, or n8n

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.

For developers

With one API call

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=elementor',3  { headers: { Authorization: `Bearer ${process.env.MIROMIRO_API_KEY}` } }4)5const data = await res.json()678910
API reference
For AI agents

Or just ask your agent

Connect once over MCP, then ask in plain words. No code.

ChatGPTClaudeClaude CodeCursorCodexand any MCP client
Setup for every agent

Get the pricing section of stripe.com as an Elementor template I can import into WordPress.

Called MiroMiro · extract_code · stripe.com

Saved pricing.elementor.json. Import it in WordPress under Templates, then edit it in Elementor.

For automations

Or run it in n8n

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: Turn website sections into Elementor templates

  1. Run

    Click Execute

  2. Settings

    Your website

  3. MiroMiro

    Section as Elementor

  4. Convert to File

    template.json

Why this one

HTML to Elementor converters ask you to paste markup you first have to copy out of devtools, along with a stylesheet you do not have. This starts from the URL and resolves the styles for you.

Compare with other APIs
Parameters

What you can pass

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.

FAQ

Frequently asked questions

How do I import the result into Elementor?

Save the code field of the response as a .json file. In WordPress open Templates, then Saved Templates, and choose Import. The section appears in your template library and you can insert it into any page.

Do I get native Elementor widgets?

No. The section arrives as one full-width container holding one HTML widget, with the markup and its CSS inside. You edit it as code. Mapping an arbitrary page onto native widgets breaks the layout, so the file keeps the original structure instead.

Will my theme change how it looks?

The CSS in the file is scoped to the imported block, and the block resets the theme styles that usually leak in: heading margins, link colors, list bullets and button borders. Two imported sections on one page do not restyle each other.

Is it responsive?

Yes. The breakpoint and hover rules of the original section are written into the file as real CSS. Elements the source site fades in on scroll are emitted already visible, because its JavaScript does not come along.

Does it need Elementor Pro?

No. The file uses a container and the HTML widget, and it is imported through the template library.

What does it cost?

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.

Does it work on sites built with JavaScript?

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.

Can it read pages behind a login?

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.

Can my AI agent call it without code?

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.

More about the HTML to Elementor API

From a live URL to an Elementor template

The MiroMiro HTML to Elementor API reads a section of any public web page and returns it as an Elementor template. It fetches the page, resolves every stylesheet it loads, works out which CSS rules actually apply to each element, and writes the result into the JSON format Elementor imports. You send a URL and a section name such as pricing or footer. You get back a file.

What is inside the file

One full-width container with one HTML widget. The widget holds clean markup, a stylesheet scoped to that block, the @font-face rules for the fonts the section uses, and the responsive and hover rules of the original. Image and link URLs are absolute, so nothing depends on the site you took it from being on the same domain.

Honest limits

It is a styled block you edit as code, not a set of native widgets. You can convert one section, or on a paid plan a whole page or a whole site: /v1/site/pages lists every page, and /v1/site/page returns each page as one template per section. Sections that depend on JavaScript for layout, such as sliders and tabs, import with every panel visible. Add render=true when the page builds its content in the browser.

Related endpoints

Try it on your own URL

300 free credits a month, no credit card. One key works for every endpoint, over REST or MCP.

Get a free API key