Skip to content

/api/characters/{ids|wikiNames}

Retrieve one or more Characters from the database by their numeric IDs or by their wikiName slugs.

Endpoint: GET /api/characters/{ids|wikiNames}

ParameterTypeDescription
paramsstringSingle numeric ID or single wikiName, or a comma-separated list of either (no mixing types)

Single Character by ID:

https://gundam-api.pages.dev/api/characters/1

Multiple Characters by ID:

https://gundam-api.pages.dev/api/characters/1,49,123

Single Character by wikiName:

https://gundam-api.pages.dev/api/characters/amuro-ray

Multiple Characters by wikiName:

https://gundam-api.pages.dev/api/characters/amuro-ray,char-aznable

Mixed types (not allowed, returns 400):

https://gundam-api.pages.dev/api/characters/1,char-aznable

Single Character Response:

{
"id": 1,
"wikiName": "amuro-ray",
"wikiUrl": "https://gundam.fandom.com/wiki/Amuro_Ray",
"name": "Amuro Ray",
"header": "Ace pilot of the RX-78-2 Gundam",
"details": "Amuro Ray is a Newtype and pilot...",
"imgUrl": "https://example.com/amuro.jpg",
"aliases": "White Devil",
"species": "Human (Newtype)",
"bloodType": "A",
"height": "168 cm",
"weight": "55 kg",
"hairColor": "Brown",
"eyeColor": "Brown",
"age": "15",
"birthDate": "U.C. 0059-11-04",
"gender": "Male",
"loveInterests": "Sayla Mass",
"nationality": "Earth Federation",
"affiliation": "Earth Federation Forces",
"occupation": "Mobile Suit Pilot",
"status": "Alive"
}

Multiple Characters Response:

[
{
"id": 1,
"wikiName": "amuro-ray",
"wikiUrl": "https://gundam.fandom.com/wiki/Amuro_Ray",
"name": "Amuro Ray",
"header": "Ace pilot of the RX-78-2 Gundam",
"details": "Amuro Ray is a Newtype and pilot...",
"imgUrl": "https://example.com/amuro.jpg",
"aliases": "White Devil",
"species": "Human (Newtype)",
"bloodType": "A",
"height": "168 cm",
"weight": "55 kg",
"hairColor": "Brown",
"eyeColor": "Brown",
"age": "15",
"birthDate": "U.C. 0059-11-04",
"gender": "Male",
"loveInterests": "Sayla Mass",
"nationality": "Earth Federation",
"affiliation": "Earth Federation Forces",
"occupation": "Mobile Suit Pilot",
"status": "Alive"
},
{
"id": 49,
"wikiName": "char-aznable",
"wikiUrl": "https://gundam.fandom.com/wiki/Char_Aznable",
"name": "Char Aznable",
"header": "The Red Comet",
"details": "Char Aznable is a charismatic ace pilot...",
"imgUrl": "https://example.com/char.jpg",
"aliases": "The Red Comet",
"species": "Human (Newtype)",
"bloodType": "A",
"height": "175 cm",
"weight": "68 kg",
"hairColor": "Blond",
"eyeColor": "Blue",
"age": "20",
"birthDate": "U.C. 0059-11-17",
"gender": "Male",
"loveInterests": "Haman Karn",
"nationality": "Principality of Zeon",
"affiliation": "Zeon Military",
"occupation": "Mobile Suit Pilot",
"status": "Unknown"
}
]

Character Object

  • id (integer): Numeric identifier for the Character
  • wikiName (string): URL-friendly name used as primary key
  • wikiUrl (string): Link to the Character’s wiki page
  • name (string): Display name of the Character
  • header (string|null): Brief description or header text
  • details (string|null): Detailed description of the Character
  • imgUrl (string|null): URL to an image of the Character
  • aliases (string|null): Alternate names or nicknames
  • species (string|null): Species information
  • bloodType (string|null): Blood type
  • height (string|null): Height information
  • weight (string|null): Weight information
  • hairColor (string|null): Hair color
  • eyeColor (string|null): Eye color
  • age (string|null): Age information
  • birthDate (string|null): Birth date
  • gender (string|null): Gender
  • loveInterests (string|null): Known love interests
  • nationality (string|null): Nationality or origin
  • affiliation (string|null): Organizations or factions
  • occupation (string|null): Occupation or role
  • status (string|null): Current status
  • 200 OK: Request successful
  • 400 Bad Request: Missing parameters or mixed parameter types
  • 404 Not Found: No Characters found with the provided value(s)
  • 500 Internal Server Error: Server error occurred

Missing parameters:

{
"error": "No parameters provided"
}

Mixed types (IDs and wikiNames together):

{
"error": "Cannot mix id and wikiName parameters. Use either all numeric IDs or all wikiNames."
}

Not Found (IDs):

{
"error": "No characters found with the provided ID(s)"
}

Not Found (wikiNames):

{
"error": "No characters found with the provided wikiName(s)"
}

Server Error:

{
"error": "Failed to fetch character(s)"
}
  • Pass either numeric IDs or wikiName slugs; do not mix types in a single request
  • For single parameter requests, the response is a single Character object
  • For multiple parameters, the response is an array of Character objects
  • For lists, use comma-separated values without spaces