# Deck of Cards API

Category: [Fun and games](https://free-web-services.com/web-services/other/fun/)  
Page: https://free-web-services.com/web-services/other/fun/deck-of-cards-api.html  
Documentation: https://deckofcardsapi.com/

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 key: Not needed
- 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

Example request:

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

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

