You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(deeplinks): update batch endpoint docs to match current implementation
- Batch returns redirect paths (/api/v1/deeplink/{id}), not direct URLs
- Accepts both odds IDs and opportunity hash_ids
- Max batch size is 500 (was 50/100)
- Unresolvable IDs return null instead of being omitted
- Updated response schema, code examples, and OpenAPI spec
- Updated supported sportsbooks table (21 of 28 supported)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Generate sportsbook deep links from opportunity hash IDs. Deep links take users directly to the relevant bet slip or event page on a sportsbook's website, enabling one-click bet placement from your application.
9
+
Generate sportsbook deep links from odds IDs or opportunity hash IDs. Deep links take users directly to the relevant event page on a sportsbook's website, enabling one-click bet placement from your application.
10
10
11
11
## Endpoints
12
12
13
13
| Method | Path | Description |
14
14
|--------|------|-------------|
15
15
|`GET`|`/api/v1/deeplinks`| Get deep links for a single opportunity |
16
-
|`POST`|`/api/v1/deeplinks/batch`| Get deep links for up to 100 opportunities|
16
+
|`POST`|`/api/v1/deeplinks/batch`| Get deep links for up to 500 IDs|
17
17
|`GET`|`/api/v1/deeplink/{id}`| Redirect to a sportsbook (public, no auth) |
18
18
19
19
## Authentication
@@ -23,7 +23,7 @@ Requires API key for `GET /deeplinks` and `POST /deeplinks/batch`. Available to
23
23
The redirect endpoint (`GET /deeplink/{id}`) is **public** and does not require authentication — the opaque ID prevents enumeration.
24
24
25
25
<Callouttype="info">
26
-
Deep links are generated from opportunity data. The `id` parameter is the `hash_id` field returned by the [+EV](/en/api-reference/opportunities-ev), [Arbitrage](/en/api-reference/opportunities-arbitrage), [Middles](/en/api-reference/opportunities-middles), and [Low Hold](/en/api-reference/opportunities-low-hold) endpoints.
26
+
The `id` parameter accepts both **odds IDs** (from `/odds`, `/odds/best`) and **opportunity hash IDs** (from [+EV](/en/api-reference/opportunities-ev), [Arbitrage](/en/api-reference/opportunities-arbitrage), [Middles](/en/api-reference/opportunities-middles), and [Low Hold](/en/api-reference/opportunities-low-hold) endpoints). Odds IDs resolve to market-specific links; opportunity hash IDs resolve to event-level links.
Returns deep links for multiple opportunities in a single request. IDs that are not found return `null`.
158
+
Returns deep link redirect paths for multiple IDs in a single request. Accepts both **odds IDs** and **opportunity hash IDs**. Each ID in the request appears in the response — resolved IDs return a redirect path, unresolvable IDs return `null`.
print(f"Found {result['meta']['found']} of {result['meta']['count']} opportunities")
232
-
233
-
for opp_id, links in result['data'].items():
234
-
if links:
235
-
print(f"{opp_id}: {', '.join(links.keys())}")
229
+
forid, link in result['data'].items():
230
+
if link:
231
+
print(f"{id}: https://api.sharpapi.io{link}")
236
232
else:
237
-
print(f"{opp_id}: not found")
233
+
print(f"{id}: not available")
238
234
```
239
235
</Tabs.Tab>
240
236
</Tabs>
@@ -243,35 +239,36 @@ for opp_id, links in result['data'].items():
243
239
244
240
#### Success (200)
245
241
242
+
The batch endpoint returns **redirect paths**, not direct sportsbook URLs. Prepend your base URL or use the path with the redirect endpoint to reach the sportsbook.
|`"/api/v1/deeplink/{id}"`| Deeplink available — follow the redirect path to reach the sportsbook |
258
+
|`null`| No deeplink available for this ID (unsupported sportsbook, expired odds, or invalid ID) |
259
+
260
+
<Callouttype="info">
261
+
To get the final sportsbook URL, either follow the redirect (`GET https://api.sharpapi.io/api/v1/deeplink/{id}`) or use the path directly in `<a href>` links — the browser will follow the 302 redirect automatically.
262
+
</Callout>
263
+
267
264
#### Error Responses
268
265
269
266
***400 Missing IDs***
270
267
```json
271
268
{
272
269
"error": {
273
-
"code": "invalid_request",
274
-
"message": "Missing or empty \"ids\" array in request body"
270
+
"code": "bad_request",
271
+
"message": "ids array required"
275
272
}
276
273
}
277
274
```
@@ -280,33 +277,12 @@ for opp_id, links in result['data'].items():
280
277
```json
281
278
{
282
279
"error": {
283
-
"code": "invalid_request",
284
-
"message": "Maximum batch size is 100 ids"
285
-
}
286
-
}
287
-
```
288
-
289
-
***400 Invalid ID format***
290
-
```json
291
-
{
292
-
"error": {
293
-
"code": "invalid_request",
294
-
"message": "Invalid id format. Expected 16-character hex strings. Invalid: xyz123"
280
+
"code": "bad_request",
281
+
"message": "Maximum 500 IDs per batch"
295
282
}
296
283
}
297
284
```
298
285
299
-
### Response Headers
300
-
301
-
```
302
-
X-RateLimit-Limit: 120
303
-
X-RateLimit-Remaining: 119
304
-
X-RateLimit-Reset: 1737853200
305
-
X-Data-Delay: 0
306
-
X-Request-Id: req_dlb_xyz789
307
-
Cache-Control: public, s-maxage=10, max-age=5
308
-
```
309
-
310
286
---
311
287
312
288
## Deep Link Redirect
@@ -395,31 +371,40 @@ If the `fallback` query parameter is provided and the ID is not found, the endpo
395
371
396
372
| Field | Type | Description |
397
373
|-------|------|-------------|
398
-
|`data`| object | Map of hash ID to deep links object (or `null` if not found) |
399
-
|`meta.count`| number | Total number of IDs requested |
400
-
|`meta.found`| number | Number of IDs with at least one deep link |
401
-
|`meta.updated_at`| string | ISO 8601 timestamp |
374
+
|`data`| object | Map of ID to redirect path (string) or `null` if unavailable |
375
+
|`updated_at`| string | ISO 8601 timestamp of the odds data |
402
376
403
377
## Supported Sportsbooks
404
378
405
-
Deep links are generated for sportsbooks that support direct linking. State-specific books (marked with \*) use the `state` parameter to generate the correct regional URL.
379
+
Deep links are available for 21 of 28 sportsbooks. State-specific books use the `state` parameter to generate the correct regional URL.
406
380
407
-
| Sportsbook | Link Type| State-Specific |
381
+
| Sportsbook |Deep Link Support| State-Specific |
408
382
|-----------|-----------|----------------|
409
-
| DraftKings | Outcome/Event | No |
410
-
| FanDuel | Outcome/Event | Yes*|
411
-
| BetMGM | Outcome/Event | Yes*|
412
-
| Caesars | Outcome/Event | Yes*|
413
-
| BetRivers | Event | Yes*|
414
-
| Pinnacle | Event | No |
415
-
| bet365 | Event | No |
416
-
| Betway | Event | No |
417
-
| Fanatics | Event | No |
418
-
| Novig | Event | No |
419
-
420
-
<Callouttype="info">
421
-
**Outcome** links open the sportsbook with the specific bet pre-selected in the bet slip. **Event** links open the event page where the user can find the market manually. Outcome links provide a better user experience when available.
422
-
</Callout>
383
+
| DraftKings | Yes | No |
384
+
| FanDuel | Yes | No |
385
+
| BetMGM | Yes | No |
386
+
| Caesars | Yes | Yes |
387
+
| Pinnacle | Yes | No |
388
+
| Fanatics | Yes | No |
389
+
| BetRivers | Yes | Yes |
390
+
| Betway | Yes | No |
391
+
| Bovada | Yes | No |
392
+
| BetOnline | Yes | No |
393
+
| Ladbrokes | Yes | No |
394
+
| Stake | Yes | No |
395
+
| Hard Rock | Yes | No |
396
+
| Novig | Yes | No |
397
+
| Kalshi | Yes | No |
398
+
| BallyBet | Yes | No |
399
+
| Unibet | Yes | No |
400
+
| SkyBet | Yes | No |
401
+
| theScore Bet | Yes | No |
402
+
| Polymarket | Yes | No |
403
+
| ProphetX | Yes | No |
404
+
405
+
The following sportsbooks do not currently support deep links. IDs for these books will return `null` in the batch response:
406
+
407
+
bet365, bet365 UK, Bet105, Bookmaker, Fliff, Rebet, SABA
0 commit comments