---
title: "Get In Focus"
method: GET
path: "/api/v1/events/in-focus"
tags: ["events"]
---

# Get In Focus

`GET /api/v1/events/in-focus`

## Request

- Base URL: `https://api.pdata.world`
- URL: `https://api.pdata.world/api/v1/events/in-focus`
- Auth: none declared

Curated 4-source-group × 5-category grid for the homepage.

Reads the pre-materialized `InFocusOut` payload from `in_focus_grid`
(single-row table, refreshed by the scheduler every ~5 min via
`compute_and_store_in_focus_grid`). One indexed row fetch + Pydantic
JSON validation = ~5ms backend latency.

See `compute_and_store_in_focus_grid` for the writer side and the
`_IN_FOCUS_SQL` / `_PULSE_SQL` doc-blocks for the curation algorithm:

Two-pass fill:

1. **Priority-5 candidates** (`_IN_FOCUS_SQL`). For every (group,
   category) cell, the top-N markets (by score = |Δprob| × cf)
   whose parent event carries that category. Same logic for all
   four strips.
2. **Pulse extension** (`_PULSE_SQL`, **'others' + 'manifold'
   strips**). Pulse rows fill empty cells in those two strips
   with the next-best market from the same source(s) whose parent
   event sits OUTSIDE the priority 5 (Health, Economics, Climate,
   etc.). Drained via an **empty-first** policy — each pulse
   market goes to the cell with the fewest current candidates —
   so a strip with 15 pulse markets and 5 cells distributes ~3
   per cell rather than piling 10 into cell 0.

   Pulse is **NOT** applied to Polymarket or Kalshi. Their
   priority-5 coverage is dense enough that a missing cell is
   signal ("nothing in Elections moved >2pp on Polymarket today")
   rather than a layout bug. Manifold *is* pulse-extended
   because, despite high market volume overall, its category
   mix skews away from Culture/World — the strip would otherwise
   leave those cells empty.

Both queries respect the `_IN_FOCUS_BLOCKED_QUESTION_PATTERNS`
title kill-switch — see that constant for the list and how to
extend it.

## Response `200`

Successful Response

- InFocusOut: Grid of curated markets for the homepage 'in focus' strip. `categories` lists the 5 categories in priority order. `groups` is keyed by source group; each value is a list of length 5 aligned to `categories`. `groups[g][i]` is now a LIST of up to ~10 candidate markets for category `categories[i]` in group `g`, in score-DESC order. The frontend's strip-level refresh button rotates through these candidates with a within-strip event-uniqueness constraint. Empty list means no qualifying market for that cell — the cell renders as a placeholder.
  - `categories` string[], required
  - `groups` object, required
  - `_meta` ResponseMetaList: Agent metadata for list/aggregate responses (no cite_as).
    - `attribution` string: Who aggregated this data, under which licence, and whose data it is.
    - `canonical_url` string, required: Stable URL for this resource: the pdata.world page, or the API URL for list responses.
    - `as_of` string, date-time: When this response was generated (UTC).
    - `docs` string: API documentation.

---

[API](https://skmtc.dev/pdata/apis/pdata-backend.md) · [All operations](https://skmtc.dev/pdata/apis/pdata-backend/llms.txt) · [OpenAPI document](https://skmtc.dev/pdata/apis/pdata-backend/revisions/4c9bf3856786?raw)
