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.

On this page
  1. Response shape
  2. The provenance field
  3. Example: fetch in JavaScript
  4. Example: curl
  5. Example: Python
  6. License
  7. Versioning and stable fields
  8. CSV
  9. Terms

51 specsJSON and CSVNo key

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": 3840, "height": 2160, "ratio": "16:9", "formats": ["JPG", "GIF", "PNG"], "minWidth": 640, "maxKB": 51200, "maxKBNote": "50 MB on desktop, 2 MB on mobile", "provenance": "documented", "provenanceNote": "YouTube's own Help article states ...", "sources": ["https://support.google.com/youtube/answer/72431"], "verified": "2026-07-27", "page": "https://pixelspec.net/youtube/thumbnail" }

The provenance field

Every spec carries a provenance value of either documented or convention. It is the field to check before you present one of these numbers as a rule.

  • documented means the platform publishes that number in its own help centre or developer docs. The sources array holds the URLs it was read from, and provenanceNote says exactly which parts are quoted.
  • convention means the platform publishes nothing for that surface, and the number is the one the industry has standardised on. Still the best available answer, but it is not a platform requirement and should not be described as one.

verifiedis per spec, so a single entry re-checked today carries today's date even when the rest of the set has not moved. The collection and platform endpoints report the newest date they contain. Where one file-size number would be misleading, maxKBNote carries the real answer in words (YouTube allows 50 MB from desktop but only 2 MB from the mobile app).

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); // 3840 2160 16:9 // Only trust a size as a platform requirement when it says so. const requirements = data.specs.filter( (s) => s.provenance === "documented" ); });

Example: curl

# One spec, straight to the numbers curl -s https://pixelspec.net/api/spec/youtube/thumbnail.json \ | jq '{width, height, ratio, provenance, verified}' # The whole collection as a spreadsheet curl -sO https://pixelspec.net/api/specs.csv

Example: Python

import urllib.request, json with urllib.request.urlopen("https://pixelspec.net/api/specs.json") as r: data = json.load(r) print(data["version"], data["generatedAt"], data["count"]) # Only the sizes the platform itself publishes. documented = [s for s in data["specs"] if s["provenance"] == "documented"] for s in documented: print(s["platform"], s["asset"], s["width"], s["height"], s["verified"])

License

The data is published under Creative Commons Attribution 4.0 International (CC BY 4.0). "Free to use, a link is appreciated" is a wish, not a licence, and a wish is not something a legal review can sign off on. CC BY 4.0 is: you may use, adapt and redistribute this data, including commercially, provided you credit the source. Paste this line wherever the numbers appear:

Image size data from PixelSpec (https://pixelspec.net), CC BY 4.0

Versioning and stable fields

specs.json carries a top-level version and generatedAt. The version is semver over the data, not the site: patch when a value is corrected, minor when a spec or platform is added, major only when the response shape changes. These fields are guaranteed stable and safe to depend on: platform, asset, platformName, assetName, width, height, ratio, formats, minWidth, maxKB, maxKBNote, alt, provenance, verified and page. Anything not on that list may move without a major bump.

CSV

Most people who need these numbers work in a spreadsheet, not a terminal. https://pixelspec.net/api/specs.csv serves the same collection as CSV with a header row using exactly the field names above.

Terms

The API is static: no key, no rate limit, no account, and CORS is open. When a platform changes a size we update the JSON, bump that spec's verified field and record the correction in the changelog.

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