Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: Battle.net Hearthstone Decks API
version: 1.0.0
description: Hearthstone API from Blizzard Entertainment (Activision Blizzard, part of Microsoft Gaming), converted field-for-field from the machine-readable API reference the Battle.net Community Developer Portal serves at community.developer.battle.net/api/pages/content/documentation/*.json (saved verbatim in openapi/_original/battle-net-reference/). Response schemas are not published in that reference.
contact:
name: Battle.net Community Developer Portal
url: https://community.developer.battle.net/
termsOfService: https://www.blizzard.com/en-us/legal/a2aefd3f-87e1-4a35-a38d-e0f7a8f42a00/blizzard-developer-api-terms-of-use
x-generated-from: provider-reference-json
x-derived-from:
- openapi/_original/battle-net-reference/hearthstone-game-data-apis.json
x-derived: '2026-11-04'
servers:
- url: https://{region}.api.blizzard.com
description: Global regions (documented host format {region}.api.blizzard.com)
variables:
region:
enum:
- us
- eu
- kr
- tw
default: us
security:
- oauth2: []
tags:
- name: Decks
paths:
/hearthstone/deck:
get:
operationId: getDeckByCode
summary: Get deck by code
description: Finds a deck by deck code. For more information, see the Retrieving Decks Guide.
tags:
- Decks
x-source: https://community.developer.battle.net/documentation/hearthstone/game-data-apis
parameters:
- name: locale
in: query
required: false
description: The locale to reflect in localized data.
schema:
type: string
default: en_US
- name: code
in: query
required: false
description: A code that identifies a deck. You can copy one from the game or various Hearthstone websites. The value should be URL encoded.
schema:
type: string
default: AAECAQcG+wyd8AKS+AKggAOblAPanQMMS6IE/web8wLR9QKD+wKe+wKz/AL1gAOXlAOalAOSnwMA
- name: ids
in: query
required: false
description: A list of card IDs representing cards in the deck. Ignored if a <strong>code</strong> parameter is also present.
schema:
type: string
- name: hero
in: query
required: false
description: The card ID for the hero of the deck. Used along with <strong>ids</strong>. If not present, the API will attempt to add a default hero and class based on the cards in the deck.
schema:
type: string
responses:
'200':
description: Successful response (response schema not published in the reference).
components:
securitySchemes:
oauth2:
type: oauth2
description: Documented at https://community.developer.battle.net/documentation/guides/using-oauth
flows:
clientCredentials:
tokenUrl: https://oauth.battle.net/token
scopes: {}
authorizationCode:
authorizationUrl: https://oauth.battle.net/authorize
tokenUrl: https://oauth.battle.net/token
scopes:
openid: OpenID Connect
wow.profile: World of Warcraft profile
sc2.profile: StarCraft II profile
d3.profile: Diablo III profile