Skip to content
API v2 docs

Widgets

AI chat widget

GET

https://api.datasportsapi.com/embed/chat

Pro and up

Markdown copy

The AI assistant for your visitors, on Pro and up: a round button in a corner of your page opens a chat panel where people ask about live scores, fixtures and results, tables, lineups, statistics, teams and players, and the answers come from this API’s data, with cards for matches, tables and players. Pro includes 10,000 messages a month for the account; Business and Enterprise have no monthly cap, only a guard against sudden floods. Messages are counted on their own and never take from your request quota. Its persona lives on the dashboard, per widget key (Widgets, then Chat): the assistant’s name and greeting, its tone and language, colours and logo, your site’s address (the one link it ever gives, when someone asks which site this is), the button’s text and icon (the chat bubble, your logo or an image of your own), and the sports and leagues it covers. Leave the greeting empty and each visitor is greeted in their own language. On the element itself: data-position puts the button on the right or the left; data-open is auto (open from 768 px wide screens up), open or closed, and once a visitor opens or closes it, their choice is kept; data-label and data-label-short replace the button’s text set on the dashboard; data-mobile-offset lifts the button on phones by that many pixels; data-theme is auto, light or dark; data-lang is en, tr, es, de, fr or pt, and without it the visitor’s own language is used.

Like the tracker, the chat is a page on our API host shown in a frame, and it is drawn only on the site your widget key names. It sticks to sport. Betting odds stay out unless you switch them on for the key (Business and up), and even then they appear as information, never as tips.

The errors every /v2 call shares (key, plan, quota, rate) are listed under error codes.

Example
<div data-widget="chat" data-position="right"></div>
<script src="https://api.datasportsapi.com/widgets/v1.js" data-key="pk_live_…" async></script>