競
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/draw | Shuffles a new 52-card deck and draws cards from it. |
| GET | /deckofcards/newDeck | Creates an unshuffled 52-card deck and returns its id. |
| GET | /deckofcards/shuffledDeck | Creates one or more shuffled decks, optionally with the jokers, and returns the id. |
draw
GET
/v1/deckofcards/drawShuffles a new 52-card deck and draws cards from it.
scope social:read1 unit
Parameters
cardCountinteger | Cards to draw, from 1 to 52. default 5e.g. 2 |
tunnelstring | 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. |
proxystring | 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. |
profileIdstring | 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
cards | Card[] |
code | string |
image | string |
suit | string |
value | string |
deckId | string |
remaining | integer (int64) |
curl "https://api.hoshime.com/v1/deckofcards/draw?cardCount=2" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/deckofcards/draw?cardCount=2", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/deckofcards/draw?cardCount=2", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "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/newDeckCreates an unshuffled 52-card deck and returns its id.
scope social:read1 unit
Parameters
tunnelstring | 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. |
proxystring | 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. |
profileIdstring | 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
deckId | string |
remaining | integer (int64) |
shuffled | boolean |
curl "https://api.hoshime.com/v1/deckofcards/newDeck" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/deckofcards/newDeck", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/deckofcards/newDeck", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "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/shuffledDeckCreates one or more shuffled decks, optionally with the jokers, and returns the id.
scope social:read1 unit
Parameters
decksinteger | Number of 52-card decks in the shoe, from 1 to 5. default 1e.g. 1 |
jokersboolean | Add the two jokers to each deck. |
tunnelstring | 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. |
proxystring | 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. |
profileIdstring | 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
deckId | string |
remaining | integer (int64) |
shuffled | boolean |
curl "https://api.hoshime.com/v1/deckofcards/shuffledDeck?decks=1" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/deckofcards/shuffledDeck?decks=1", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/deckofcards/shuffledDeck?decks=1", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "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 } }