Free image size API

Every spec on PixelSpec is available as static JSON. No key, no rate limit, and it is CORS-friendly, so you can build the current sizes straight into your own tools, bots or dashboards. 51 specs across 18 platforms.

All specs

GET https://pixelspec.net/api/specs.json

Returns an object with a specs array containing every platform and asset.

A single spec

GET https://pixelspec.net/api/spec/{platform}/{asset}.json

For example https://pixelspec.net/api/spec/youtube/thumbnail.json. Slugs match the page URLs, so /instagram/story maps to /api/spec/instagram/story.json.

All assets for one platform

GET https://pixelspec.net/api/spec/{platform}.json

For example https://pixelspec.net/api/spec/instagram.json.

Response shape

{ "platform": "youtube", "asset": "thumbnail", "platformName": "YouTube", "assetName": "Thumbnail", "width": 1280, "height": 720, "ratio": "16:9", "formats": ["JPG", "PNG", "WebP"], "minWidth": 640, "maxKB": 2048, "page": "https://pixelspec.net/youtube/thumbnail" }

Example: fetch in JavaScript

fetch("https://pixelspec.net/api/specs.json") .then((r) => r.json()) .then((data) => { // data.specs is an array of every platform x asset spec const yt = data.specs.find( (s) => s.platform === "youtube" && s.asset === "thumbnail" ); console.log(yt.width, yt.height, yt.ratio); // 1280 720 16:9 });

Terms

The data is free to use. A link back to PixelSpec is appreciated and helps keep the reference maintained. The API is static and versionless; when a platform changes a size we update the JSON and bump the verified field.

Prefer a visual reference? See the cheat sheet or embed the live resizer widget.