API Resources
GET /Cards/{Set}/{Card}
Supported formats: json, image, txt
Returns a single card that matches the given set and number
Valid Query Parameters are:
format : String : 'json', 'csv', or 'txt' (defaults to 'json')
pretty : Boolean : If true, the json will be human readable
face : Boolean : If true, returns the back art of the image, if it exists
For example: https://api.swu-db.com/cards/sor/10
Returns Darth Vader - Dark Lord of the Sith
https://api.swu-db.com/cards/sor/82?format=image
Redirects to the image of Emperor's Royal Guard
GET /Cards/{Set}
Supported formats: json, csv
Returns all cards in the given set
(This is equivalent to GET /cards/search?q=set:sor)
Valid Query Parameters are:
format : String : 'json' or 'csv'
pretty : Boolean : If true, the json will be human readable
order : String : The column you wish to order results by
dir : String : The direction of the sort (defaults to 'asc')
For example: https://api.swu-db.com/cards/sor
Returns all cards in Spark of Rebellion
GET /Cards/Search
Supported formats: json, csv
Returns a list of cards that match the given search
Valid Query Parameters are:
q (required) : String : The search query to perform
format : String : 'json' or 'csv'
pretty : Boolean : If true, the json will be human readable
order : String : The column you wish to order results by
dir : String : The direction of the sort (defaults to 'asc')
Valid input for order:
'name', 'setnumber', 'power', 'cost', 'hp', 'type', 'rarity', 'traits', 'aspects', 'artist', 'arenas',
For example: https://api.swu-db.com/cards/search?q=set:sor&format=csv&order=setnumber
Retrieves all cards in the SOR set in CSV format sorted by set number
https://api.swu-db.com/cards/search?q=c=3&pretty=true
Retrieves all cards with a Cost of 3 in human readable JSON format
GET /catalog/card-names
Supported format: json
Returns a list of all unique card names
Valid Query Parameters are:
format : String : 'json' is only currently supported
pretty : Boolean : If true, the json will be human readable
subtitles : Boolean : If true, card names will include the subtitles appended to the name (This is the default behavior)
For example: https://api.swu-db.com/catalog/card-names?subtitles=false
Retrieves all unique card names, but ignores subtitles
For example: https://api.swu-db.com/catalog/card-names
Retrieves all unique card names with their subtitles
GET /catalog/traits
Supported format: json
Returns a list of all traits
Valid Query Parameters are:
format : String : 'json' is only currently supported
pretty : Boolean : If true, the json will be human readable
For example: https://api.swu-db.com/catalog/traits
Retrieves all traits
GET /catalog/keywords
Supported format: json
Returns a list of all keywords
Valid Query Parameters are:
format : String : 'json' is only currently supported
pretty : Boolean : If true, the json will be human readable
For example: https://api.swu-db.com/catalog/keywords
Retrieves all keywords
GET /catalog/artist-names
Supported format: json
Returns a list of all artists
Valid Query Parameters are:
format : String : 'json' is only currently supported
pretty : Boolean : If true, the json will be human readable
For example: https://api.swu-db.com/catalog/artist-names
Retrieves all artists
GET /catalog/powers
Supported format: json
Returns a list of all powers
Valid Query Parameters are:
format : String : 'json' is only currently supported
pretty : Boolean : If true, the json will be human readable
For example: https://api.swu-db.com/catalog/powers
Retrieves all powers
GET /catalog/hps
Supported format: json
Returns a list of all HPs
Valid Query Parameters are:
format : String : 'json' is only currently supported
pretty : Boolean : If true, the json will be human readable
For example: https://api.swu-db.com/catalog/hps
Retrieves all HPs