Integrate Lottery Results Into Your Website With Our APIs
Access verified lottery result information from Dear Lottery Sambad and integrate it seamlessly into your own platform. Choose our Public API for simple keyless PDF embeds, or our Private API for complete structured JSON data, database ingestion, and full design freedom.
Choose the Right API for Your Platform
We provide two distinct API systems to suit different technical requirements and integration depths.
Public PDF & Metadata API
Ideal for webmasters, bloggers, and regional news portals seeking quick integration without authentication keys or domain approvals.
- ✓ No API Key Required: Immediate public access from any server or browser.
- ✓ A4 PDF Embed Snippets: Responsive iframe code for direct result sheet display.
- ✓ Direct Download Links: Official verified PDF download URLs for draw archives.
- ✓ No Expiration: Lifetime keyless access governed by a fair-use rate limit (60 req/min).
- ℹ Note: Returns official PDF links & metadata only. Structured winning numbers are restricted.
Domain-Based Structured Results API
Built for website owners, app developers, and syndicates requiring machine-readable winning numbers, prize breakdowns, and database storage.
- ✓ Full Structured Data: Complete winning numbers arrays for all tiers (1st, 2nd, 3rd, 4th, 5th, & Consolation).
- ✓ Own Database Storage: Ingest and store complete draw records in MySQL, PostgreSQL, or Mongo.
- ✓ Custom Frontend Freedom: Render custom HTML tables, native mobile apps, or Telegram/WhatsApp bots.
-
✓
Incremental Synchronization: Filter by
updated_sincefor high-efficiency polling. - ✓ Domain & State Security: Authorized against partner domain/subdomain with in-response subscription metadata.
Public PDF & Metadata API Developer Guide
The Public API is a keyless REST service designed for instant website integration. It allows you to query active states, retrieve published lottery draw schedules, obtain responsive A4 PDF iframe embed codes, and provide direct official PDF download links to your visitors.
https://dearlotterysambad.live/api/v1/public
Public Endpoints Reference
/api/v1/public/states
Returns the list of state lotteries currently authorized for public result querying.
{
"success": true,
"api_type": "public_pdf",
"data": [
{
"id": 1,
"name": "Sikkim",
"slug": "sikkim-lottery-result",
"code": "SK"
},
{
"id": 2,
"name": "Nagaland",
"slug": "nagaland-lottery-result",
"code": "NL"
}
]
}
/api/v1/public/results
Retrieve a paginated list of published lottery draws with iframe embed code and verified PDF download links.
| Parameter | Type | Required | Description & Example |
|---|---|---|---|
| state | string | Optional | State slug (sikkim-lottery-result), code (SK), or ID. |
| date | string | Optional | Exact draw date in YYYY-MM-DD format (e.g. 2026-11-03). |
| from_date | string | Optional | Start of date range (YYYY-MM-DD). |
| to_date | string | Optional | End of date range (YYYY-MM-DD). |
| time | string | Optional | Draw time filter (13:00, 18:00, 20:00). |
| per_page | integer | Optional | Results per page (1 to 50, default: 10). |
{
"success": true,
"api_type": "public_pdf",
"note": "Provides official PDF embed and download links only. Structured winning numbers and prize breakdowns are restricted.",
"data": [
{
"result_id": 1420,
"state_name": "Sikkim",
"state_code": "SK",
"lottery_name": "Dear Everest Morning",
"draw_date": "2026-11-03",
"draw_time": "13:00:00",
"draw_time_label": "01:00 PM",
"draw_number": "48",
"pdf_embed_url": "https://dearlotterysambad.live/results/embed-pdf/1420",
"pdf_download_url": "https://dearlotterysambad.live/results/download/1420",
"embed_iframe_code": "<iframe src=\"https://dearlotterysambad.live/results/embed-pdf/1420\" width=\"100%\" height=\"850\" frameborder=\"0\" title=\"Dear Lottery Sambad A4 Result\"></iframe>",
"published_at": "2026-11-03T07:35:00.000000Z"
}
],
"pagination": {
"current_page": 1,
"per_page": 10,
"total": 1,
"total_pages": 1,
"has_more": false
}
}
/api/v1/public/results/{id}
Retrieve embed codes and direct download links for a specific published lottery result ID.
Public API Integration Code Examples
<!-- 1. Embed Verified A4 Result Preview Directly -->
<div class="lottery-pdf-container" style="max-width: 900px; margin: 0 auto;">
<h3>Today's Dear Lottery Official Result Sheet</h3>
<iframe
src="https://dearlotterysambad.live/results/embed-pdf/1420"
width="100%"
height="850"
frameborder="0"
title="Dear Lottery Sambad A4 Result"
style="border: 1px solid #e2e8f0; border-radius: 12px;">
</iframe>
<!-- 2. Direct Official PDF Download Button -->
<p style="margin-top: 12px;">
<a href="https://dearlotterysambad.live/results/download/1420"
target="_blank"
rel="noopener noreferrer"
style="background: #059669; color: #fff; padding: 10px 20px; border-radius: 8px; text-decoration: none; font-weight: bold;">
Download Official A4 Result PDF
</a>
</p>
</div>
async function loadLatestPublicResult(stateSlug = 'sikkim-lottery-result') {
const container = document.getElementById('lottery-results-target');
container.innerHTML = '<p class="loading">Loading latest verified result...</p>';
try {
const url = `https://dearlotterysambad.live/api/v1/public/results?state=${encodeURIComponent(stateSlug)}&per_page=1`;
const response = await fetch(url, {
headers: { 'Accept': 'application/json' }
});
if (!response.ok) {
throw new Error(`API Error: HTTP ${response.status}`);
}
const data = await response.json();
if (data.success && data.data.length > 0) {
const latest = data.data[0];
container.innerHTML = `
<div class="result-card">
<h4>${latest.lottery_name} (${latest.draw_time_label})</h4>
<p>Draw Date: ${latest.draw_date}</p>
<div class="embed-wrapper">
${latest.embed_iframe_code}
</div>
<a href="${latest.pdf_download_url}" class="download-btn" target="_blank">
Download Official Sheet
</a>
</div>
`;
} else {
container.innerHTML = '<p>No published results available for the requested state.</p>';
}
} catch (err) {
console.error('Failed to load lottery result:', err);
container.innerHTML = '<p class="error">Unable to load lottery result sheet. Please try again later.</p>';
}
}
// Call on page ready
document.addEventListener('DOMContentLoaded', () => loadLatestPublicResult('sikkim-lottery-result'));
<?php
$state = 'nagaland-lottery-result';
$apiUrl = 'https://dearlotterysambad.live/api/v1/public/results?state=' . urlencode($state) . '&per_page=1';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Accept: application/json',
'User-Agent: MyWebsiteBot/1.0'
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode === 200 && $response) {
$result = json_decode($response, true);
if (!empty($result['data'][0])) {
$draw = $result['data'][0];
echo "Latest Result: " . htmlspecialchars($draw['lottery_name']) . "\n";
echo "Download URL: " . htmlspecialchars($draw['pdf_download_url']) . "\n";
}
} else {
echo "API request failed with HTTP " . $httpCode;
}
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
public function fetchPublicLotterySheet(string $state = 'sikkim-lottery-result'): ?array
{
try {
$response = Http::timeout(8)
->acceptJson()
->get('https://dearlotterysambad.live/api/v1/public/results', [
'state' => $state,
'per_page' => 1,
]);
if ($response->successful() && $response->json('success')) {
return $response->json('data.0');
}
Log::warning('Public Lottery API returned non-success response', [
'status' => $response->status(),
'body' => $response->body()
]);
} catch (\Throwable $e) {
Log::error('Public Lottery API request failed: ' . $e->getMessage());
}
return null;
}
Private Lottery Results API – Complete Control Over Your Website
The Private API is engineered for website owners, app developers, and lottery syndicates who want to build their own independent lottery results platform. Receive machine-readable structured JSON containing every winning number, rank tier, ticket series, winner name, and draw identifier.
10 Core Benefits for Partner Websites
Design your own result layouts, custom CSS, mobile themes, and interactive ticket checkers. You are not forced to display iframe widgets or third-party branding.
Store incoming structured draws into your own MySQL, PostgreSQL, or Mongo database. Once stored, you have perpetual access to historical records on your own servers.
Retrieve newly published results through automated server cron jobs without manual typing or PDF OCR transcription on your end. Synchronization schedule depends on your implementation.
Purchase permissions tailored to your market: single-state access (e.g. Sikkim or Nagaland only) or comprehensive multi-state bundles.
Each API key is tied to an authorized root domain or subdomain independently (e.g. partner.com or lottery.partner.org), ensuring clean environment isolation.
Full machine-readable prize tiers: 1st Prize, Consolation, 2nd, 3rd, 4th, 5th, ticket series, winner names, first prize seller info, and verified timestamps.
Build websites in any stack (PHP, Node, Python, Go) or power native iOS/Android mobile apps, SMS alerts, and notification channels.
Subscriptions are configured for precise durations in days (e.g., 30, 90, 180, 365 days). No unexpected recurring charges or lock-in contracts.
Every successful API response contains an api_subscription object indicating remaining days and expiration date, allowing proactive monitoring in your admin console.
When renewing an active subscription, new validity is extended from your current expiry date. Your API key remains unchanged, avoiding code updates on your live site.
Private API Authentication & Technical Reference
All requests to the Private API require valid authentication headers and are verified against your registered domain.
Your private API key (dls_dom_...) grants full structured ingestion access. Never expose your private API key in browser-side JavaScript, HTML source code, mobile client binaries, or public GitHub repositories. Always invoke the Private API from your backend server or serverless functions, and store your key in an environment variable (LOTTERY_API_KEY).
Required Request Headers
| Header | Format & Value | Requirement |
|---|---|---|
| X-API-KEY | dls_dom_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
Required |
| Accept | application/json |
Recommended |
* Note: Alternatively, Authorization: Bearer dls_dom_... is supported by the authentication gateway.
Private Endpoints Reference
/api/v1/states
Returns the specific lottery states authorized for your API key, along with your current subscription validity metadata.
{
"success": true,
"domain": "partner.com",
"api_subscription": {
"status": "active",
"activated_at": "2026-11-03T06:34:28.000000Z",
"expires_at": "2027-11-03T06:34:28.000000Z",
"validity_days": 365,
"remaining_days": 365
},
"data": [
{
"id": 1,
"name": "Sikkim",
"slug": "sikkim-lottery-result",
"code": "SK"
},
{
"id": 2,
"name": "Nagaland",
"slug": "nagaland-lottery-result",
"code": "NL"
}
]
}
/api/v1/results
Retrieve complete structured draw records including prize rankings, winning numbers arrays, and revision timestamps. Supports incremental sync via updated_since.
| Parameter | Type | Description & Purpose |
|---|---|---|
| state | string | Filter by authorized state slug (sikkim-lottery-result), code (SK), or ID. |
| date | string | Exact draw date (<code class="text-xs font-mono">YYYY-MM-DD</code>). |
| updated_since | ISO 8601 | Incremental Sync: Returns results added or revised after timestamp (e.g. 2026-11-03T12:00:00Z). Highly recommended for cron jobs. |
| time | string | Draw time filter (13:00, 18:00, 20:00). |
| per_page | integer | Results per page (1 to 50, default: 10). |
{
"success": true,
"domain": "partner.com",
"api_subscription": {
"status": "active",
"activated_at": "2026-11-03T06:34:28.000000Z",
"expires_at": "2027-11-03T06:34:28.000000Z",
"validity_days": 365,
"remaining_days": 365
},
"data": [
{
"result_id": 1420,
"identity_key": "SK-2026-11-03-13:00:00-dear-everest-morning",
"state": {
"id": 1,
"name": "Sikkim",
"slug": "sikkim-lottery-result",
"code": "SK"
},
"lottery_name": "Dear Everest Morning",
"draw_date": "2026-11-03",
"draw_time": "13:00:00",
"draw_time_label": "01:00 PM",
"draw_number": "48",
"first_prize_sold_by": "Stockist: Lucky Agency, Siliguri",
"status": "published",
"original_pdf_url": "https://dearlotterysambad.live/results/download/1420",
"pdf_embed_url": "https://dearlotterysambad.live/results/embed-pdf/1420",
"prizes": [
{
"rank": "1",
"prize_name": "1st Prize",
"prize_amount": "₹1 Crore",
"winner_name": "Rahul Verma",
"series": "97K",
"winning_numbers": ["97K 95045"]
},
{
"rank": "2",
"prize_name": "Consolation Prize",
"prize_amount": "₹1,000",
"winner_name": null,
"series": null,
"winning_numbers": ["95045"]
},
{
"rank": "3",
"prize_name": "2nd Prize",
"prize_amount": "₹9,000",
"winner_name": null,
"series": null,
"winning_numbers": ["01234", "12345", "23456", "34567", "45678", "56789", "67890", "78901", "89012", "90123"]
},
{
"rank": "4",
"prize_name": "3rd Prize",
"prize_amount": "₹450",
"winner_name": null,
"series": null,
"winning_numbers": ["1122", "2233", "3344", "4455", "5566", "6677", "7788", "8899", "9900", "0011"]
},
{
"rank": "5",
"prize_name": "4th Prize",
"prize_amount": "₹250",
"winner_name": null,
"series": null,
"winning_numbers": ["1425", "3627", "4859", "6071", "7283", "8495", "9607", "0819", "2031", "3243"]
},
{
"rank": "6",
"prize_name": "5th Prize",
"prize_amount": "₹120",
"winner_name": null,
"series": null,
"winning_numbers": ["0145", "0278", "0389", "0491", "0512", "0623", "0734", "0845", "0956", "1067", "1178", "1289", "1390", "1401", "1512", "1623", "1734", "1845", "1956", "2067"]
}
],
"verified_at": "2026-11-03T07:35:00.000000Z",
"last_updated_at": "2026-11-03T07:35:00.000000Z"
}
],
"pagination": {
"current_page": 1,
"per_page": 10,
"total": 1,
"total_pages": 1,
"has_more": false
}
}
Subscription Metadata (api_subscription) Fields
"active"
active, expired, or deactivated.
ISO 8601
Initial activation timestamp.
ISO 8601
Subscription expiry timestamp.
365
Total configured subscription days.
365
Whole remaining days until expiry.
Handling Expiration (API_EXPIRED)
When your subscription passes its expires_at timestamp, the authentication middleware immediately halts execution and returns an HTTP 403 Forbidden status:
{
"success": false,
"error": {
"code": "API_EXPIRED",
"message": "Your API subscription has expired. Please contact the administrator for renewal."
},
"data": {
"status": "expired",
"expired_at": "2026-10-29T06:34:09.000000Z"
}
}
Developer Guidance: Inspect error.code === 'API_EXPIRED' in your backend catch block. You can automatically dispatch a notification to your site administrator to trigger a renewal without disrupting other features.
Complete Error Codes Reference
| HTTP Status | Error Code / Reason | Description & Suggested Action |
|---|---|---|
| 401 Unauthorized | Missing API key | Header X-API-KEY was missing or empty. Provide key in headers. |
| 401 Unauthorized | Invalid API key | API key does not match any registered partner record. Verify credentials. |
| 403 Forbidden | API_KEY_DEACTIVATED | API key was manually blocked/deactivated by admin. Contact support. |
| 403 Forbidden | API_EXPIRED | Subscription validity period has concluded. Extend validity via renewal. |
| 403 Forbidden | State not authorized | Your key is not authorized for the requested state. Contact admin to add state. |
| 404 Not Found | Not Found | Requested result record or state does not exist. |
| 429 Rate Limit | Too Many Requests | Exceeded 120 requests/minute. Implement local caching (Redis/Memcached). |
Private API Integration Code Examples
<?php
// Load API key securely from environment variable
$apiKey = getenv('LOTTERY_API_KEY') ?: 'dls_dom_YOUR_ACTUAL_SECRET_KEY';
$state = 'sikkim-lottery-result';
$endpoint = 'https://dearlotterysambad.live/api/v1/results?' . http_build_query([
'state' => $state,
'per_page' => 1
]);
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => $endpoint,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 15,
CURLOPT_HTTPHEADER => [
'X-API-KEY: ' . $apiKey,
'Accept: application/json',
'User-Agent: PartnerPortalSync/1.0'
]
]);
$raw = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$payload = json_decode($raw, true);
if ($httpCode === 200 && !empty($payload['success'])) {
$sub = $payload['api_subscription'];
echo "Subscription Active! Days Remaining: " . $sub['remaining_days'] . "\n";
foreach ($payload['data'] as $result) {
echo "Draw: {$result['lottery_name']} ({$result['draw_time_label']})\n";
echo "Identity Key: {$result['identity_key']}\n";
// Print 1st Prize
foreach ($result['prizes'] as $prize) {
if ($prize['rank'] === '1') {
echo "1st Prize ({$prize['prize_amount']}): " . implode(', ', $prize['winning_numbers']) . "\n";
}
}
}
} elseif ($httpCode === 403 && isset($payload['error']['code']) && $payload['error']['code'] === 'API_EXPIRED') {
echo "CRITICAL: API Subscription Expired on: " . $payload['data']['expired_at'] . "\n";
} else {
echo "API Request Failed with HTTP {$httpCode}: " . ($payload['error'] ?? 'Unknown Error') . "\n";
}
namespace App\Services;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
class DearLotteryApiService
{
protected string $baseUrl = 'https://dearlotterysambad.live/api/v1';
protected string $apiKey;
public function __construct()
{
$this->apiKey = config('services.dear_lottery.key');
}
/**
* Ingest latest structured results with incremental updated_since filter.
*/
public function syncResults(?string $updatedSince = null, string $state = 'sikkim-lottery-result'): ?array
{
$params = ['state' => $state, 'per_page' => 20];
if ($updatedSince) {
$params['updated_since'] = $updatedSince;
}
$response = Http::withHeaders([
'X-API-KEY' => $this->apiKey,
'Accept' => 'application/json',
])->timeout(12)->get("{$this->baseUrl}/results", $params);
if ($response->successful()) {
$data = $response->json();
// Log remaining subscription days for monitoring
$daysLeft = $data['api_subscription']['remaining_days'] ?? null;
if ($daysLeft !== null && $daysLeft <= 7) {
Log::warning("Dear Lottery API subscription expiring soon: {$daysLeft} days remaining.");
}
return $data['data'] ?? [];
}
if ($response->status() === 403 && $response->json('error.code') === 'API_EXPIRED') {
Log::alert('Dear Lottery API subscription has expired! Please renew immediately.');
}
return null;
}
}
import fetch from 'node-fetch';
const API_KEY = process.env.LOTTERY_API_KEY || 'dls_dom_YOUR_SECRET_KEY';
const API_URL = 'https://dearlotterysambad.live/api/v1/results?state=sikkim-lottery-result&per_page=1';
async function fetchStructuredResults() {
try {
const response = await fetch(API_URL, {
method: 'GET',
headers: {
'X-API-KEY': API_KEY,
'Accept': 'application/json'
}
});
const data = await response.json();
if (response.ok && data.success) {
console.log(`[OK] Domain: ${data.domain} | Days Left: ${data.api_subscription.remaining_days}`);
for (const result of data.data) {
console.log(`Draw: ${result.lottery_name} [${result.identity_key}]`);
for (const prize of result.prizes) {
console.log(` Tier ${prize.rank} (${prize.prize_name}): ${prize.winning_numbers.join(', ')}`);
}
}
} else if (response.status === 403 && data.error?.code === 'API_EXPIRED') {
console.error(`[EXPIRED] Subscription ended on ${data.data?.expired_at}`);
} else {
console.error(`[ERROR] HTTP ${response.status}:`, data.error);
}
} catch (err) {
console.error('Network failure connecting to Lottery API:', err);
}
}
fetchStructuredResults();
-- Suggested MySQL Schema for Partner Database Ingestion
CREATE TABLE partner_lottery_draws (
id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
identity_key VARCHAR(191) NOT NULL UNIQUE, -- e.g. "SK-2026-11-03-13:00:00-dear-everest-morning"
state_code VARCHAR(10) NOT NULL,
state_name VARCHAR(100) NOT NULL,
lottery_name VARCHAR(191) NOT NULL,
draw_date DATE NOT NULL,
draw_time TIME NOT NULL,
draw_number VARCHAR(50),
first_prize_sold_by VARCHAR(191),
pdf_embed_url TEXT,
original_pdf_url TEXT,
verified_at DATETIME,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
INDEX idx_draw_date (draw_date),
INDEX idx_state_code (state_code)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE partner_lottery_prizes (
id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
draw_id BIGINT UNSIGNED NOT NULL,
rank_order INT NOT NULL,
prize_name VARCHAR(100) NOT NULL,
prize_amount VARCHAR(100) NOT NULL,
winner_name VARCHAR(191),
winning_numbers JSON NOT NULL, -- Stored as JSON array: ["97K 95045"]
FOREIGN KEY (draw_id) REFERENCES partner_lottery_draws(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Ingestion Logic: Use identity_key to perform an idempotent UPDATE or INSERT (Upsert)
-- This ensures running your sync job repeatedly never creates duplicate rows!
Private API Subscription Plans
Transparent, cost-effective API licensing tailored to your website's traffic and state coverage requirements.
* Pricing depends on the number of authorized states (Single-State vs. Multi-State bundles), expected request throughput, and validity commitment. Contact our verification desk for a customized quotation.
Authorize single states (e.g. Sikkim or Nagaland) or complete all-state packages including Kerala and Mizoram.
Select tailored durations: 30 days, 90 days, 180 days, or 365 days (1 year). Extend seamlessly with preserved expiry.
Direct assistance from our editorial and integration engineering team to verify connection and schema mapping.
Ready to build with Dear Lottery Sambad API?
Submit your domain and integration requirements through our contact desk. We will generate your authorized API credentials.
Frequently Asked Developer Questions
Common architectural and operational questions regarding our Lottery API systems.
What are the API rate limits?
The Public PDF API permits up to 60 requests per minute per IP address. The Private Structured API permits up to 120 requests per minute per API key. We recommend caching responses locally for 60 to 120 seconds.
Can I register a subdomain instead of a root domain?
Yes. Our domain normalization engine independently supports root domains (e.g. example.com) and dedicated subdomains (e.g. lottery.example.com).
How quickly are draw results available via API?
Results are available immediately upon verification by our editorial desk (typically within minutes of the official state draw: 1:00 PM, 6:00 PM, and 8:00 PM daily).
What happens when my Private API key expires?
Calls will receive an HTTP 403 response with code: "API_EXPIRED". Renewing through our admin desk restores access immediately without changing your existing key.