# Dragon Ball API

> Look up Dragon Ball data using the free, keyless Dragon Ball API: page through the characters and the planets, filter characters by name, race, gender or affiliation and planets by name or whether they have been destroyed, and fetch any single record by id along with a character's transformations or a planet's natives. No account or API key required. Disclaimer: this is an independent integration with the community-run Dragon Ball API (dragonball-api.com). It is not affiliated with, endorsed by, or sponsored by Akira Toriyama, Shueisha, Toei Animation, Bird Studio, or Crunchyroll; Dragon Ball and all related names, characters, and trademarks are the property of their respective owners.

App · Film, TV & Fandom · 8 actions. Web page: https://docs.lodol.com/docs/integrations/dragon-ball

## Actions

### Get a character

Get a single Dragon Ball character by id. This is the only lookup that carries the character's origin planet and their transformations, both of which the listing actions leave out.

**Inputs**

- Character (`character_id`, text, required): Pick a character, or reference one from a previous step by its ID.

**Outputs**

- `character` (object)

**Example output**

```json
{
  "character": {
    "affiliation": "Z Fighter",
    "deletedAt": null,
    "description": "El protagonista de la serie, conocido por su gran poder y su bondad.",
    "gender": "Male",
    "id": 1,
    "image": "https://dragonball-api.com/characters/goku_normal.webp",
    "ki": "60.000.000",
    "maxKi": "90 Septillion",
    "name": "Goku",
    "originPlanet": {
      "deletedAt": null,
      "description": "La Tierra, tambien llamado Mundo del Dragon, es el planeta donde vive la mayoria de los protagonistas de la serie.",
      "id": 2,
      "image": "https://dragonball-api.com/planetas/Tierra_Dragon_Ball.webp",
      "isDestroyed": false,
      "name": "Tierra"
    },
    "race": "Saiyan",
    "transformations": [
      {
        "deletedAt": null,
        "id": 1,
        "image": "https://dragonball-api.com/transformaciones/goku_ssj.webp",
        "ki": "3 Billion",
        "name": "Super Saiyan"
      }
    ]
  }
}
```

### Get a character's transformations

List every transformation of one character, such as Goku's Super Saiyan forms. The API has no route of its own for these, so this reads them off the character record and hands back just the list, named and counted. Plenty of characters have none, which returns an empty list rather than an error.

**Inputs**

- Character (`character_id`, text, required): Pick a character, or reference one from a previous step by its ID.

**Outputs**

- `character_id` (number): The id of the character they belong to.
- `character_name` (text): The name of the character they belong to.
- `count` (number): How many transformations the character has.
- `transformations` (list): The character's transformations, empty for a character with none.

**Example output**

```json
{
  "character_id": 1,
  "character_name": "Goku",
  "count": 1,
  "transformations": [
    {
      "deletedAt": null,
      "id": 1,
      "image": "https://dragonball-api.com/transformaciones/goku_ssj.webp",
      "ki": "3 Billion",
      "name": "Super Saiyan"
    }
  ]
}
```

### Get a planet

Get a single planet by id. This is the only lookup that carries the characters who come from it, which the listing actions leave out.

**Inputs**

- Planet (`planet_id`, text, required): Pick a planet, or reference one from a previous step by its ID.

**Outputs**

- `planet` (object)

**Example output**

```json
{
  "planet": {
    "characters": [
      {
        "affiliation": "Z Fighter",
        "deletedAt": null,
        "description": "El protagonista de la serie, conocido por su gran poder y su bondad.",
        "gender": "Male",
        "id": 1,
        "image": "https://dragonball-api.com/characters/goku_normal.webp",
        "ki": "60.000.000",
        "maxKi": "90 Septillion",
        "name": "Goku",
        "race": "Saiyan"
      }
    ],
    "deletedAt": null,
    "description": "Planeta natal de los Namekianos. Escenario de importantes batallas de la saga de Freezer.",
    "id": 1,
    "image": "https://dragonball-api.com/planetas/Namek_U7.webp",
    "isDestroyed": true,
    "name": "Namek"
  }
}
```

### List a planet's characters

List the characters who come from one planet. The API has no route of its own for these, so this reads them off the planet record and hands back just the list, named and counted. Some planets have nobody associated with them, which returns an empty list rather than an error.

**Inputs**

- Planet (`planet_id`, text, required): Pick a planet, or reference one from a previous step by its ID.

**Outputs**

- `characters` (list): The characters who come from this planet, empty when none do.
- `count` (number): How many characters come from the planet.
- `planet_id` (number): The id of the planet.
- `planet_name` (text): The name of the planet.

**Example output**

```json
{
  "characters": [
    {
      "affiliation": "Z Fighter",
      "deletedAt": null,
      "description": "El protagonista de la serie, conocido por su gran poder y su bondad.",
      "gender": "Male",
      "id": 1,
      "image": "https://dragonball-api.com/characters/goku_normal.webp",
      "ki": "60.000.000",
      "maxKi": "90 Septillion",
      "name": "Goku",
      "race": "Saiyan"
    }
  ],
  "count": 1,
  "planet_id": 2,
  "planet_name": "Tierra"
}
```

### List characters

List Dragon Ball characters one page at a time, with each character's own details as the API records them. Set Limit to choose the page size and Page to walk the roster; the result carries the total count, the page numbers either side of this one and a has_more flag, so a workflow can page through the whole cast without guessing where it ends.

**Inputs**

- Page (`page`, number): Which page of results to return (defaults to the first page). Page size is set by the Limit parameter, and every result carries a next_page value to feed back in here. At least 1.
- Limit (`limit`, number): How many records to return per page, up to 100. The API returns 10 per page when this is left empty. From 1 to 100.

**Outputs**

- `characters` (list): The characters on this page.
- `count` (number): How many characters this page returned.
- `has_more` (true/false): True while there is another page to fetch.
- `limit` (number): The page size that was used.
- `next_page` (number): The next page to fetch, or null on the last page.
- `page` (number): The page that was fetched.
- `previous_page` (number): The previous page, or null on the first page.
- `total_count` (number): How many characters the whole collection holds.
- `total_pages` (number): How many pages that comes to at this page size.

**Example output**

```json
{
  "characters": [
    {
      "affiliation": "Z Fighter",
      "deletedAt": null,
      "description": "El protagonista de la serie, conocido por su gran poder y su bondad.",
      "gender": "Male",
      "id": 1,
      "image": "https://dragonball-api.com/characters/goku_normal.webp",
      "ki": "60.000.000",
      "maxKi": "90 Septillion",
      "name": "Goku",
      "race": "Saiyan"
    }
  ],
  "count": 1,
  "has_more": true,
  "limit": 10,
  "next_page": 2,
  "page": 1,
  "previous_page": null,
  "total_count": 58,
  "total_pages": 6
}
```

### List planets

List the planets one page at a time, with each planet's own details as the API records them. Set Limit to choose the page size and Page to walk the list; the result carries the total count, the page numbers either side of this one and a has_more flag, so a workflow can tell when it has reached the end.

**Inputs**

- Page (`page`, number): Which page of results to return (defaults to the first page). Page size is set by the Limit parameter, and every result carries a next_page value to feed back in here. At least 1.
- Limit (`limit`, number): How many records to return per page, up to 100. The API returns 10 per page when this is left empty. From 1 to 100.

**Outputs**

- `count` (number): How many planets this page returned.
- `has_more` (true/false): True while there is another page to fetch.
- `limit` (number): The page size that was used.
- `next_page` (number): The next page to fetch, or null on the last page.
- `page` (number): The page that was fetched.
- `planets` (list): The planets on this page.
- `previous_page` (number): The previous page, or null on the first page.
- `total_count` (number): How many planets the whole collection holds.
- `total_pages` (number): How many pages that comes to at this page size.

**Example output**

```json
{
  "count": 1,
  "has_more": true,
  "limit": 10,
  "next_page": 2,
  "page": 1,
  "planets": [
    {
      "deletedAt": null,
      "description": "Planeta natal de los Namekianos. Escenario de importantes batallas de la saga de Freezer.",
      "id": 1,
      "image": "https://dragonball-api.com/planetas/Namek_U7.webp",
      "isDestroyed": true,
      "name": "Namek"
    }
  ],
  "previous_page": null,
  "total_count": 20,
  "total_pages": 2
}
```

### Search characters

Find characters by name, race, gender or affiliation, in any combination: race Saiyan with affiliation Z Fighter returns every Saiyan fighting on that side. At least one filter is required. A filtered query is not paginated, so this returns every match at once rather than a page of them, and nothing matching returns an empty list rather than an error.

**Inputs**

- Name (`name`, text): Filter by name. The API matches on the name it holds, so this is the character's own name rather than a description of them. Leave empty to filter on the other fields alone.
- Race (`race`, text): Only return characters of this race. These are the races the API documents; leave empty for all of them. One of: `Human`, `Saiyan`, `Namekian`, `Majin`, `Frieza Race`, `Android`, `Jiren Race`, `God`, `Angel`, `Evil`, and 3 more.
- Gender (`gender`, text): Only return characters of this gender. Leave empty for all of them. One of: `Male`, `Female`, `Unknown`.
- Affiliation (`affiliation`, text): Only return characters with this affiliation, which is the side or organisation the API files them under. These are the affiliations it documents; leave empty for all of them. One of: `Z Fighter`, `Red Ribbon Army`, `Namekian Warrior`, `Freelancer`, `Army of Frieza`, `Pride Troopers`, `Assistant of Vermoud`, `God`, `Assistant of Beerus`, `Villain`, `Other`.

**Outputs**

- `characters` (list): Every character that matched. A filtered query is not paginated, so this is the whole result.
- `count` (number): How many characters matched.
- `filters` (object): The filters that were sent, as the API received them.

**Example output**

```json
{
  "characters": [
    {
      "affiliation": "Z Fighter",
      "deletedAt": null,
      "description": "El protagonista de la serie, conocido por su gran poder y su bondad.",
      "gender": "Male",
      "id": 1,
      "image": "https://dragonball-api.com/characters/goku_normal.webp",
      "ki": "60.000.000",
      "maxKi": "90 Septillion",
      "name": "Goku",
      "race": "Saiyan"
    }
  ],
  "count": 1,
  "filters": {
    "affiliation": "Z Fighter",
    "race": "Saiyan"
  }
}
```

### Search planets

Find planets by name, by whether they have been destroyed, or by both. At least one filter is required. A filtered query is not paginated, so this returns every match at once rather than a page of them, and nothing matching returns an empty list rather than an error.

**Inputs**

- Name (`name`, text): Filter by planet name. Leave empty to filter on destroyed status alone.
- Destroyed (`is_destroyed`, text): Only return planets that have been destroyed, or only ones that are still standing. Leave empty for both. One of: `true` (Destroyed), `false` (Still standing).

**Outputs**

- `count` (number): How many planets matched.
- `filters` (object): The filters that were sent, as the API received them.
- `planets` (list): Every planet that matched. A filtered query is not paginated, so this is the whole result.

**Example output**

```json
{
  "count": 1,
  "filters": {
    "isDestroyed": "true"
  },
  "planets": [
    {
      "deletedAt": null,
      "description": "Planeta natal de los Namekianos. Escenario de importantes batallas de la saga de Freezer.",
      "id": 1,
      "image": "https://dragonball-api.com/planetas/Namek_U7.webp",
      "isDestroyed": true,
      "name": "Namek"
    }
  ]
}
```
