Cards API
Access One Piece TCG card data through our REST API endpoints.
GET/api/v1/cards
List Cards
Retrieve a paginated list of cards. By default, results are sorted by card name in ascending order.
Query Parameters
All parameters are optional:
pageper_pagesearchcolorsettypecostclasscounterpowerrarity
Example Request
https://optcg-api.ryanmichaelhirst.us/api/v1/cards?page=1&per_page=20&color=red&search=Monkey&rarity=L
GET/api/v1/cards/:id
Get Card by ID
Retrieve a specific card by its unique identifier.
Card Properties
- Name
id
- Type
- string
- Description
- Unique identifier from database, e.g. card_1234
- Name
code
- Type
- string
- Description
- Serial number on card, e.g. OP01-001
- Name
rarity
- Type
- string
- Description
- Card rarity, e.g. C | L | P | R | SEC | SP CARD | SR | TR | UC
- Name
type
- Type
- string
- Description
- Card type, e.g. CHARACTER | EVENT | LEADER | STAGE
- Name
name
- Type
- string
- Description
- Card name, e.g. Monkey D. Luffy
- Name
cost
- Type
- number
- Description
- Card cost, e.g. 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
- Name
attribute
- Type
- string
- Description
- Card attribute, e.g. Ranged | Slash | Special | Strike | Wisdom
- Name
power
- Type
- number
- Description
- Attack power, e.g. 1000 | 2000 | 3000 | 4000 | 5000 | 6000 | 7000 | 8000 | 9000 | 10000 | 11000 | 12000
- Name
counter
- Type
- number
- Description
- Counter value, e.g. 1000 | 2000
- Name
color
- Type
- string
- Description
- Card color, e.g. Red | Blue | Green | Purple | Yellow | Black
- Name
class
- Type
- string
- Description
- Card class, e.g. Alabasta | Alabasta/Straw Hat Crew | ...
- Name
effect
- Type
- string
- Description
- Card effect description
- Name
set
- Type
- string
- Description
- Set name, e.g. Tournament Pack Vol.6 | Tournament Pack Vol.3 | ...
- Name
image
- Type
- string
- Description
- Card image URL