API:2/pets

From Guild Wars 2 Wiki
Jump to navigationJump to search

/v2/pets

HTTP method
GET
Format
json
API version
version 2
Release date
2016-03-07
Scope
none
Optional
none

This resource returns information about the Ranger pets that are in the game.

Endpoints

  • None - Request the list of all available pet ids when the root endpoint (v2/pets) has been accessed.
  • id - (Optional) Request the pet for the specificed id when accessing the endpoint (v2/pets/id). Cannot be used when specifying the ids parameter.

Parameters

  • lang – (Optional) Request localized information.
  • page - (Optional; integer)
  • page_size - (Optional; integer)
  • ids - (Optional; Comma Delimited List|all) Request an array of pets for the specified ids or all pets. Cannot be used when using the id endpoint.

Response

For each requested pet id, an object with the following properties is returned:

  • id (integer) (default/null value: 0) - The <codeid of the pet.
  • name (string) (default/null value: "") - The name of the pet.
  • description (string) (default/null value: "") - The description of the pet.
  • icon (string) (default/null value: "") - The icon uri for the pet.
  • skills (array of objects)
    • id (number) - The id of the skill, to be resolved against v2/skills.

Example

https://api.guildwars2.com/v2/pets

[
 1,
 2,
 3,
 ...,
 48,
 51,
 52
]

https://api.guildwars2.com/v2/pets/33

{
 "id":33,
 "name":"Juvenile Forest Spider",
 "description":"While other spiders use debilitating or paralyzing poison, forest-spider poison is simply corrosive and destructive. Fortunately they are immune to the acidic qualities of their own poison, but they do need to eat quickly. —Acht",
 "icon":"https://render.guildwars2.com/file/46021B0706D37EEF1F3DE7090E5B0ACF0F927E7C/52598.png",
 "skills": [
   {
       "id": 12731
   }
  ]
}

https://api.guildwars2.com/v2/pets?ids=42

 [
   {
       "id": 42,
       "name": "Juvenile Red Jellyfish",
       "description": "Jellyfish can release a variety of clouds in the water to replenish themselves and disorient their enemies. Their tentacles immobilize their prey by disrupting their nervous system. —Acht",
       "icon": "https://render.guildwars2.com/file/C7F8301C1B76B3B208A23B19C3AABF0BBED8CA4C/52616.png",
       "skills": [
           {
               "id": 12749
           }
       ]
   }
 ]