← All projects
Media Technology

Almagest

A universal product catalog for media — the foundation for personalized experiences

Year
2024–present
Our role
Design & engineering
Stack
GoPostgreSQLMeilisearchAI/LLM

The Problem

Media metadata is scattered, inconsistent, and messy. A single book might have different titles, authors listed in different formats, and conflicting publication dates depending on where you look. Movies have dozens of alternate titles across regions. Podcast feeds disappear or change URLs without warning.

Building any personalized media experience — a collection tracker, a recommendation engine, a family library — means first solving the catalog problem. And solving it once, correctly, so that every application built on top starts with clean, consistent, and complete data.

About Almagest

Almagest is a unified media catalog API that normalizes books, movies, TV shows, podcasts, and YouTube content into a single, consistent data model. It ingests raw metadata from various sources, uses AI to clean and reconcile conflicting information, and exposes a fast API that any application can build on.

Rather than every media application reinventing metadata ingestion and cleanup, Almagest handles it centrally. Applications that consume the API get clean titles, accurate authorship, normalized dates, organized series, and curated cover art — without writing a single line of data pipeline code.

The name comes from Ptolemy's ancient star catalog — a comprehensive reference that mapped the known universe. Almagest does the same for media: one catalog to find anything.

43.3M
Media Items
17.9M
People
3.1M
Subjects
4.4K
Genres
10.0M
Cover Images
84.1M
Cross-References
40.7M
Books
2.7M
Movies & TV

Media Types

📚

Books

Titles, authors, series, editions, and formats across fiction and non-fiction

🎬

Movies

Feature films with cast, crew, genres, ratings, and regional release data

📺

TV Shows

Series with season and episode breakdowns, air dates, and network information

🎙️

Podcasts

Shows and episodes with host information, topics, and feed metadata

▶️

YouTube

Channels and videos with creator info, categories, and playlist organization

🔗

Cross-Media

Links related items across types — the book, its film adaptation, and the podcast interview with the author

AI-Powered Intelligence

Raw media metadata is rarely ready to use. Almagest applies AI at every stage of the pipeline to turn messy inputs into clean, structured catalog data.

Intelligent Data Cleaning

Metadata from different sources arrives in different formats, with different conventions, and often with outright errors. AI models reconcile conflicting information, normalize naming conventions, fix encoding issues, and resolve ambiguities — producing a single canonical record from multiple noisy inputs.

The result is a catalog where "J.R.R. Tolkien", "Tolkien, J. R. R.", and "John Ronald Reuel Tolkien" all resolve to the same person, and where "The Fellowship of the Ring" is correctly identified regardless of which edition, translation, or format it appears in.

Automatic Series and Collection Detection

AI identifies relationships between media items that aren't always explicit in the raw data. Books that belong to a series are grouped and ordered automatically. Movies in a franchise are linked together. TV shows are connected to their spinoffs and reboots.

This goes beyond simple title matching. The AI understands that "A Game of Thrones" is book one of "A Song of Ice and Fire," that the TV adaptation is "Game of Thrones," and that "House of the Dragon" is a prequel — building a rich graph of relationships that would take enormous manual effort to maintain.

Intelligent Cover Art Selection

A media catalog is only as good as its visual presentation. Almagest uses AI to evaluate available cover images and select the best one — prioritizing high resolution, correct aspect ratio, and visual clarity.

For items with no cover art available, the system identifies and retrieves appropriate imagery automatically. The goal is that every item in the catalog has a clean, recognizable visual representation without any manual curation.

Recommendations & Discovery

Almagest doesn't just store media — it connects it. Every item in the catalog is linked to related content through multiple dimensions, giving consuming applications a rich foundation for personalized recommendations.

Content-Based Similarity

For any item in the catalog, Almagest scores every other item across multiple signals and returns the strongest matches. The scoring weights shared people highest — if two movies share a director or two books share an author, that's a strong connection. Shared genres, year proximity, and media type each add additional signal.

5pts
Shared People
5pts
Same Type
3pts
Shared Genres
≤10pts
Year Proximity

Cross-Media Relations

Beyond similarity scoring, Almagest maintains explicit typed relationships between media items. These are discovered automatically through knowledge graph queries and AI-assisted detection, then stored as first-class links in the catalog.

AdaptationBased OnSequelPrequelRemakeSpin-offRelated

A user looking at "The Lord of the Rings" (book) is one click away from the film trilogy, the animated adaptation, the TV series prequel, and the author's other works — all linked automatically.

Random Discovery

Sometimes the best recommendation is a surprise. The random discovery endpoint returns items the user would never have searched for, optionally filtered by type or genre. With 43 million items in the catalog, there's always something new to find.

What You Can Build

Almagest is infrastructure, not a consumer product. It's the foundation layer that makes building media-centric applications fast and reliable.

Collection Trackers

Track what you own, what you've read or watched, and what's missing from a series. The catalog handles identity and completeness so the app can focus on the experience.

Recommendation Engines

Build personalized suggestions on top of clean, cross-referenced metadata. Know that a user who liked the book will probably want to know about the film.

Family Libraries

Shared catalogs where family members track their own media across formats. One family's books, movies, and shows in a single organized view.

Discovery Tools

Search across media types to find everything related to a topic, creator, or franchise. The cross-media linking makes exploration natural.

Key Features

Continuous Ingestion

A background worker continuously ingests and refreshes metadata from multiple sources. The catalog stays current without manual intervention.

Fast API

A RESTful API built in Go serves catalog queries with low latency. Search by title, browse by category, or look up specific items by ID.

People & Creators

Authors, directors, actors, hosts, and creators are first-class entities. Browse everything by a specific creator across all media types.

Managed Imagery

Cover art and thumbnails are stored, optimized, and served directly. Consuming applications get reliable image URLs without hotlinking concerns.

Architecture

⚙️

Worker

Background process that ingests metadata, runs AI cleaning pipelines, detects series relationships, and selects cover art

⚙️

Catalog Database

PostgreSQL stores the canonical catalog with full-text search, relationship graphs, and change history

⚙️

API Server

Go HTTP server exposes the catalog via RESTful endpoints with search, filtering, and pagination

Sample API

Real request and response examples from the catalog.

Search across all media typesGET /api/v1/search
GET /api/v1/search?q=tolkien&limit=3
Response
{
  "hits": [
    { "id": "48846224", "type": "book", "title": "Tolkien" },
    { "id": "50388879", "type": "book", "title": "Tolkien" },
    { "id": "50718028", "type": "book", "title": "Tolkien" }
  ],
  "total": 376,
  "facets": {
    "type": { "book": 358, "movie": 18 },
    "genres": { "Fantasy": 9, "Fiction": 18, "Biography": 17, ... }
  },
  "processing_time_ms": 294
}
Typeahead autocompleteGET /api/v1/autocomplete
GET /api/v1/autocomplete?q=dark+kni&limit=3
Response
{
  "query": "dark kni",
  "suggestions": [
    { "id": "48832461", "type": "book", "title": "Dark Knight Color by Number" },
    { "id": "49103633", "type": "book", "title": "Dark Knight Returns (Batman" },
    { "id": "49284820", "type": "book", "title": "Dark Knights" }
  ]
}
Browse movies by genreGET /api/v1/media
GET /api/v1/media?type=movie&genre=sci-fi&limit=3
Response
{
  "data": [
    {
      "id": 73905792, "type": "movie",
      "title": "Alien Nation: Body and Soul",
      "year": 1995,
      "cover_path": "media/a1/33/a133ad37...jpg"
    },
    {
      "id": 73905793, "type": "movie",
      "title": "Alien Nation: Dark Horizon",
      "year": 1994,
      "cover_path": "media/b4/72/b472d4ad...jpg"
    },
    {
      "id": 73905794, "type": "movie",
      "title": "Alien Nation: Millennium",
      "year": 1996,
      "cover_path": "media/1b/4a/1b4a0ebd...jpg"
    }
  ],
  "total": 19, "limit": 3, "offset": 0
}
Explore a seriesGET /api/v1/series/search
GET /api/v1/series/search?q=harry+potter
Response
{
  "data": [
    { "id": 1543, "title": "Harry Potter", "media_count": 1 },
    { "id": 384, "title": "Harry Potter (canon divergent fan fiction)", "media_count": 1 }
  ],
  "query": "harry potter"
}

Additional Endpoints

GET /api/v1/media/{id}

Full media detail with people, genres, subjects, ratings, series, and external IDs

GET /api/v1/media/{id}/similar

Content-based recommendations scored by shared people, genres, and year proximity

GET /api/v1/media/{id}/relations

Cross-media links: adaptations, sequels, prequels, remakes, spin-offs

GET /api/v1/media/random

Random discovery, optionally filtered by type or genre

GET /api/v1/people/{id}/media

All media by a person, filterable by role (author, director, actor, etc.)

GET /api/v1/people/search

Search 17.9M people by name

GET /api/v1/genres

All genres with media counts

GET /api/v1/stats

Catalog-wide statistics with breakdowns by type and source

Have a project like this one?

We'd be glad to talk through your goals, your constraints, and whether we're the right team for the work.