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.
Try It Live
No authentication required. Deployed on Node.js.
https://api.petstoreapi.com/v1/pets?limit=3
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/findByStatusinstead of/pets?status=... -
Singular resources:
/petinstead of/pets(inconsistent naming) -
Wrong HTTP methods:
PUT /petwithout 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=availablewith 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."
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."
API Developers
"I'm starting a new API project and want to follow best practices from day one — authentication, errors, hypermedia, the works."
QA Engineers
"I need a live API with predictable behavior to test our API testing framework, monitoring tools, and integration workflows."
Technical Writers
"I'm documenting API best practices and need real working examples of webhooks, OAuth flows, and structured errors to reference."
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."
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