BaconMockup API

Beginner's Pick Food & Drink / No Auth Required Beginner HTTPS CORS
Free to Use Varies (check documentation)

Overview

BaconMockup is a fun, free API that serves placeholder images featuring bacon — great for filling in image slots during web or app development when you just need something visual. You simply specify a width and height in the URL and get back a JPEG image instantly, with no sign-up or API key needed. It is the quickest way to add food-themed placeholder images to a mockup or prototype.

Beginner Tip

Just embed the URL directly in an img tag with src="https://baconmockup.com/300/200" — no JavaScript or API key needed.

Available Data

randomly generated data
customizable output format
BaconMockup data via REST API

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from BaconMockup",
    "description": "Resizable bacon placeholder images",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

(binary image) The response body is a JPEG image of bacon at the requested dimensions — there is no JSON payload.

Implementation Example

Request
const url = "https://baconmockup.com/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

Image returns an error page instead of a JPEG Width or height value is too large or is not a valid integer.
Keep dimensions between 1 and 2000 pixels and make sure both values are whole numbers (e.g., /300/200 not /300.5/200).
Broken image in browser Accessing the bare domain without dimensions returns no image.
Always include width and height in the path: https://baconmockup.com/{width}/{height}.
Slow response in production BaconMockup is a free service with no SLA, so it can be slow under load.
Download the images once and serve them from your own storage in production.

Metadata Score Breakdown

Estimated from metadata — endpoint not independently tested

This score is estimated from observable metadata — HTTPS support, authentication model, declared CORS, and documentation reachability — because the API requires authentication or exposes no publicly testable endpoint. The five-signal breakdown is only shown for live-tested APIs.

Metadata estimate · endpoint not independently tested

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS YES
Category Food & Drink
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →