Developers

API

Every file has a stable URL, and the whole catalog is available as JSON, so you can use SampleFiles.com from test suites and CI.

Catalog

GET https://samplefiles.com/api/catalog.json returns all 1379 files with their URL, size in bytes, MIME type, SHA-256 and MD5 checksums, and metadata such as dimensions, duration and codecs.

List every 1080p MP4Shell
curl -s https://samplefiles.com/api/catalog.json \
  | jq '.files[] | select(.format == "mp4" and .meta.height == 1080) | .url'

Each entry looks like this:

catalog.json (one entry, abridged — see the live file for every field)JSON
{
  "slug": "sample-1080p-10s",
  "category": "video",
  "format": "mp4",
  "filename": "sample-1080p-10s.mp4",
  "bytes": 8149790,
  "mime": "video/mp4",
  "sha256": "6ebf755e10c52d9e5d5e616acdaab28e3c3ce8e83591885b9288f9bddf219eff",
  "meta": {
    "width": 1920,
    "height": 1080,
    "videoCodec": "H.264",
    "fps": 30,
    "audioCodec": "AAC",
    "channels": 2,
    "sampleRate": 48000,
    "duration": 10,
    "bitrate": 6519832
  },
  "url": "https://files.samplefiles.com/video/mp4/sample-1080p-10s.mp4"
}

File URLs

Files are served from https://files.samplefiles.com/{category}/{format}/{filename} with permissive CORS headers and long cache lifetimes. For example:

Example file URL
https://files.samplefiles.com/video/mp4/sample-1080p-10s.mp4

Verify downloads

Each catalog entry includes checksums, so tests can confirm a download arrived intact:

Download and verifyShell
curl -sLO https://files.samplefiles.com/video/mp4/sample-1080p-10s.mp4
echo "6ebf755e10c52d9e5d5e616acdaab28e3c3ce8e83591885b9288f9bddf219eff  sample-1080p-10s.mp4" | shasum -a 256 -c

Fair use

Please cache files in CI instead of downloading them on every run, especially the large ones.