Modern
Classic

The Modern Petstore API

A production-grade RESTful reference implementation built with modern web standards. Unlike the Classic version's action verbs (/pet/findByStatus), we use proper resources (/pets?status=available) following RFC specifications and industry best practices.

petstore-v3.2.yaml
openapi: 3.2.0
# Latest OpenAPI specification
info:
title: Modern PetstoreAPI
version: 1.0.0

webhooks: # Event-Driven Architecture
petAdopted:
post:
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Pet'

components:
schemas:
Pet:
type: object
discriminator: # Polymorphism
propertyName: petType

Try It Live

No authentication required. Deployed on Node.js.

GET https://api.petstoreapi.com/v1/pets?limit=3
200 OK

                            
curl https://api.petstoreapi.com/v1/pets?limit=3
const response = await fetch('https://api.petstoreapi.com/v1/pets?limit=3');
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://api.petstoreapi.com/v1/pets?limit=3')
data = response.json()
print(data)

Modern vs Classic

The Classic Petstore violates RESTful principles and industry best practices

Classic Petstore

OpenAPI 2.0 / 3.0

  • Action verbs in URLs: /pet/findByStatus instead of /pets?status=...
  • Singular resources: /pet instead of /pets (inconsistent naming)
  • Wrong HTTP methods: PUT /pet without ID
  • Generic error responses (no RFC 9457)
  • Passwords in query parameters (security risk)
  • REST-only (no GraphQL, gRPC, or async protocols)

Modern PetstoreAPI

OpenAPI 3.2 + AsyncAPI 3.0

  • Resource nouns: /pets?status=available with query params
  • Plural naming: /pets, /orders (consistent)
  • Correct HTTP semantics: PUT/PATCH with IDs, proper methods
  • RFC 9457 structured problem details for errors
  • Webhooks & AsyncAPI 3.0 event-driven architecture
  • Multi-protocol support: REST, SSE, MCP, GraphQL, gRPC, AsyncAPI, WSDL, WADL, RAML

Who Uses Modern PetstoreAPI?

Real scenarios where you need a production-grade reference

API Tool Developers

"I'm building an OpenAPI code generator and need a comprehensive spec with webhooks, discriminators, and real-world patterns to test against."

Code Generators Validators SDK Tools

Educators & Students

"I'm teaching API design and want students to learn from modern, secure examples — not 13-year-old anti-patterns with security flaws."

Courses Tutorials Workshops

API Developers

"I'm starting a new API project and want to follow best practices from day one — authentication, errors, hypermedia, the works."

Prototyping Reference Templates

QA Engineers

"I need a live API with predictable behavior to test our API testing framework, monitoring tools, and integration workflows."

Testing Monitoring CI/CD

Technical Writers

"I'm documenting API best practices and need real working examples of webhooks, OAuth flows, and structured errors to reference."

Documentation Examples Guides

Enterprise Architects

"I'm standardizing our company's API guidelines and want to point teams to a reference that matches our security and design requirements."

Standards Governance Templates

Everything You Need

Production-ready features for testing, education, and prototyping

Native Webhooks

Event-driven architecture with AsyncAPI 3.0 specs for real-time updates.

OAuth 2.0 + JWT

Authorization Code Flow with PKCE and Device Flow for IoT.

RFC 9457 Errors

Structured problem details for HTTP APIs with machine-readable errors.

IETF Rate Limiting

Standard RateLimit-* headers for transparent rate limit communication.

Scalable Architecture

Deployed on Node.js with Docker support for low-latency performance.

Multi-Protocol Support

Choose your preferred API style: REST, SSE, MCP, GraphQL, gRPC, AsyncAPI, WSDL, WADL, or RAML.

Ready to Explore?

Start using the Modern PetstoreAPI in your projects today.

Open source under MIT License • Deployed on Node.js