Developer API Β· REST Β· Real-Time
Betloy Conversion API β Integrate Bet Code Conversion into Your Platform
A powerful, reliable API for businesses and developers to convert bet codes programmatically across 100+ bookmakers
# Convert a bet code from Bet9ja to Sportybet curl -X POST https://www.betloy.com/api/v1/convert \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "booking_code": "B3US96U", "from_bookie_id": 1, "to_bookie_id": 2 }'
// npm install @betloy/sdk const { Betloy } = require('@betloy/sdk'); const betloy = new Betloy({ apiKey: process.env.BETLOY_API_KEY }); const result = await betloy.convert({ booking_code: 'B3US96U', from_bookie_id: 1, to_bookie_id: 2, }); console.log(result.data.converted_code); // β "SP9KQM2" console.log(result.legs); // β 5 console.log(result.flagged); // β []
# pip install betloy from betloy import Betloy client = Betloy(api_key=os.environ['BETLOY_API_KEY']) result = client.convert( booking_code='B3US96U', from_bookie_id=1, to_bookie_id=2, ) print(result.data.converted_code) # β "SP9KQM2" print(result.legs) # β 5 print(result.flagged) # β []
// composer require betloy/sdk use Betloy\Client; $betloy = new Client(getenv('BETLOY_API_KEY')); $result = $betloy->convert([ 'booking_code' => 'B3US96U', 'from_bookie_id' => 1, 'to_bookie_id' => 2, ]); echo $result->data->converted_code; // β "SP9KQM2"
Request body
{
"booking_code": "B3US96U",
"from_bookie_id": 1,
"to_bookie_id": 2
}
Response (200 OK)
{
"success": true,
"data": {
"conversion_id": "conv_123456",
"original_code": "B3US96U",
"converted_code": "SP9KQM2",
"from_bookie": "Bet9ja",
"to_bookie": "Sportybet",
"total_odds": 68.40,
"number_of_events": 5,
"status": "completed"
},
"message": "Conversion successful"
}
Reference
Endpoints
All endpoints are POST or GET against https://www.betloy.com/api/v1/. JSON in, JSON out.
| Method | Endpoint | Purpose |
|---|---|---|
| POST | /convert | Convert a bet code from one bookmaker to another. Returns the new code, leg count, combined odds, and any flagged (unmatchable) legs. |
| POST | /scan | Scan a code across every supported bookmaker and return ranked best-odds matches. Same engine as the Odds Scanner UI. |
| POST | /analyze | Run a code through the AI Bet Analyzer. Returns Risk Score, Win Probability, Recommended Stake. |
| POST | /trim | Apply Risk Trimmer transformations (drop correct-score, soften 1X2, step over-goals down). Returns the trimmed code and the per-leg changelog. |
| POST | /decode | Decode a code into a structured leg list (read-only). Same engine as the Bet Viewer UI. |
| GET | /bookmakers | List every supported bookmaker with its key, region, and supported markets. Useful for populating dropdowns in your own UI. |
| GET | /usage | Return the current month's credit usage and remaining allowance for your API key. |
| GET | /health | Liveness check. Returns 200 if the API is up. No auth required. |
Authentication
Bearer Token in the Authorization Header
All authenticated endpoints expect an Authorization header of the form Bearer YOUR_API_KEY. Generate a key in your account dashboard β keys are scoped to your account and inherit your plan's rate limits.
Never expose your key in client-side code (browser JavaScript, mobile app bundles). For public-facing apps, use the Conversion Widget or proxy requests through your own backend so the key stays server-side.
What To Expect
Rate Limits & Status Codes
When to Use the API
Six developer scenarios where direct API access beats the website or widget.
You run a tipster site at volume
Posting 50+ codes a day across multiple bookmakers? The API converts in bulk via your CMS pipeline β no manual rework, no widget clicks.
For lower volume β use the widgetYou're building a mobile app
Native iOS/Android apps can't easily embed a web widget. Hit the API directly from your backend, render results in your own UI components.
Talk to us about SDKsYou're running a betting bot
Discord bots, Telegram bots, custom Slack integrations β the API is the right surface. Get JSON, render to your platform's message format.
Or use our Telegram botYou're doing analytics on bet codes
Need to decode and analyze hundreds of historical codes? The /decode endpoint plus /analyze in batch lets you build your own backtest tooling.
You're an affiliate marketing platform
Use /scan to programmatically surface the best-odds bookmaker per fixture for your affiliates β drive higher commissions on each conversion.
You need full UX control
The widget is fast but opinionated. The API is stateless β you decide everything: layout, branding, error handling, what to do with flagged legs.
Get an enterprise quoteBookmakers Your API Calls Can Convert To
Recommended Bookmakers
Every bookmaker accessible via the API also has a Betloy affiliate offer your end users can claim. Pass an affiliate ID in your conversion request to attribute signups.
As a Betloy API partner, you can pass an affiliate_id on conversion requests to attribute signups. Find the full list of bonuses on our promo codes hub.
All 100+ Bookmakers the Betloy API Supports
The /convert endpoint supports every bookmaker on this list β pass the source/destination as query params and we return a ready-to-stake code.
π³π¬ Nigeria & West Africa
π°πͺ East Africa
πΏπ¦ South & Southern Africa
π International & Global
Don't see your bookmaker? Request it β
Why Build On The API
The Same Engine That Powers The Whole Site
Every Betloy product β the website converter, the Telegram bot, the conversion widget, the embeddable Risk Trimmer and AI Analyzer β runs on the same backend. The API is that backend, exposed for direct access. When we improve the conversion accuracy or add a new bookmaker, every API consumer gets the upgrade automatically.
That includes the 88.72% conversion success rate across supported bookmaker pairs, the multi-sport accumulator handling, the leg-flagging behaviour (when a market can't be matched, we tell you instead of silently substituting), and the per-bookmaker market mapping that we update whenever a supported book changes its code format.
If you're building anything that touches African bet codes β tipster sites, mobile apps, analytics pipelines, custom bots, affiliate platforms β the API is the most direct path. The widget wraps it for no-code embeds; the Telegram bot wraps it for chat. The API itself gives you everything else.
API FAQs
Everything we get asked about the Betloy REST API. If your question isn't here, drop us a line.