ADD ANYTHING HERE OR JUST REMOVE IT…

Welcome

This project is a Strapi-based API that provides information on various endpoints related to Batman characters, locations, concepts, and storylines. The API is currently under development, working to add more information, and contributions are not yet permitted.

If the project grow up, we may develop a new version using NestJS.

Artículos

API RESTFul

All requests are GET requests and go over https. All responses will return data in json. The base URL no return data.

Base URL: https://api.batmanapi.com/v1

Avaiable URL:

Characters

Characters Schema

The information will be display inside the «data» property.

KeyTypeDescription
namestringThe name of the character
aliasstringThe alias of the character
alivebooleanThe status of the character (True or False)
rolestringThe role of the character
descriptionstringThe description of the character
creatorstringThe creator of the character
first_appearancestringFirst Appearance of the character
genderstringThe gender of the character
abilitiesstring(array)The abilities of the character

Get All Characters

In order to get the characters you must use: https://api.batmanapi.com/v1/characters

There are 83 characters.

Note: You will get up to 10 characters at once by default.

{
  "data": [
    {
      "id": 13,
      "attributes": {
        "name": "Pamela Isley",
        "alias": "Poison Ivy",
        "alive": true,
        "role": "Anti-Hero/Villain",
        "description": "A botanist turned eco-terrorist with the ability to control plants and secrete toxins.",
        "creator": "Tom King, Clay Mann",
        "first_appearance": "Batman: Rebirth #41",
        "gender": "Female",
        "abilities": [
          "Botanical Control",
          "Toxin Secretion",
          "Genius-Level Intellect"
        ],
        "image_url": "https://example.com/images/poison_ivy.jpg"
      }
    },
    {
      "id": 14,
      "attributes": {
        "name": "Jonathan Crane",
        "alias": "Scarecrow",
        "alive": true,
        "role": "Villain",
        "description": "A former psychologist who uses fear toxins to terrorize Gotham.",
        "creator": "Tom King, David Finch",
        "first_appearance": "Batman: Rebirth #14",
        "gender": "Male",
        "abilities": [
          "Fear Toxin Creation",
          "Psychology",
          "Chemical Engineering"
        ],
        "image_url": "https://example.com/images/scarecrow.jpg"
      }
    },
{
... the rest of the characters ...
}
  ],
  "meta": {
    "pagination": {
      "page": 1,
      "pageSize": 10,
      "pageCount": 9,
      "total": 83
    }
  }
}

Get a Single Character

In order to get a character you must use a params: https://api.batmanapi.com/v1/characters/:id

Example: https://api.batmanapi.com/v1/characters/1

{
  "data": {
    "id": 1,
    "attributes": {
      "name": "Bruce Wayne",
      "alias": "Batman",
      "alive": true,
      "role": "Hero",
      "description": "The Dark Knight and protector of Gotham City.",
      "creator": "Tom King, Scott Snyder",
      "first_appearance": "Batman: Rebirth #1",
      "gender": "Male",
      "image_url": "https://example.com/images/bruce_wayne.jpg",
      "abilities": [
        "Martial Arts",
        "Detective Skills",
        "Stealth"
      ]
    }
  },
  "meta": {}
}

Locations

Locations Schema

The information will be display inside the «data» property.

OperatorTypeDescription
namestringThe name of the location
descriptionstringThe description of the location
notable_eventsarrayImportant events that occurred at this location
first_appearancestringThe first appearance of the location
related_charactersarrayList of characters related to the location
coordinatesobjectApproximate geographic coordinates
typestringThe type of the location
creatorstringLocation creators

Get All Locations

In order to get the characters you must use: https://api.batmanapi.com/v1/locations

Note: You will get up to 10 characters at once by default.

{
  "data": [
    {
      "id": 11,
      "attributes": {
        "name": "Gotham City Hall",
        "description": "The administrative center of Gotham City.",
        "notable_events": [
          "Mayor's corruption scandal",
          "Joker's takeover",
          "Riddler's bomb threat"
        ],
        "first_appearance": "Detective Comics #66",
        "related_characters": [
          "Mayor Hill",
          "Batman",
          "Harvey Dent"
        ],
        "coordinates": {
          "latitude": 40.7121,
          "longitude": -74.0056
        },
        "type": "Government Building",
        "creator": "Bill Finger, Bob Kane"
      }
    },
    {
      "id": 12,
      "attributes": {
        "name": "Robinson Park",
        "description": "A large park in Gotham City, often a battleground for various villains.",
        "notable_events": [
          "Poison Ivy's takeover",
          "Joker's parade",
          "Riddler's puzzles"
        ],
        "first_appearance": "Batman #465",
        "related_characters": [
          "Poison Ivy",
          "Batman",
          "Harley Quinn"
        ],
        "coordinates": {
          "latitude": 40.7132,
          "longitude": -74.0078
        },
        "type": "Park",
        "creator": "Alan Grant, Norm Breyfogle"
      }
    },
    {
    ... the rest of the locations ... 
    }
  ],
  "meta": {
    "pagination": {
      "page": 1,
      "pageSize": 10,
      "pageCount": 5,
      "total": 49
    }
  }
}

Get a Single Location

In order to get a location you must use a params: https://api.batmanapi.com/v1/locations/:id

Example: https://api.batmanapi.com/v1/locations/1

{
  "data": {
    "id": 1,
    "attributes": {
      "name": "Gotham City",
      "description": "A dark and crime-ridden city, home to Batman.",
      "notable_events": [
        "Batman's origin",
        "No Man's Land",
        "Knightfall"
      ],
      "first_appearance": "Batman #1",
      "related_characters": [
        "Batman",
        "Joker",
        "Jim Gordon"
      ],
      "coordinates": {
        "latitude": 40.7128,
        "longitude": -74.006
      },
      "type": "City",
      "creator": "Bill Finger, Bob Kane"
    }
  },
  "meta": {
  }
}

Concepts

Concepts Schema

The information will be display inside the «data» property.

OperatorTypeDescription
namestringThe name of the concept
descriptionstringThe description of the concept
related_charactersarrayList of characters related to the concept
related_locationsarrayList of locations related to the concept
first_appearancestringThe first appearance of the concept
typestringThe type of the concept
creatorstringConcept creators

Get All Concepts

In order to get the characters you must use: https://api.batmanapi.com/v1/concepts

There are 38 concepts.

Pagination: You will get up to 10 characters at once by default.

{
  "data": [
    {
      "id": 1,
      "attributes": {
        "name": "Bat-Signal",
        "description": "A spotlight used by the Gotham City Police Department to summon Batman.",
        "related_characters": [
          "Batman",
          "Jim Gordon"
        ],
        "related_locations": [
          "GCPD Headquarters"
        ],
        "first_appearance": "Detective Comics #60",
        "creator": "Bill Finger, Bob Kane",
        "type": "Device"
      }
    },
    {
      "id": 2,
      "attributes": {
        "name": "Batmobile",
        "description": "Batman’s primary mode of transportation, equipped with various gadgets and weapons.",
        "related_characters": [
          "Batman"
        ],
        "related_locations": [
          "Batcave"
        ],
        "first_appearance": "Detective Comics #27",
        "creator": "Bill Finger, Bob Kane",
        "type": "Vehicle"
      }
    },
    {
      ... The rest of the concepts ...
    }
  ],
  "meta": {
    "pagination": {
      "page": 1,
      "pageSize": 10,
      "pageCount": 4,
      "total": 38
    }
  }
}

Get a Single Concept

In order to get a concept you must use a params: https://api.batmanapi.com/v1/concepts/:id

Example: https://api.batmanapi.com/v1/concepts/1

{
  "data": {
    "id": 1,
    "attributes": {
      "name": "Bat-Signal",
      "description": "A spotlight used by the Gotham City Police Department to summon Batman.",
      "related_characters": [
        "Batman",
        "Jim Gordon"
      ],
      "related_locations": [
        "GCPD Headquarters"
      ],
      "first_appearance": "Detective Comics #60",
      "creator": "Bill Finger, Bob Kane",
      "image_url": "https://example.com/images/bat_signal.jpg",
      "type": "Device"
    }
  },
  "meta": {

  }
}

Storylines

Storylines Schema

The information will be display inside the «data» property.

OperatorTypeDescription
namestringThe name of the storyline
descriptionstringThe description of the storyline
issuesarrayList of comic book issues that make up the storyline
publication_datestringStoryline publication date
writerstringWriter(s) of the storyline
artiststringArtist(s) of the storyline
charactersarrayList of characters related to the storyline
locationsarrayList of locations related to the storyline

Get All Storylines

In order to get the characters you must use: https://api.batmanapi.com/v1/storylines

There are 41 Storylines

Pagination: You will get up to 10 characters at once by default.

{
  "data": [
    {
      "id": 1,
      "attributes": {
        "name": "The Long Halloween",
        "description": "A mystery story set in Batman's early days, dealing with a serial killer named Holiday.",
        "issues": [
          "Batman: The Long Halloween #1-13"
        ],
        "publication_date": "1996-10-01",
        "writer": "Jeph Loeb",
        "artist": "Tim Sale",
        "characters": [
          "Batman",
          "Harvey Dent",
          "Jim Gordon"
        ],
        "locations": [
          "Gotham City",
          "GCPD Headquarters"
        ],
        "image_url": "https://example.com/images/the_long_halloween.jpg"
      }
    },
    {
      "id": 2,
      "attributes": {
        "name": "Year One",
        "description": "The origin of Batman and his first year fighting crime in Gotham City.",
        "issues": [
          "Batman #404-407"
        ],
        "publication_date": "1987-02-01",
        "writer": "Frank Miller",
        "artist": "David Mazzucchelli",
        "characters": [
          "Batman",
          "Jim Gordon",
          "Catwoman"
        ],
        "locations": [
          "Gotham City",
          "Crime Alley"
        ],
        "image_url": "https://example.com/images/year_one.jpg"
      }
    },
    {
      ... The rest of the Storylines ...
      }
  ],
  "meta": {
    "pagination": {
      "page": 1,
      "pageSize": 10,
      "pageCount": 5,
      "total": 41
    }
  }
}

Get a Single Storyline

In order to get a storyline you must use a params: https://api.batmanapi.com/v1/storylines/:id

Example: https://api.batmanapi.com/v1/storylines/1

{
  "data": {
    "id": 1,
    "attributes": {
      "name": "The Long Halloween",
      "description": "A mystery story set in Batman's early days, dealing with a serial killer named Holiday.",
      "issues": [
        "Batman: The Long Halloween #1-13"
      ],
      "publication_date": "1996-10-01",
      "writer": "Jeph Loeb",
      "artist": "Tim Sale",
      "locations": [
        "Gotham City",
        "GCPD Headquarters"
      ],
      "characters": [
        "Batman",
        "Harvey Dent",
        "Jim Gordon"
      ],
      "image_url": "https://example.com/images/the_long_halloween.jpg"
    }
  },
  "meta": {

  }
}

Sort, Filter, Pagination

Sorting

Queries can accept a sort parameter that allows sorting on one or multiple fields with the following syntaxes:

  • to sort on 1 field: ?sort=value
  • to sort on multiple fields: ?sort[0]=value1&sort[1]=value2

Where:

  • value: It’s the property you want to sort depending of the schema of each one. (Ex: id or name | ?sort=id)

The sorting order can be defined with:

  • :asc for ascending order (default order, can be omitted)
  • :desc for descending order. (Ex: ?sort[0]=name:desc)

Filter

Queries can accept a filters parameter with the following syntax:

?filters[field][operator]=value

Where:

  • field: It’s the property you want to filter depending of the schema of each one.
  • operator: You will find a table for the operator available below.
  • value: The param you want to filter.

The following operators are available:

OperatorDescription
$eqEqual
$eqiEqual (case-insensitive)
$neNot equal
$neiNot equal (case-insensitive)
$ltLess than
$lteLess than or equal to
$gtGreater than
$gteGreater than or equal to
$inIncluded in an array
$notInNot included in an array
$containsContains
$notContainsDoes not contain
$containsiContains (case-insensitive)
$notContainsiDoes not contain (case-insensitive)
$nullIs null
$notNullIs not null
$betweenIs between
$startsWithStarts with
$startsWithiStarts with (case-insensitive)
$endsWithEnds with
$endsWithiEnds with (case-insensitive)
$orJoins the filters in an «or» expression
$andJoins the filters in an «and» expression
$notJoins the filters in an «not» expression