NetrunnerDB V3 API Documentation
New V3 API Documentation with examples!
New V3 API Documentation with examples!
GET /api/v3/public/card_cycles
GET /api/v3/public/card_cycles
Content-Type: application/json
Host: api-preview.netrunnerdb.com
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/card_cycles" -X GET
GET /api/v3/public/card_pools
GET /api/v3/public/card_pools
Content-Type: application/json
Host: api-preview.netrunnerdb.com
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/card_pools" -X GET
GET /api/v3/public/card_set_types
GET /api/v3/public/card_set_types
Content-Type: application/json
Host: api-preview.netrunnerdb.com
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/card_set_types" -X GET
GET /api/v3/public/card_sets
GET /api/v3/public/card_sets
Content-Type: application/json
Host: api-preview.netrunnerdb.com
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/card_sets" -X GET
GET /api/v3/public/card_sets?filter[card_cycle_id]=:card_cycle_id
Name | Description | Type |
---|---|---|
card_cycle_id required | Card cycle | string |
GET /api/v3/public/card_sets?filter[card_cycle_id]=%3Acard_cycle_id
Content-Type: application/json
Host: api-preview.netrunnerdb.com
filter={"card_cycle_id"=>":card_cycle_id"}
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/card_sets?filter[card_cycle_id]=%3Acard_cycle_id" -X GET
GET /api/v3/public/card_sets?filter[card_set_type_id]=:card_set_type_id
Name | Description | Type |
---|---|---|
card_set_type_id required | Card set type | string |
GET /api/v3/public/card_sets?filter[card_set_type_id]=%3Acard_set_type_id
Content-Type: application/json
Host: api-preview.netrunnerdb.com
filter={"card_set_type_id"=>":card_set_type_id"}
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/card_sets?filter[card_set_type_id]=%3Acard_set_type_id" -X GET
GET /api/v3/public/card_subtypes
GET /api/v3/public/card_subtypes
Content-Type: application/json
Host: api-preview.netrunnerdb.com
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/card_subtypes" -X GET
GET /api/v3/public/card_types
GET /api/v3/public/card_types
Content-Type: application/json
Host: api-preview.netrunnerdb.com
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/card_types" -X GET
GET /api/v3/public/card_types?filter[side_id]=:side_id
Name | Description | Type |
---|---|---|
side_id required | Side | string |
GET /api/v3/public/card_types?filter[side_id]=runner
Content-Type: application/json
Host: api-preview.netrunnerdb.com
filter={"side_id"=>"runner"}
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/card_types?filter[side_id]=runner" -X GET
GET /api/v3/public/cards
GET /api/v3/public/cards
Content-Type: application/json
Host: api-preview.netrunnerdb.com
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/cards" -X GET
200
Content-Type: application/vnd.api+json
{
"data": [
],
"links": {
"first": "http://api-preview.netrunnerdb.com/api/v3/public/cards?page%5Blimit%5D=100&page%5Boffset%5D=0",
"last": "http://api-preview.netrunnerdb.com/api/v3/public/cards?page%5Blimit%5D=100&page%5Boffset%5D=0"
}
}
The search syntax is the same between the Card
and Printing
endpoints aside from some fields that only exist in one or the other.
In constructed URLs for calls to the API, ensure that you URL Encode the value to the filter[search]
argument.
and
) or explicit conjuctions (and
and or
):
condition1 condition2 condition3
- gets all cards that meet the requirements of all three conditions|
( acts as or
) or &
.
text:"Runner is tagged"&meat
will return all cards with both Runner is tagged
and meat
in their text.text:"Runner is tagged"|meat
will return all cards with either Runner is tagged
or meat
in their text.Street
- gets all cards with “Street” in their namex:credit
- gets all cards with “credit” in their ability text (see below for the full list of accepted criteria)"Street Magic"
or x:"take all credits"
faction!anarch
), you can preface any condition with !
or -
to negate the whole condition.f:adam -card_type:resource
will return all non-resource Adam cards.f:apex !card_type:event
will return all non-event Apex cards.and
and or
conjunctions are supported by the Search Syntax.
t:identity and f:criminal
will return all Criminal Identities.(f:criminal or f:shaper) and t:identity
or (f:criminal or f:shaper) t:identity
will return all Criminal or Shaper Identities.and
or one using a space will have a higher precedence than an or
.
f:criminal or f:shaper and t:identity
and f:criminal or f:shaper t:identity
will return all Criminal cards and Shaper Identities.There are 5 types of fields in the Search Filter:
:
(an element in the array is an exact match) and !
(an element in the array is not an exact match) operators.
card_pool_ids:eternal|snapshot
returns all cards in the eternal or snapshot card pools.card_pool!snapshot
returns all cards not in the snapshot card pool.:
(match) and !
(negated match) operators. true
, false
, t
, f
, 1
, and 0
are all acceptable values.
advanceable:true
, advanceable:t
, and advanceable:1
will all return all results where advanceable is true.:
(match), !
(negated match), <
, <=
, >
, and >=
operators. Requires date in YYYY-MM-DD
format.
release_date<=2020-01-01
will return everything with a release date less than or equal to New Year’s Day, 2020.:
(match), !
(negated match), <
, <=
, >
, and >=
operators. Requires simple integer input.
cost:X
(case insensitive). an X value is treated as -1 behind the scenes.:
(LIKE) and !
(NOT LIKE) operators. Input is transformed to lower case and the %
decorations are added automatically, turning a query like title:street
into a SQL fragment like LOWER(stripped_title) LIKE '%street%
.
title:clearance
returns everything with clearance in the title.title!clearance
returns everything without clearance in the title.card_cycle_id
s for printings of a card.card_pool_id
s for a card pool containing a card.card_set_id
for a card, pulled in via printing.card_subtype_id
s for the card.restriction_id
and an Eternal Points value, joined by a hyphen, like eternal_points:eternal_points_list_22_09-2
.format_id
for any format containing the card at any time.restriction_id
restricting the card with a global penalty, like has_global_penalty:napd_mwl_1_1
.restriction_id
specifying the card as banned, like is_banned:standard_ban_list_22_08
.restriction_id
specifying the card as banned, like is_restricted:standard_mwl_3_4_b
.printing_id
for any printing of this card.restriction_id
specifying the card for any reason, like: restriction_id:eternal_points_list_22_09
snapshot_id
of a snapshot containing a card.restriction_id
and a Universal Faction Cost value, joined by a hyphen, like universal_faction_cost:napd_mwl_1_2-3
.advancement_cost
value for an agenda. Accepts positive integers and X (case-insensitive).card_type_id
of this card.faction_id
of this card.side_id
of the card.GET /api/v3/public/cards?filter[search]=:query
Name | Description | Type |
---|---|---|
query required | Query | string |
GET /api/v3/public/cards?filter[search]=gamble
Content-Type: application/json
Host: api-preview.netrunnerdb.com
filter={"search"=>"gamble"}
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/cards?filter[search]=gamble" -X GET
200
Content-Type: application/vnd.api+json
{
"data": [
],
"links": {
"first": "http://api-preview.netrunnerdb.com/api/v3/public/cards?filter%5Bsearch%5D=gamble&page%5Blimit%5D=100&page%5Boffset%5D=0",
"last": "http://api-preview.netrunnerdb.com/api/v3/public/cards?filter%5Bsearch%5D=gamble&page%5Blimit%5D=100&page%5Boffset%5D=0"
}
}
GET /api/v3/public/factions
GET /api/v3/public/factions
Content-Type: application/json
Host: api-preview.netrunnerdb.com
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/factions" -X GET
GET /api/v3/public/factions?filter[side_id]=:side_id
Name | Description | Type |
---|---|---|
side_id required | Side | string |
GET /api/v3/public/factions?filter[side_id]=runner
Content-Type: application/json
Host: api-preview.netrunnerdb.com
filter={"side_id"=>"runner"}
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/factions?filter[side_id]=runner" -X GET
GET /api/v3/public/factions?filter[is_mini]=:is_mini
Name | Description | Type |
---|---|---|
is_mini required | Is mini | boolean |
GET /api/v3/public/factions?filter[is_mini]=true
Content-Type: application/json
Host: api-preview.netrunnerdb.com
filter={"is_mini"=>"true"}
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/factions?filter[is_mini]=true" -X GET
GET /api/v3/public/formats
GET /api/v3/public/formats
Content-Type: application/json
Host: api-preview.netrunnerdb.com
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/formats" -X GET
GET /api/v3/public/illustrators
GET /api/v3/public/illustrators
Content-Type: application/json
Host: api-preview.netrunnerdb.com
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/illustrators" -X GET
GET /api/v3/public/printings
GET /api/v3/public/printings
Content-Type: application/json
Host: api-preview.netrunnerdb.com
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/printings" -X GET
200
Content-Type: application/vnd.api+json
{
"data": [
],
"links": {
"first": "http://api-preview.netrunnerdb.com/api/v3/public/printings?page%5Blimit%5D=100&page%5Boffset%5D=0",
"last": "http://api-preview.netrunnerdb.com/api/v3/public/printings?page%5Blimit%5D=100&page%5Boffset%5D=0"
}
}
GET /api/v3/public/printings?filter[distinct_cards]
GET /api/v3/public/printings?filter[distinct_cards]
Content-Type: application/json
Host: api-preview.netrunnerdb.com
filter={"distinct_cards"=>nil}
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/printings?filter[distinct_cards]" -X GET
200
Content-Type: application/vnd.api+json
{
"data": [
],
"links": {
"first": "http://api-preview.netrunnerdb.com/api/v3/public/printings?filter%5Bdistinct_cards%5D=&page%5Blimit%5D=100&page%5Boffset%5D=0",
"last": "http://api-preview.netrunnerdb.com/api/v3/public/printings?filter%5Bdistinct_cards%5D=&page%5Blimit%5D=100&page%5Boffset%5D=0"
}
}
The search syntax is the same between the Card
and Printing
endpoints aside from some fields that only exist in one or the other.
In constructed URLs for calls to the API, ensure that you URL Encode the value to the filter[search]
argument.
and
) or explicit conjuctions (and
and or
):
condition1 condition2 condition3
- gets all cards that meet the requirements of all three conditions|
( acts as or
) or &
.
text:"Runner is tagged"&meat
will return all cards with both Runner is tagged
and meat
in their text.text:"Runner is tagged"|meat
will return all cards with either Runner is tagged
or meat
in their text.Street
- gets all cards with “Street” in their namex:credit
- gets all cards with “credit” in their ability text (see below for the full list of accepted criteria)"Street Magic"
or x:"take all credits"
faction!anarch
), you can preface any condition with !
or -
to negate the whole condition.f:adam -card_type:resource
will return all non-resource Adam cards.f:apex !card_type:event
will return all non-event Apex cards.and
and or
conjunctions are supported by the Search Syntax.
t:identity and f:criminal
will return all Criminal Identities.(f:criminal or f:shaper) and t:identity
or (f:criminal or f:shaper) t:identity
will return all Criminal or Shaper Identities.and
or one using a space will have a higher precedence than an or
.
f:criminal or f:shaper and t:identity
and f:criminal or f:shaper t:identity
will return all Criminal cards and Shaper Identities.There are 5 types of fields in the Search Filter:
:
(an element in the array is an exact match) and !
(an element in the array is not an exact match) operators.
card_pool_ids:eternal|snapshot
returns all cards in the eternal or snapshot card pools.card_pool!snapshot
returns all cards not in the snapshot card pool.:
(match) and !
(negated match) operators. true
, false
, t
, f
, 1
, and 0
are all acceptable values.
advanceable:true
, advanceable:t
, and advanceable:1
will all return all results where advanceable is true.:
(match), !
(negated match), <
, <=
, >
, and >=
operators. Requires date in YYYY-MM-DD
format.
release_date<=2020-01-01
will return everything with a release date less than or equal to New Year’s Day, 2020.:
(match), !
(negated match), <
, <=
, >
, and >=
operators. Requires simple integer input.
cost:X
(case insensitive). an X value is treated as -1 behind the scenes.:
(LIKE) and !
(NOT LIKE) operators. Input is transformed to lower case and the %
decorations are added automatically, turning a query like title:street
into a SQL fragment like LOWER(stripped_title) LIKE '%street%
.
title:clearance
returns everything with clearance in the title.title!clearance
returns everything without clearance in the title.card_pool_id
s for a card pool containing a card.card_subtype_id
s for the card.restriction_id
and an Eternal Points value, joined by a hyphen, like eternal_points:eternal_points_list_22_09-2
.format_id
for any format containing the card at any time.restriction_id
restricting the card with a global penalty, like has_global_penalty:napd_mwl_1_1
.illustrator_id
for an illustrator for the printing.restriction_id
specifying the card as banned, like is_banned:standard_ban_list_22_08
.restriction_id
specifying the card as banned, like is_restricted:standard_mwl_3_4_b
.restriction_id
specifying the card for any reason, like: restriction_id:eternal_points_list_22_09
snapshot_id
of a snapshot containing a card.restriction_id
and a Universal Faction Cost value, joined by a hyphen, like universal_faction_cost:napd_mwl_1_2-3
.advancement_cost
value for an agenda. Accepts positive integers and X (case-insensitive).card_cycle_id
for a printing.card_id
for a printing.card_set_id
for printing.card_type_id
of this card.faction_id
of this card.side_id
of the card.GET /api/v3/public/printings?filter[search]=:query
Name | Description | Type |
---|---|---|
query required | Query | string |
GET /api/v3/public/printings?filter[search]=flavor%3Aboi
Content-Type: application/json
Host: api-preview.netrunnerdb.com
filter={"search"=>"flavor:boi"}
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/printings?filter[search]=flavor%3Aboi" -X GET
200
Content-Type: application/vnd.api+json
{
"data": [
],
"links": {
"first": "http://api-preview.netrunnerdb.com/api/v3/public/printings?filter%5Bsearch%5D=flavor%3Aboi&page%5Blimit%5D=100&page%5Boffset%5D=0",
"last": "http://api-preview.netrunnerdb.com/api/v3/public/printings?filter%5Bsearch%5D=flavor%3Aboi&page%5Blimit%5D=100&page%5Boffset%5D=0"
}
}
GET /api/v3/public/restrictions
GET /api/v3/public/restrictions
Content-Type: application/json
Host: api-preview.netrunnerdb.com
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/restrictions" -X GET
GET /api/v3/public/rulings
GET /api/v3/public/rulings
Content-Type: application/json
Host: api-preview.netrunnerdb.com
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/rulings" -X GET
GET /api/v3/public/rulings?filter[nsg_rules_team_verified]=:nsg_rules_team_verified
Name | Description | Type |
---|---|---|
nsg_rules_team_verified required | Nsg rules team verified | boolean |
GET /api/v3/public/rulings?filter[nsg_rules_team_verified]=true
Content-Type: application/json
Host: api-preview.netrunnerdb.com
filter={"nsg_rules_team_verified"=>"true"}
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/rulings?filter[nsg_rules_team_verified]=true" -X GET
GET /api/v3/public/rulings?filter[card_id]=:card_id
Name | Description | Type |
---|---|---|
card_id required | Card | string |
GET /api/v3/public/rulings?filter[card_id]=hedge_fund
Content-Type: application/json
Host: api-preview.netrunnerdb.com
filter={"card_id"=>"hedge_fund"}
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/rulings?filter[card_id]=hedge_fund" -X GET
GET /api/v3/public/sides
GET /api/v3/public/sides
Content-Type: application/json
Host: api-preview.netrunnerdb.com
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/sides" -X GET
GET /api/v3/public/snapshots
GET /api/v3/public/snapshots
Content-Type: application/json
Host: api-preview.netrunnerdb.com
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/snapshots" -X GET
GET /api/v3/public/snapshots?filter[active]=:active
Name | Description | Type |
---|---|---|
card_cycle_id required | Card cycle | string |
GET /api/v3/public/snapshots?filter[active]=true
Content-Type: application/json
Host: api-preview.netrunnerdb.com
filter={"active"=>"true"}
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/snapshots?filter[active]=true" -X GET
GET /api/v3/public/snapshots?filter[format_id]=:format_id
Name | Description | Type |
---|---|---|
card_cycle_id required | Card cycle | string |
GET /api/v3/public/snapshots?filter[format_id]=startup
Content-Type: application/json
Host: api-preview.netrunnerdb.com
filter={"format_id"=>"startup"}
curl -g "https://api-preview.netrunnerdb.com/api/v3/public/snapshots?filter[format_id]=startup" -X GET