Skip to main content

Finds Pets by tags

GET 

https://petstore.swagger.io/v2/pet/findByTags

deprecated

This endpoint has been deprecated and may be replaced or removed in future versions of the API.

Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.

Request

Query Parameters

    tags string[]required

    Tags to filter by

Responses

successful operation

Schema
  • Array [
  • idint64

    Pet ID

    category Category

    Categories this pet belongs to

    idint64

    Category ID

    namestring

    Category name

    Possible values: non-empty

    sub object

    Test Sub Category

    prop1string

    Dumb Property

    namestringrequired

    The name given to a pet

    Example: Guru
    photoUrlsurl[]required

    The list of URL to a cute photos featuring pet

    Possible values: <= 20

    friendcircular(Pet)
    tags Tag[]

    Tags attached to the pet

    Possible values: >= 1

  • Array [
  • idint64

    Tag ID

    namestring

    Tag name

    Possible values: non-empty

  • ]
  • statusstring

    Pet status in the store

    Possible values: [available, pending, sold]

    petType object

    Type of a pet

    Possible values: [cat, dog, bee]

    huntingSkillstringrequired

    The measured skill for hunting

    Possible values: [clueless, lazy, adventurous, aggressive]

    Default value: lazy
    Example: adventurous
  • ]

Authorization: oauth2

name: petstore_authtype: oauth2scopes: write:pets,read:petsdescription: Get access to data while protecting your account credentials.
OAuth2 is also a safer and more secure way to give you access.
flows: {
  "implicit": {
    "authorizationUrl": "http://petstore.swagger.io/api/oauth/dialog",
    "scopes": {
      "write:pets": "modify pets in your account",
      "read:pets": "read your pets"
    }
  }
}
import http.client

conn = http.client.HTTPSConnection("petstore.swagger.io")
payload = ''
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer <token>'
}
conn.request("GET", "/v2/pet/findByTags", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Request Collapse all
Base URL
https://petstore.swagger.io/v2
Auth
Parameters
— queryrequired
ResponseClear

Click the Send API Request button above and see the response here!