Developer API Portal & Integration Guide

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.

Architecture RESTful JSON & Embeds
Update Cadence Real-time upon Draw
Data Accuracy Official Gazette Verified
Supported States Sikkim, Nagaland, Kerala, Mizoram

Choose the Right API for Your Platform

We provide two distinct API systems to suit different technical requirements and integration depths.

PUBLIC API (KEYLESS) Type A: Free Access

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.
PRIVATE API (AUTHENTICATED) Type B: Structured Ingestion

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_since for high-efficiency polling.
  • ✓ Domain & State Security: Authorized against partner domain/subdomain with in-response subscription metadata.
TYPE A: KEYLESS PUBLIC API Rate Limit: 60 req / min

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.

Base Endpoint URL https://dearlotterysambad.live/api/v1/public
Authentication None Required (Keyless)
Response Data Format JSON (Draw Metadata & PDF Embeds)

Public Endpoints Reference

GET /api/v1/public/states
List Active Public States

Returns the list of state lotteries currently authorized for public result querying.

Example JSON Response
{
  "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"
    }
  ]
}
GET /api/v1/public/results
Query Draw Results & Embeds

Retrieve a paginated list of published lottery draws with iframe embed code and verified PDF download links.

Query Parameters
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).
Example Response (JSON)
{
  "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
  }
}
GET /api/v1/public/results/{id}
Single Result PDF Details

Retrieve embed codes and direct download links for a specific published lottery result ID.

Public API Integration Code Examples

Direct HTML Iframe Embed & PDF Download Button
<!-- 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>
TYPE B: DOMAIN-AUTHORIZED PRIVATE API Rate Limit: 120 req / min

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

1 Custom Website Design

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.

2 Own Database Storage

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.

3 Automated Result Retrieval

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.

4 State-Specific Access

Purchase permissions tailored to your market: single-state access (e.g. Sikkim or Nagaland only) or comprehensive multi-state bundles.

5 Domain and Subdomain Authorization

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.

6 Complete Structured Data

Full machine-readable prize tiers: 1st Prize, Consolation, 2nd, 3rd, 4th, 5th, ticket series, winner names, first prize seller info, and verified timestamps.

7 Flexible Multi-Platform Development

Build websites in any stack (PHP, Node, Python, Go) or power native iOS/Android mobile apps, SMS alerts, and notification channels.

8 API Subscription Validity

Subscriptions are configured for precise durations in days (e.g., 30, 90, 180, 365 days). No unexpected recurring charges or lock-in contracts.

9 In-Response Expiry Metadata

Every successful API response contains an api_subscription object indicating remaining days and expiration date, allowing proactive monitoring in your admin console.

10 Preserved Subscription Renewal

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.

Security Critical: Server-Side Calls Only

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

GET /api/v1/states
List Permitted States for Your Domain

Returns the specific lottery states authorized for your API key, along with your current subscription validity metadata.

Example JSON Response
{
  "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"
    }
  ]
}
GET /api/v1/results
Structured Results Ingestion

Retrieve complete structured draw records including prize rankings, winning numbers arrays, and revision timestamps. Supports incremental sync via updated_since.

Query Parameters
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).
Structured JSON Response Example
{
  "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

status "active" active, expired, or deactivated.
activated_at ISO 8601 Initial activation timestamp.
expires_at ISO 8601 Subscription expiry timestamp.
validity_days 365 Total configured subscription days.
remaining_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

Production-Ready PHP cURL Integration
<?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";
}
INDICATIVE PLANS & LICENSING

Private API Subscription Plans

Transparent, cost-effective API licensing tailored to your website's traffic and state coverage requirements.

Indicative Pricing Range
$5 – $15 / month (indicative)

* 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.

Coverage & States

Authorize single states (e.g. Sikkim or Nagaland) or complete all-state packages including Kerala and Mizoram.

Flexible Validities

Select tailored durations: 30 days, 90 days, 180 days, or 365 days (1 year). Extend seamlessly with preserved expiry.

Technical Support

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.

Contact Our API Desk →

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.