Docs
Putting a feed on your site
A feed lives on one of your sites and has an address, site/feed, shown in the dashboard. Its look is designed there and saved with the feed, so the tag only has to say which feed.
The tag
Paste these two lines wherever the feed should appear. The script can go once per page, anywhere.
<!-- wherever the feed should appear -->
<div data-downlink-feed="your-site/home"></div>
<script src="https://downlink.social/embed.js" async></script>That’s the whole integration: no build step, framework or plugin. The feed draws inside its own Shadow DOM, so your page’s CSS can’t break it and its CSS can’t leak out. Images load as visitors scroll to them, and tags added to the page later (by a framework, say) are picked up on their own; window.Downlink.scan() looks again on demand.
Attributes
Attributes on the tag override the saved look for that one placement. The feed designer’s Settings in the tag snippet writes them for you. Invalid values are ignored, so a typo never breaks the saved look, and motion (zoom, play on hover) is off for visitors who prefer reduced motion.
| Attribute | Values | Default |
|---|---|---|
data-layout | grid · strip (one scrolling row) · masonry · single (newest post) | grid |
data-columns | 1–12 (grid, masonry); omit for responsive. Containers under 480px drop to 2 | responsive |
data-count | posts shown, up to the feed’s own maximum | the feed’s |
data-gap | pixels between tiles | 8 |
data-shape | square · portrait (4:5) · original (masonry is always original) | square |
data-radius | tile corner radius in pixels | 4 |
data-captions | true shows the caption’s first line under each post | false |
data-hover | zoom · dim · caption (caption overlay) · none | zoom |
data-background | hex colour or transparent | transparent |
data-caption-color | hex colour | host page’s |
data-accent | hex colour for hover and play glyphs | — |
data-platform-icon | hide · corner | hide |
data-play-on-hover | true plays videos muted on hover | false |
data-links | false stops tiles linking to the original post | true |
data-credit | true shows a small “via Downlink” line | false |
<div data-downlink-feed="your-site/home"
data-layout="strip" data-count="8" data-radius="12"></div>The JSON
Every feed is also plain JSON, open to any origin, for sites that want to render the posts themselves:
GET https://api.downlink.social/api/feeds/<site>/<feed>{
"slug": "your-site/home",
"name": "Homepage",
"platform": "instagram", // or "mixed" when the feed combines platforms
"options": { "layout": "grid", "maxItems": 12 }, // the saved look
"items": [
{
"id": "…",
"platform": "instagram",
"mediaType": "image", // image · video · carousel
"caption": "New charms are in.",
"mediaUrl": "https://…/posts/….jpg",
"thumbnailUrl": null, // the cover, for video and carousels
"permalink": "https://www.instagram.com/p/…",
"postedAt": "2026-12-01T17:04:00.000Z"
}
]
}Items are newest first. Responses are cached for a minute (Cache-Control: public, s-maxage=60), so a change you publish in the dashboard shows within a minute, and a new post within a minute of the next refresh. An unknown address answers 404.
Next.js and server-side
Fetch the JSON on the server and render the posts with your own components. In TypeScript the PublicFeed type describes the response.
// app/page.tsx
export default async function Page() {
const feed = await fetch('https://api.downlink.social/api/feeds/your-site/home', {
next: { revalidate: 300 }, // refetch at most every five minutes
}).then((r) => r.json());
return (
<ul>
{feed.items.map((post) => (
<li key={post.id}>
<a href={post.permalink}>
<img src={post.thumbnailUrl ?? post.mediaUrl} alt={post.caption ?? ''} />
</a>
</li>
))}
</ul>
);
}