HTTP API
Lixiangqi exposes a RESTish HTTP/JSON API that you are welcome to use. Read the HTTP API documentation.
Embed Lixiangqi TV in your site
Add the following HTML to your site:
Parameters:
- boardTheme: xiangqi
- pieceSet: default-wood, xiangqi-wudang, xiangqi-paper-traditional, xiangqi-international, xiangqi-western, xiangqi-white, xiangqi-white-international, celestial-lacquer, qing-jade
- uiTheme: light, dark, system
You can also show a specific TV channel by adding its key to the URL, corresponding to the channels available at https://lixiangqi.com/tv. If no key is included, the leading ranked Xiangqi game will be shown.
Embed the daily puzzle in your site
Add the following HTML to your site:
Parameters:
- boardTheme: xiangqi
- pieceSet: default-wood, xiangqi-wudang, xiangqi-paper-traditional, xiangqi-international, xiangqi-western, xiangqi-white, xiangqi-white-international, celestial-lacquer, qing-jade
- uiTheme: light, dark, system
The text is automatically translated to your visitor's language.
Embed a Xiangqi analysis in your site
Create a study, then click the share button to get the HTML code for the current chapter.
Parameters:
- boardTheme: xiangqi
- pieceSet: default-wood, xiangqi-wudang, xiangqi-paper-traditional, xiangqi-international, xiangqi-western, xiangqi-white, xiangqi-white-international, celestial-lacquer, qing-jade
- uiTheme: light, dark, system
The text is automatically translated to your visitor's language.
Embed a Xiangqi game in your site
On a game analysis page, click the FEN & PGN tab at the bottom, then "Embed in your website".
Parameters:
- boardTheme: xiangqi
- pieceSet: default-wood, xiangqi-wudang, xiangqi-paper-traditional, xiangqi-international, xiangqi-western, xiangqi-white, xiangqi-white-international, celestial-lacquer, qing-jade
- uiTheme: light, dark, system
The text is automatically translated to your visitor's language.
Embed a broadcast in your site
On a broadcast page, select the embed iframe code, then optionally add query parameters to customize the appearance.
Parameters:
- boardTheme: xiangqi
- pieceSet: default-wood, xiangqi-wudang, xiangqi-paper-traditional, xiangqi-international, xiangqi-western, xiangqi-white, xiangqi-white-international, celestial-lacquer, qing-jade
- uiTheme: light, dark, system
The text is automatically translated to your visitor's language.
Embed an analysis board
Embeds the Xiangqi analysis board as a standalone viewer.
Parameters:
- boardTheme: xiangqi
- pieceSet: default-wood, xiangqi-wudang, xiangqi-paper-traditional, xiangqi-international, xiangqi-western, xiangqi-white, xiangqi-white-international, celestial-lacquer, qing-jade
- uiTheme: light, dark, system
- fen: custom initial position as a URL-encoded FEN
- color: initial orientation, either black or red
The text is automatically translated to your visitor's language.