HTTP API
HungKings exposes a RESTish HTTP/JSON API that you are welcome to use. Point your client at this server. The embed endpoints documented below work as shown.
Embed HungKings TV in your site
Add the following HTML to your site:
Parameters:
- theme: blue, brown, green, ic, purple
- pieceSet: cburnett, merida, alpha, pirouetti, chessnut, chess7, reillycraig, companion, riohacha, kosal, leipzig, fantasy, spatial, celtic, california, caliente, pixel, firi, rhosgfx, maestro, fresca, cardinal, gioco, tatiana, staunty, cooke, monarchy, papercut, governor, dubrovny, shahi-ivory-brown, icpieces, mpchess, kiwen-suwi, totoy, horsey, anarcandy, xkcd, shapes, letter, disguised
- bg: light, dark, system
You can also show the channel for a specific variant or time control by adding the channel key to the URL, corresponding to the channels available at https://hungkings.com/tv. If not included, the top rated game will be shown.
Embed the daily puzzle in your site
Add the following HTML to your site:
Parameters:
- theme: blue, brown, green, ic, purple
- pieceSet: cburnett, merida, alpha, pirouetti, chessnut, chess7, reillycraig, companion, riohacha, kosal, leipzig, fantasy, spatial, celtic, california, caliente, pixel, firi, rhosgfx, maestro, fresca, cardinal, gioco, tatiana, staunty, cooke, monarchy, papercut, governor, dubrovny, shahi-ivory-brown, icpieces, mpchess, kiwen-suwi, totoy, horsey, anarcandy, xkcd, shapes, letter, disguised
- bg: light, dark, system
The text is automatically translated to your visitor's language.
Embed a chess analysis in your site
Create a study, then click the share button to get the HTML code for the current chapter.
Parameters:
- theme: blue, brown, green, ic, purple
- pieceSet: cburnett, merida, alpha, pirouetti, chessnut, chess7, reillycraig, companion, riohacha, kosal, leipzig, fantasy, spatial, celtic, california, caliente, pixel, firi, rhosgfx, maestro, fresca, cardinal, gioco, tatiana, staunty, cooke, monarchy, papercut, governor, dubrovny, shahi-ivory-brown, icpieces, mpchess, kiwen-suwi, totoy, horsey, anarcandy, xkcd, shapes, letter, disguised
- bg: light, dark, system
The text is automatically translated to your visitor's language.
Embed a chess game in your site
On a game analysis page, click the FEN & PGN tab at the bottom, then "Embed in your website".
Parameters:
- theme: blue, brown, green, ic, purple
- pieceSet: cburnett, merida, alpha, pirouetti, chessnut, chess7, reillycraig, companion, riohacha, kosal, leipzig, fantasy, spatial, celtic, california, caliente, pixel, firi, rhosgfx, maestro, fresca, cardinal, gioco, tatiana, staunty, cooke, monarchy, papercut, governor, dubrovny, shahi-ivory-brown, icpieces, mpchess, kiwen-suwi, totoy, horsey, anarcandy, xkcd, shapes, letter, disguised
- bg: light, dark, system
The text is automatically translated to your visitor's language.
Embed an analysis board
Embeds the fully-featured HungKings analysis board with stockfish evaluation, opening explorer and tablebase.
Parameters:
- theme: blue, brown, green, ic, purple
- pieceSet: cburnett, merida, alpha, pirouetti, chessnut, chess7, reillycraig, companion, riohacha, kosal, leipzig, fantasy, spatial, celtic, california, caliente, pixel, firi, rhosgfx, maestro, fresca, cardinal, gioco, tatiana, staunty, cooke, monarchy, papercut, governor, dubrovny, shahi-ivory-brown, icpieces, mpchess, kiwen-suwi, totoy, horsey, anarcandy, xkcd, shapes, letter, disguised
- bg: light, dark, system
- fen: custom initial position as a FEN with underscores instead of spaces
- color: initial orientation, either black or white
The text is automatically translated to your visitor's language.