Skip to content
Lottery Feed API

Lottery Feed API

ResultsPersonalAPI DocsPricingContact
Sign inJoin the Free Beta
  1. Home
  2. /
  3. API docs
  4. /
  5. Lottery API Polling and Integration Guide

API documentation

Lottery API Polling and Integration Guide

Build schedule-aware lottery result polling with bounded windows, Retry-After handling, cache-safe delivery, and clear freshness boundaries.

Section

03 / 27

OpenAPI JSON
01Introduction02Quickstart03Polling and integration04Sandbox fixtures05SDK starter06Embeddable widgets07API playground08OpenAPI spec09Postman collection10API changelog11Authentication12API key scopes13Freshness levels14Source confidence15Status monitoring16Rate limiting17Get countries18Get states19Get lotteries20Get lottery21Get schedules22Draw years23Lottery results24History export25Number frequency26Result checker27Error handling

Live API examples

Jump from the docs to real public pages that use the same read models.

Draw schedules and polling windowsRead timezone-aware schedules and the bounded window for checking a result.
Latest and historical resultsChoose a bounded result endpoint and store stable draw identity fields.
Rate limits and retry handlingUnderstand shared workspace quota, reset timestamps, and Retry-After behavior.
Freshness and delivery levelsKeep plan delivery delay separate from source publication, ingestion, and request cadence.
Number-frequency statisticsUse the statistics endpoint for historical number counts, not polling cadence.
Browser-safe widgetsEmbed cached public results without exposing a bearer API key in browser code.

Endpoints

GET
/v1/results/latest

Latest compact draw rows for current customer views.

GET
/v1/results/history

Date-filtered history rows for imports and reconciliation.

GET
/v1/schedules

Timezone-aware draw schedule metadata.

GET
/widgets/latest

Browser-safe latest-result iframe endpoint.

GET
/sdk-examples.json

Machine-readable SDK starters and sandbox smoke examples.

High-frequency lottery API polling

High-frequency describes how often an integration checks for a result. It does not describe number-frequency statistics, the draw cadence of a lottery, or a promise that a result will appear immediately. Polling cannot make a result visible before source publication, feed processing, and the workspace delivery policy allow it. Use the schedule window and shared request quota deliberately.

Recipe map

Use these recipes when wiring a real customer product. They use concrete number-game examples so engineers can copy a request, see which fields to store, and keep browser pages free of bearer tokens.

https://lotteryfeedapi.com/lotteries/md-pick3-midday
https://lotteryfeedapi.com/lotteries/tn-pick3-evening
https://lotteryfeedapi.com/api-docs/widgets
https://lotteryfeedapi.com/sdk-examples.json

Show latest Pick 3 numbers for Maryland

For a jurisdiction-and-format latest-result view, filter by state and ball_count, cap rows with limit, and store draw_date plus numbers_formatted. Add an explicit include value only when bounded provenance or correction context is needed.

curl -sS "https://api.lotteryfeedapi.com/v1/results/latest?state=MD&ball_count=3&short=1&limit=5" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "returned_count": 1,
  "total_count": 1,
  "limit": 5,
  "has_more": false,
  "data": [
    {
      "game_code": "md-pick3-midday",
      "name": "Maryland Pick 3 Midday",
      "state_code": "MD",
      "ball_count": 3,
      "draw_date": "2026-06-21",
      "numbers_formatted": "2-3-6",
      "status": "official"
    }
  ]
}

Backfill one historical draw date

Use the history endpoint for deterministic imports and reconciliation jobs. Always pass date explicitly, keep the returned_count and total_count fields for monitoring, and paginate with narrower filters when a date has more rows than the limit.

curl -sS "https://api.lotteryfeedapi.com/v1/results/history?date=2026-06-21&state=TN&ball_count=3&limit=25" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "date": "2026-06-21",
  "returned_count": 3,
  "total_count": 3,
  "has_more": false,
  "data": [
    {
      "game_code": "tn-pick3-evening",
      "name": "Tennessee Cash 3 Evening",
      "draw_date": "2026-06-21",
      "numbers_formatted": "0-7-6"
    }
  ]
}

Check schedule before polling

Schedule metadata lets a worker avoid polling all day. Start at next_draw.polling_window.first_check_after_utc and stop or slow down after retry_until_utc. A polling window is guidance, not proof that the source has published a result. Store timezone IDs, not only offsets, because daylight saving time changes local draw times.

curl -sS "https://api.lotteryfeedapi.com/v1/schedules?state=TN&date=2026-06-21" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "data": [
    {
      "game_code": "tn-pick3-evening",
      "name": "Tennessee Cash 3 Evening",
      "draw_schedule": {
        "local_time": "6:28 PM CT",
        "utc_time": "23:28 UTC",
        "timezone": "America/Chicago",
        "description": "Every day. On Sunday, only the evening draw runs.",
        "next_draw": {
          "utc_datetime": "2026-06-21T23:28:00Z",
          "polling_window": {
            "first_check_after_utc": "2026-06-21T23:38:00Z",
            "retry_until_utc": "2026-06-22T01:28:00Z"
          }
        }
      }
    }
  ]
}

Embed a browser-safe latest result

Use widgets for public customer pages. Widgets never accept bearer API keys, return short cache headers, and link back to canonical lottery or result pages for attribution and SEO clarity.

<iframe
  src="https://lotteryfeedapi.com/widgets/latest?game_code=md-pick3-midday&style=latest-card&theme=light&limit=1"
  title="Maryland Pick 3 Midday latest result"
  loading="lazy"
  referrerpolicy="strict-origin-when-cross-origin"
  style="width:100%;max-width:420px;height:230px;border:0;border-radius:8px;overflow:hidden"
></iframe>

Use deterministic sandbox checks in CI

CI should validate auth, parsing, and response-shape mapping without depending on live draw timing. Sandbox keys exercise the public read model but do not represent official source freshness or paid entitlements.

curl -sS "https://api.lotteryfeedapi.com/v1/results/latest?state=MD&ball_count=3&short=1&limit=1" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer lf_test_demo_sandbox"
{
  "data": [
    {
      "game_code": "md-pick3-midday",
      "numbers_formatted": "2-3-6",
      "numbers_string": "2-3-6"
    }
  ]
}

Operational polling guardrails

Keep one schedule-aware polling loop per game and draw window, then fan out the stored result inside your system. Retry only idempotent GET requests, respect Retry-After and RateLimit headers, and stop the loop after the expected draw is stored. Log endpoint path, response status, latency, and request IP without logging bearer tokens.

Choose the right cache surface

Bearer-authenticated /v1 responses are private API reads, not a conditional-cache surface. Where configured, feed links support ETag and Last-Modified validation, while public browser pages should use widgets. Do not place bearer API keys in browser code, public URLs, or shared caches.

Keep polling cadence separate from freshness

F1-F7 measure plan delivery delay after the feed first stores or observes a result. Collection lag from official publication is measured separately. F1-F7 are plan delivery-delay targets, not guarantees of ingestion speed or uptime. The delay clock starts after the feed first stores or observes a result; upstream publication and ingestion can add time before that point. More frequent requests do not move a stored result ahead of the workspace delivery policy; they only consume shared quota.

API documentation FAQ

Short answers for teams using lottery api polling and integration guide in production integrations.

Should a public website call /v1 directly from the browser?

No. Browser pages should use widgets or feed links. Keep bearer API keys in server-side workers, API routes, or backend jobs.

What fields should an importer store first?

Store game_code, draw_date, numbers, numbers_formatted, status, source_confidence, provenance role/display, and inserted timestamps required by your integration.

Does high-frequency polling make a lottery result available sooner?

No. Request cadence does not change source publication, feed processing, or the workspace delivery policy. Use the schedule polling window and stop after the expected draw is stored.

Is the number-frequency endpoint a polling endpoint?

No. The frequency endpoint summarizes historical number counts. Polling integrations should use schedules, latest results, retry headers, and the cache surface that matches their access model.


Next: Sandbox fixtures
Lottery Feed API

Normalized lottery draw results, history, schedules, source-confidence metadata, and descriptive analytics for integrations and personal analysis.

Independent software and data service. We do not sell lottery tickets, accept bets or player funds, operate draws, determine outcomes or pay prizes.Lottery names and trademarks belong to their respective owners. Lottery Feed API is an independent data service and is not affiliated with, endorsed by, sponsored by or operated by any lottery authority.
LotteriesDaily ArchiveCountriesStatesStatusResponsible UseAcceptable UseReport incorrect resultCompanyTermsPrivacyAccount