Solution · Embeds
Embed your directory on any website
Every public directory on Directories.ai can be embedded on another website. Pick a script snippet, a <directories-ai-directory> web component, an iframe, a plain link button or a JSON feed; each shows your published listings with search, a category filter and your accent colour, and updates on its own as you edit listings. Get the code from Settings → Embed in the dashboard, or ask your AI assistant to call get_embed_code.
One directory, many places
Your directory has its own home, but your audience is spread out: your main website, a chamber or association page, partners’ resource pages, a blog post about the best businesses in town. An embed puts the live listings in each of those places without copying data around.
Five ways to embed
They all read the same published listings, so pick whichever the host site allows.
- Script snippet: a div and one script tag, for WordPress, Webflow, Wix, Shopify or plain HTML. It renders in a Shadow DOM, so the host site’s CSS can’t break it
- Web component: the same widget as a <directories-ai-directory> tag, for React, Next.js, Vue or Astro
- iframe: for Squarespace, Notion, Google Sites and other builders that only take an embed URL
- Link button: plain HTML with no script, for emails, newsletters and locked-down site builders
- JSON feed: published listings as JSON with open CORS, for developers who render it themselves
What it shows, and what it doesn’t
Embeds only show published listings of a public directory: name, short description, city, categories, logo and member badge, each linking to the listing’s page. Drafts, contact records and internal fields never leave Directories.ai. Embeds sit alongside your directory’s own site; for search rankings, your own pages on your own domain still matter most.
Add a directory to a page
- 1
Open Settings → Embed
Pick a layout (grid, list or compact), a theme, an accent colour, a category if you only want one, and how many listings to show. The preview is live.
- 2
Copy the code for your site
Choose the snippet that fits the host site and paste it where the directory should appear. Or ask your AI assistant for it.
get_embed_code - 3
Keep publishing
New and edited listings reach every embed within about five minutes. Nothing to re-paste.
Try asking your assistant
- “Give me embed code for my directory in a list layout with our brand colour, showing only the Restaurants category.”
- “Add the directory embed to the Resources page of my site as a pull request.”
- “Make a link button I can put in our newsletter that sends people to the directory.”
MCP tools involved
Each of these is a real tool on the Directories.ai MCP server. See the integration guide for the full list.
get_embed_codesuggest_repo_changeget_link_badge
Frequently asked questions
Do embeds need an API key?
No. Embeds read the public listings feed of a public directory, which only includes published listings. Private data stays behind the API and MCP server, which do need a key or sign-in.
Will the embed match my site?
You set the layout, light, dark or automatic theme, and accent colour. The script widget renders in a Shadow DOM, so your site’s styles don’t leak in and it doesn’t restyle your site.
Is embedding good for SEO?
Embeds are for reach, not rankings: content loaded by a script or iframe is usually credited to the directory, not the host page. Each listing links back to your directory. For rankings, publish the directory on your own domain.
Keep reading
Ready to run your directory with AI?
MCP access is included on the Growth plan. Pay per directory, cancel any time.