ogmake
Menu

URL templates

A store with a thousand product pages cannot design a thousand share cards by hand, and a single site-wide image makes every shared link look the same. URL templates fix that. You map the parts of one page, such as its title, price and main image, to the fields of a card template once, and ogmake then renders a card for every page that matches, straight from the page's own address. Nothing runs in your app and nothing is rebuilt when you add a page: the card is made the first time a platform asks for it. It suits product pages, articles, recipes, events and listings, and it works with a plain HTML head, Next.js, WordPress or Shopify, because the whole integration is one og:image tag. Once it is live, confirm a page with the OG image checker.

Paste a link, we understand the page, and you get one line for your whole site: one og:image tag that gives every store page, listing or article its own card.

<meta property="og:image" content="https://ogmake.com/p/{public-key}/auto?url={{page_url}}">

/p/<key>/auto?url= picks your saved template for the page's host and path on its own. One line per site, and every page gets a card built from its own details. Pages outside the saved path use the page's own metadata. The x-ogmake-recipe response header shows which saved template was used, or none.

Sign in to paste a link

The one-line flow

  1. In your dashboard choose Paste a link and paste any page of your site.
  2. ogmake reads it, picks the template that fits (product, article, recipe, event or listing) and maps its fields for you.
  3. Click Save for your site. By default the recipe covers pages on that host under the same first path segment: a product at /products/mug covers /products/*, while a page with a single segment covers the whole host. To widen or narrow it, edit Page path under Fill from a page in the editor.
  4. Copy the line for plain HTML, Next.js, WordPress or Shopify into your page layout, and add your site under Allowed sites with one click.

Fine-tune it

  1. Open the editor and choose Fill from a page.
  2. Paste a page address. ogmake reads it and lists what it found: text, prices, images and links, each with where it came from and how sure we are.
  3. For each template field choose Static value or From page. Image fields take image candidates; each mapped field can fall back to its static value or stay empty.
  4. Set the sites it applies to (up to 5, *.example.com works), an optional page path such as /products/*, and how often to check the page again: 15 min, 1 h or 24 h.
  5. Save it. Saving is free. Use Test with another URL on the saved card to see the extracted fields for a second page.

Use it

Add saved (the saved template) and url (the page) to any render.

Signed URL

https://ogmake.com/i/{keyId}/{signature}?saved=tpl_123&url=https%3A%2F%2Fshop.example.com%2Fproducts%2Fmug

Public URL

https://ogmake.com/p/{public-key}/product?saved=tpl_123&url=https%3A%2F%2Fshop.example.com%2Fproducts%2Fmug

API

curl https://ogmake.com/v1/images \
  -H "Authorization: Bearer $OGMAKE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"template":"product","saved":"tpl_123","url":"https://shop.example.com/products/mug"}'

Batch CSV

template,saved,url
product,tpl_123,https://shop.example.com/products/mug
product,tpl_123,https://shop.example.com/products/lamp

MCP

analyze_url reads a page for free; render_from_url renders a saved template for a URL. See MCP.

Credits

Reading a page to build a template is free, up to a daily limit per account (20 on the free plan, 100 on Starter, 300 on Scale and above). A signed-URL, API or batch render from a page costs its usual render credit plus 1 credit when the page has to be fetched, so 2 credits, or 1 when the page is cached; if the page cannot be read, the extra credit is returned. A public /p render costs its usual render credit, and fetching the page counts against the public render budget instead of adding a credit. The free plan includes one page-powered template; paid plans include more. See pricing.

Errors

source_host_not_allowed (403)
The page is outside the hosts (or path) the template was saved for.
allowed_sites_required (200 (image))
Public /p URLs only: the page's site is not on the key's Allowed sites, or the key has none. Public URLs answer with a fallback image and name the reason in the x-ogmake-error response header. Add the site under Settings > Allowed sites on the key.
source_unavailable (422)
The page could not be read: unreachable, blocked for automated readers, or built entirely in the browser. Pass the fields as parameters or upload the image instead.
source_field_missing (422)
A required field was not found on the page. The response names the field.
rate_limited (429)
Too many page reads in a short time. Retry after the Retry-After seconds.
analyze_daily_limit (429)
The account's daily limit for reading pages is used up (20 free, 100 Starter, 300 Scale and above). Retry-After is the seconds until midnight UTC.
quota_exceeded (429)
A render from a page needs a credit for fetching the page and the account has none left (signed, API and batch renders).

Questions

What is a URL template?

A saved mapping from a page's details (title, price, image and so on) to the fields of a card template. You build it once from one page, then every similar page on your site renders its own card from its URL.

How many tags do I add to my site?

One. A single og:image line using /p/<key>/auto?url= picks the saved template for each page's host and path.

Does reading a page cost credits?

Reading a page to build a template is free, up to a daily limit per account (20 on the free plan, 100 on Starter, 300 on Scale and above). Saving a template is free.

What happens if a page cannot be read?

The response carries an error code that names the cause, such as source_unavailable or source_field_missing. For a signed, API or batch render the extra page-fetch credit is returned.