Swagger Petstore or a practice API with real behaviour?
The Swagger Petstore is the sample server behind countless OpenAPI tutorials. The hosted OpenAPI 3 version exposes pet, store and user resources, declares an api_key header and an OAuth 2.0 implicit flow, and ships with Swagger UI. Its source is public and it runs locally from a Docker image.
At a glance
Swagger Petstore compared with this playground, checked 2026-10-30.
Swagger Petstore
Fun API Playground
Main purpose
Reference sample for OpenAPI and Swagger UI
Practising API testing against defined behaviour
Spec
The OpenAPI 3 document is the product
OpenAPI 3.1 per API and merged, generated from the catalog
Hosted data
One public instance shared by all users
Isolated sandbox per X-Sandbox-ID
Auth in practice
api_key header and OAuth 2.0 implicit flow declared in the spec
Bearer roles with 401/403, signed JWTs, OAuth 2.0 flows
Self-hosting
Official Docker image
Not packaged for self-hosting
Guided exercises
Not offered
Challenges checked against your responses
Where it stops
It exists to demonstrate a specification, so its value is the document and the UI around it. The hosted instance is one public server shared by everyone, which makes repeatable assertions on its data unreliable, and scenario behaviour such as conflicts, version checks or rate limits is not its purpose.
What is different here
Every Fun API also has an OpenAPI 3.1 document, but the emphasis is on behaviour: writes persist inside your own sandbox, stale ETags are refused with 412, double submissions are caught by Idempotency-Key, limits answer 429 with Retry-After, and webhook deliveries carry a signature you can verify. Guided challenges tell you when a request produced the response an exercise asks for.
What Swagger Petstore does better
The canonical OpenAPI example: tooling, code generators and tutorials assume it, so it is the right target for learning the specification itself.
Self-hostable from the official Docker image, which gives you a private copy.
Declares an OAuth 2.0 implicit flow and an API key in its spec, which is useful when teaching security schemes in OpenAPI.
What this playground does better
Isolated per-caller data on the hosted service, so tests are repeatable.
Stateful failures with a cause instead of a sample document.
55 domains, from a coffee shop to an OAuth server, rather than one pet store.
Challenges that check your actual responses, plus Postman exports and code in nine languages.
Which to use
Use Petstore to learn OpenAPI, code generation and Swagger UI. Use Fun API when the goal is a test suite that asserts behaviour and failure handling on data nobody else can change.
Checked against Swagger Petstore as of 2026-10-30.
Official sources and scope
This compares a training playground with the documented use case of the other tool. Plans, limits and hosted features can change. For current terms, use the official sources below.
JSONPlaceholder — JSONPlaceholder fakes its writes. If you need a POST that a later GET can find, that is the difference.
httpbin — httpbin shows you the request. This shows you an API. They answer different questions.
ReqRes — Choose between a hosted test backend with account-backed collections and a no-signup training playground with themed scenarios.
json-server — json-server turns a JSON file into a REST API in seconds. It does not push back — and that is the difference.
WireMock — WireMock reproduces the API you already know, exactly. This one gives you an API you do not control.
Mockoon — Mockoon is for designing your own mock API. This one is an API already designed, with rules you have to discover.
Beeceptor — Beeceptor gives you a hosted endpoint to inspect and mock. This gives you finished APIs that behave like real ones.
DummyJSON — DummyJSON has rich sample data and a JWT login. Its writes are simulated; here they persist.
Postman mock servers — A Postman mock server replays the examples saved in a collection. This one runs an API with state and rules.
PokeAPI — PokeAPI is the real Pokémon database, read-only. This Pokémon API is invented data you can write to and break.
SWAPI — SWAPI serves Star Wars data, read-only. This Star Wars API is invented practice data you can change.
Restful Booker — Restful Booker is one booking API built for testing practice. This is 55 APIs with the failure paths built in.
GoRest — GoRest needs a token from a social login before you can write. This needs no account at all.
FakeStoreAPI — FakeStoreAPI returns a fake id for your POST and saves nothing. Here the cart, coupon and checkout keep their state.
Practice Software Testing — Toolshop is a full web shop with seeded bugs for UI and API testing. Fun API is many small APIs built around HTTP behaviour.
balldontlie — balldontlie serves real league data behind an API key and a free tier of a few requests a minute. This serves invented leagues you can drive yourself.
the HAPI FHIR public test server — The HAPI public server is a full FHIR implementation shared by everyone and purged regularly. This is a small, isolated, synthetic subset for practising tests.
the National Weather Service API — api.weather.gov is real, free US government weather data. This is a deterministic weather API for tests that need the same forecast every time.
local LLM mock servers — mockllm, llmock and similar packages run a fake OpenAI/Anthropic server on your machine. This is the same idea, hosted, with failure scenarios chosen by model name.
the free mock API landscape — Six free options, what each is genuinely for, and how to tell which one your problem needs.