Football Betting Data: How to Build an NFL and College Football Betting Database

What football betting data is available from an odds API, what it is not (a multi-season archive), and how to design and fill your own NFL and NCAAF betting database: games, kickoff prices, line moves, props and results, with schema and code.

By PreciseAPI Engineering

Published

Most people looking for a football betting database want one of two things: years of past NFL and college football lines to study today, or a dependable way to collect football betting data from now on. Those are different problems, and it is worth being honest about which one an odds API solves. This guide covers what football betting data PreciseAPI supplies, what it doesn't, and how to design and fill your own database with kickoff prices, line moves, props and results for the NFL and NCAAF.

PreciseAPI is a sports odds data API. It collects prices from sportsbooks, exchanges and DFS apps; it doesn't take bets or publish picks. Everything below is about storing and studying prices.

Historical betting data: archive or collector?

There are two ways to get historical betting data for football.

Buy an archive. Some providers sell past seasons of lines as files or through a history endpoint. If you need ten years of NFL closing lines this afternoon, that is the only route. The historical odds API page notes, as checked in October 2026, what some of those providers list.

Collect forward. Pull current prices and recent line history from a live feed, store them yourself, and the database grows every week. This is what PreciseAPI supports. Its /v1/history endpoint returns recorded moves for markets on the board and games that finished recently, readable for 48 hours after a market's last change. There is no archive of past seasons behind it and no bulk download.

The collector route has real advantages once it is running: you choose the books, you see every recorded move rather than interval snapshots, and you keep the market and selection ids that join everything together. But it starts on the day you start. Plan for that.

What NFL betting data the API covers

For the nfl and ncaaf leagues the feed carries:

The NFL odds API and NCAAF odds API pages list the sources pricing each league. College football in the feed is men's FBS, and smaller games draw fewer books than the marquee ones, which your database should expect rather than treat as gaps.

Two limits shape the design. Line history is kept only for the main full-game moneyline, spread and total; halves, quarters, alternates, team totals, props and futures have current prices only, so you snapshot them yourself. And /v1/scores has final scores but no line score by quarter, so period bets can't be graded from the feed.

Designing the football betting database

A small relational schema covers most questions. This is PostgreSQL, but the shape works anywhere:

CREATE TABLE games (
  event_id    TEXT PRIMARY KEY,          -- evt_…, never changes
  league      TEXT NOT NULL,             -- nfl | ncaaf
  start_time  TIMESTAMPTZ NOT NULL,
  home_id     TEXT, away_id TEXT,        -- nfl_kc, …
  home_name   TEXT, away_name TEXT,
  status      TEXT,                      -- scheduled | final | postponed | cancelled
  home_score  INT, away_score INT
);

CREATE TABLE quotes (                    -- one row per outcome per snapshot
  captured_at  TIMESTAMPTZ NOT NULL,
  capture      TEXT NOT NULL,            -- e.g. 'kickoff' or 'daily'
  event_id     TEXT NOT NULL REFERENCES games,
  book         TEXT NOT NULL,
  market_id    TEXT NOT NULL,
  market_key   TEXT NOT NULL,            -- spread, total, player_pass_yds, …
  period       TEXT NOT NULL,            -- full_game, 1h, 1q, …
  player_id    TEXT,                     -- props only
  selection_id TEXT NOT NULL,            -- same id for the same outcome at every book
  side         TEXT,                     -- home | away | over | under
  point        NUMERIC,
  price        NUMERIC,                  -- American odds
  updated_at   TIMESTAMPTZ,
  PRIMARY KEY (market_id, selection_id, captured_at)
);

CREATE TABLE line_moves (                -- from /v1/history: main full-game markets
  market_id   TEXT NOT NULL,
  event_id    TEXT NOT NULL REFERENCES games,
  book        TEXT NOT NULL,
  market_key  TEXT NOT NULL,             -- moneyline | spread | total
  t           TIMESTAMPTZ NOT NULL,
  line        NUMERIC,
  price_0     NUMERIC, price_1 NUMERIC,  -- same order as the market's outcomes
  PRIMARY KEY (market_id, t)
);

Three choices matter more than the rest:

  1. Key on ids, not names. Event, market and selection ids are stable and shared across books, so a join replaces the name matching that usually eats the first week of a project. The normalization post explains them.
  2. Store snapshots and moves separately. quotes holds what every book showed at a chosen moment, for any market. line_moves holds the recorded path of the main markets. Mixing the two makes both harder to query.
  3. Keep market_id. Each spread or total number a book posts is its own market, so when a book moves from -3 to -3.5 the new number has a new market id. Line history follows the move: a book's full-game spread and total keep one series across numbers, and the earlier number's market id still finds it.

Filling it: a kickoff capture and a results job

Two scheduled jobs keep the database current. The first runs every ten minutes, finds games kicking off in that window, and saves every book's main lines for the game, both halves and every quarter, plus the line history of the main full-game markets at a few books:

import os
from datetime import datetime, timedelta, timezone
import requests

API = "https://api.preciseapi.com/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['PRECISEAPI_KEY']}"}
HISTORY_BOOKS = ["pinnacle", "circa", "draftkings", "fanduel"]

def get(path, **params):
    r = requests.get(f"{API}{path}", params=params, headers=HEADERS, timeout=20)
    if r.status_code == 404:
        return None  # not offered or no history; errors aren't charged
    r.raise_for_status()
    return r.json()["data"]

def kickoff_capture(db):
    now = datetime.now(timezone.utc)
    games = get("/events", league="nfl,ncaaf", status="scheduled",
                date_from=now.isoformat(), date_to=(now + timedelta(minutes=10)).isoformat()) or []
    if not games:
        return
    events = get("/odds", event_ids=",".join(g["id"] for g in games), markets="main",
                 periods="full_game,1h,2h,1q,2q,3q,4q", include_dfs="false") or []
    for ev in events:
        db.upsert_game(ev)
        for book in ev["bookmakers"]:
            for m in book["markets"]:
                for o in m["outcomes"]:
                    db.insert_quote(now, "kickoff", ev["id"], book["id"], m, o)
        for book in HISTORY_BOOKS:
            for market in ("moneyline", "spread", "total"):
                h = get("/history", event_id=ev["id"], book=book, market=market)
                if h:
                    for p in h["points"]:
                        db.insert_move(h["market_id"], ev["id"], book, market, p)

db stands for your own small data-access layer over the tables above. The /v1/odds call costs 2 credits for every game in the window, and each history call costs 3. A Sunday early window of nine NFL games at four books and three markets is 108 history calls, or 324 credits, plus 2 for the odds.

The second job runs every few minutes and writes results:

def results_job(db):
    for ev in get("/scores", league="nfl,ncaaf", status="final,postponed,cancelled") or []:
        db.upsert_game(ev)  # status plus score.home / score.away; score is null if none is known

Finished games stay in /v1/scores for about four hours, so a job every few minutes never misses one. That is 1 credit per run. The scores API page covers the status lifecycle and score fields.

Props and other markets

For player props, add a capture before kickoff from /v1/props?league=nfl&event_id=… (3 credits, up to 25 events per call) and store each market's player.id in player_id. Do the same with markets=alternate_spread,alternate_total,team_total on /v1/odds if you need ladders. Neither has line history, so if you want their movement, capture more often: a daily capture plus the kickoff capture is a reasonable start. The player props guide covers how props behave.

Querying your NFL betting data

Once a few weeks are stored, questions become SQL. This one grades every NFL home side against Pinnacle's kickoff spread:

SELECT g.start_time, g.away_name, g.home_name, g.away_score, g.home_score,
       q.point AS home_spread,
       CASE WHEN g.home_score - g.away_score + q.point > 0 THEN 'cover'
            WHEN g.home_score - g.away_score + q.point < 0 THEN 'no cover'
            ELSE 'push' END AS home_result
FROM games g
JOIN quotes q ON q.event_id = g.event_id
WHERE g.league = 'nfl' AND g.status = 'final'
  AND q.capture = 'kickoff' AND q.book = 'pinnacle'
  AND q.market_key = 'spread' AND q.period = 'full_game' AND q.side = 'home'
ORDER BY g.start_time;

From there the usual analyses follow: closing line value against your own earlier prices, how far each book sat from the market at kickoff, how often a spread moved through 3 or 7 between your daily captures and kickoff, and how first-half lines relate to full-game lines. The closing line value guide and backtesting guide cover the method and the look-ahead traps. For the weekly rhythm of an NFL line, from lookahead to kickoff, see the NFL odds data guide.

Soccer

If "football" means soccer to you, the soccer league covers the EPL, La Liga, Serie A, Bundesliga, Ligue 1, MLS and the Champions League, with three-way moneylines, goal handicaps and totals for the full game and halves, and player props. The same schema and jobs work; the soccer odds API page has the details. The same limit applies: data is collected forward, not bought as past seasons.

Plans and cost

Line history is on every paid plan. Edge ($49.99 a month) includes 100,000 credits, enough for a full NFL week's kickoff captures many times over; Sharp ($199.99) and Syndicate ($249.99) are unlimited, and Syndicate adds in-play prices and history for games in progress. The free Sandbox's 50 credits work for pre-game odds and final scores but not /v1/history. See pricing.

Frequently asked questions

Can I download a football betting database of past seasons?

Not from PreciseAPI. There is no bulk download and no archive of past seasons; line history stays readable for 48 hours after a market's last change. Build your database forward with scheduled jobs, or buy past seasons from an archive provider.

What NFL betting data is available?

Moneylines, spreads and totals for the full game, halves and quarters, alternates, team totals, player props, futures and final scores, all on shared ids. Recorded line history covers the main full-game moneyline, spread and total.

How do I get NFL closing lines?

Capture them. A job that runs as each game kicks off saves every book's current lines and the line history up to that moment. The last move before start_time is the close.

Can I grade first-half and quarter bets from the data?

Not from the feed alone. /v1/scores has final scores but no scores by period, so first-half and quarter results need another source.

Does the database include college football?

Yes. The ncaaf league covers men's FBS games with the same markets and ids as the NFL, though smaller games are priced by fewer books.

Keep reading