Skip to content

Deck of Cards API

3 endpointsSports & GamingGlobalsocial:read3 real examples

Creates new or shuffled playing card decks, optionally with jokers, and draws cards from a shuffled deck.

View as Markdown
GET/deckofcards/drawShuffles a new 52-card deck and draws cards from it.
GET/deckofcards/newDeckCreates an unshuffled 52-card deck and returns its id.
GET/deckofcards/shuffledDeckCreates one or more shuffled decks, optionally with the jokers, and returns the id.

draw

GET/v1/deckofcards/draw

Shuffles a new 52-card deck and draws cards from it.

scope social:read1 unit

Parameters

cardCount
integer
Cards to draw, from 1 to 52.
default 5e.g. 2
tunnel
string
Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy.
proxy
string
Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it.
profileId
string
Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only.

Response data

7 fields
cardsCard[]
codestring
imagestring
suitstring
valuestring
deckIdstring
remaininginteger (int64)
curl "https://api.hoshime.com/v1/deckofcards/draw?cardCount=2" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "data": {
    "cards": [
      {
        "code": "5S",
        "image": "https://deckofcardsapi.com/static/img/5S.png",
        "suit": "SPADES",
        "value": "5"
      },
      {
        "code": "KS",
        "image": "https://deckofcardsapi.com/static/img/KS.png",
        "suit": "SPADES",
        "value": "KING"
      }
    ],
    "deckId": "soj6qewhobe3",
    "remaining": 50
  },
  "meta": {
    "cached": false,
    "endpoint": "draw",
    "fetchedAt": "2026-11-06T09:41:00Z",
    "platform": "deckofcards",
    "requestId": "req_2Xb9kQ…",
    "units": 1
  }
}

newDeck

GET/v1/deckofcards/newDeck

Creates an unshuffled 52-card deck and returns its id.

scope social:read1 unit

Parameters

tunnel
string
Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy.
proxy
string
Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it.
profileId
string
Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only.

Response data

3 fields
deckIdstring
remaininginteger (int64)
shuffledboolean
curl "https://api.hoshime.com/v1/deckofcards/newDeck" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "data": {
    "deckId": "sll1m7hy45cx",
    "remaining": 52,
    "shuffled": false
  },
  "meta": {
    "cached": false,
    "endpoint": "newDeck",
    "fetchedAt": "2026-11-06T09:41:00Z",
    "platform": "deckofcards",
    "requestId": "req_2Xb9kQ…",
    "units": 1
  }
}

shuffledDeck

GET/v1/deckofcards/shuffledDeck

Creates one or more shuffled decks, optionally with the jokers, and returns the id.

scope social:read1 unit

Parameters

decks
integer
Number of 52-card decks in the shoe, from 1 to 5.
default 1e.g. 1
jokers
boolean
Add the two jokers to each deck.
tunnel
string
Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy.
proxy
string
Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it.
profileId
string
Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only.

Response data

3 fields
deckIdstring
remaininginteger (int64)
shuffledboolean
curl "https://api.hoshime.com/v1/deckofcards/shuffledDeck?decks=1" \
  -H "Authorization: Bearer $HOSHIME_TOKEN"
200 Real response
{
  "data": {
    "deckId": "ejivt6vfvo8n",
    "remaining": 52,
    "shuffled": true
  },
  "meta": {
    "cached": false,
    "endpoint": "shuffledDeck",
    "fetchedAt": "2026-11-06T09:41:00Z",
    "platform": "deckofcards",
    "requestId": "req_2Xb9kQ…",
    "units": 1
  }
}
esc
↑↓ move↵ open