Skip to main content

Petstore API overview

Petstore is a sample API that helps you test common API workflows, including finding pets, managing user sessions, and placing orders.

Choose your path​

PathDescriptionTime
QuickstartRun the three playground GET calls~5 min
Find pets by statusReference for GET /pet/findByStatus~10 min
Login and logoutReference for GET /user/login and GET /user/logout~10 min

How the API works​

Base URL​

Send all API requests to:

https://petstore3.swagger.io/api/v3

The API accepts JSON and XML request bodies and returns JSON or XML responses. Some endpoints can require authentication, depending on your environment.

API playground​

Use the API playground to run six curated demo operations in the browser:

  • GET /pet/findByStatus
  • POST /pet
  • PUT /pet
  • DELETE /pet/{petId}
  • GET /user/login
  • GET /user/logout

These playground examples use sample values and don't require authentication.

Downloadable OpenAPI (playground only)​

The canonical machine-readable description for those three GET operations is petstore-playground.json. It doesn't describe POST, PUT, DELETE, or other paths on the public sample server.