Fun and games

Deck of Cards API

by deckofcardsapi.com

Fun and games Added on October 31st, 2026 Checked and working on November 8th, 2026
Visit deckofcardsapi.com →

What it does

The Deck of Cards API simulates decks of playing cards: shuffle one or more decks, draw cards, put them into named piles, shuffle piles and return cards to the deck. Each card comes with its value, suit and an image. Handy for card games and programming exercises. Responses are JSON. Free, no key needed.
  • API
  • HTTP-GET
  • JSON
  • REST

At a glance

API key
Not needed · More APIs with no key
Pricing
Free, no key needed.
From the browser
Yes (CORS)
Formats
JSON
Interface
REST, HTTP-GET
Provider
deckofcardsapi.com
Last checked
Working on November 8th, 2026

More information: https://deckofcardsapi.com/

Is this your service? Show that it is listed

Put this badge on your website or in your README; it links to this page. About the badge

Listed on Free Web Services

deckofcardsapi.com
Deck of Cards API

Example request

curl

curl 'https://deckofcardsapi.com/api/deck/new/draw/?count=2'

JavaScript

const response = await fetch("https://deckofcardsapi.com/api/deck/new/draw/?count=2");
const data = await response.json();
console.log(data);

Python

import requests

response = requests.get(
    "https://deckofcardsapi.com/api/deck/new/draw/?count=2",
    timeout=30,
)
print(response.json())

The JavaScript works in a web page as well as in Node.js 18 or newer.

Did it work for you?

Tell us what you found when you tried Deck of Cards API.