Documentation → Thematic taxonomy
Documentation

Thematic taxonomy

Three levels: keyword, theme, top-level category.

What it is good for is on the product page: Thematic taxonomy

GET /taxonomy/by-parent/{parent_id}

Stocks By Parent

Peer comparison: every stock under one parent or grandparent.

NameTypeMeaning
parent_idstring, in path
required
levelstring, in query
optional · default parent
groupstring, in query
optional · default listing
listing = rohe Tag-Zeilen (Default, unveraendert); company = Trefferliste wie /tickers/by-keyword
activeboolean, in query
optional
nur aktive/inaktive Titel (nur bei group=company)
sortstring, in query
optional · default relevance
relevance = staerkste Themenzuordnung zuerst; market_cap = groesste Marktkapitalisierung zuerst
limitinteger, in query
optional · default 200
offsetinteger, in query
optional · default 0

Example

curl "$API/taxonomy/by-parent/482" \
  -H "X-API-Key: $KEY"
GET /taxonomy/grandparents

List Grandparents

The coarse level (~300 categories). Labels come from the curated registry (kw_taxonomy_grandparents) where present; otherwise from a fallback aggregation.

NameTypeMeaning
tag_typestring, in query
optional
statusstring, in query
optional
draft|approved|frozen
limitinteger, in query
optional · default 500

Example

curl "$API/taxonomy/grandparents" \
  -H "X-API-Key: $KEY"
POST /taxonomy/grandparents/bulk

Grandparent Bulk

Massenaktionen wie review_taxonomy.py gp-bulk, nur aus der Oberfläche: kohärente Gruppen freigeben bzw. freigegebene einfrieren.

No parameters.

Request body GrandparentBulk

NameTypeMeaning
actionstring
required
Action
tag_typestring
optional
Tag Type
reviewerstring
optional
Reviewer
dry_runboolean
optional · default True
Dry Run

Example

curl -X POST "$API/taxonomy/grandparents/bulk" \
  -H "X-API-Key: $KEY" \
  -H "Content-Type: application/json" \
  -d '{ … }'
POST /taxonomy/grandparents/move-parents

Move Parents

Parents unter einen anderen Grandparent hängen — das Werkzeug gegen die Ward-Artefakte (einzelne Ausreißer in einer sonst sauberen Gruppe).

Zusammenführen zweier Grandparents ist derselbe Vorgang mit allen Parents der Quelle. Schreibt in drei Collections, weil grandparent_id in kw_taxonomy_map und kw_taxonomy_stock denormalisiert liegt — würde nur die Registry geändert, liefen Peer-Abfragen auf by-parent?level=grandparent weiter auf den alten Wert.

No parameters.

Request body MoveParents

NameTypeMeaning
parent_idsarray
required
Parent Ids
target_grandparent_idstring
required
Target Grandparent Id
reviewerstring
optional
Reviewer
dry_runboolean
optional · default True
Dry Run

Example

curl -X POST "$API/taxonomy/grandparents/move-parents" \
  -H "X-API-Key: $KEY" \
  -H "Content-Type: application/json" \
  -d '{ … }'
GET /taxonomy/grandparents/{grandparent_id}

Grandparent Detail

One grandparent with its fine-grained parents (from the registry).

NameTypeMeaning
grandparent_idstring, in path
required

Example

curl "$API/taxonomy/grandparents/SAP" \
  -H "X-API-Key: $KEY"
PATCH /taxonomy/grandparents/{grandparent_id}

Patch Grandparent

Label (6 Sprachen), Status und Notiz eines Grandparents ändern.

Die Registry ist die maßgebliche Label-Quelle — die großen Collections joinen per grandparent_id, ein Label-Fix wirkt also sofort überall.

NameTypeMeaning
grandparent_idstring, in path
required

Request body GrandparentPatch

NameTypeMeaning
labelsobject
optional
Labels
statusstring
optional
Status
coherentboolean
optional
Coherent
notestring
optional
Note
reviewerstring
optional
Reviewer

Example

curl -X PATCH "$API/taxonomy/grandparents/SAP" \
  -H "X-API-Key: $KEY" \
  -H "Content-Type: application/json" \
  -d '{ … }'
GET /taxonomy/keyword/{keyword_id}

Keyword Mapping

The reverse of /parents/{parent_id}/keywords: from ONE keyword upwards to its parent and grandparent.

keyword_id is the same id as in /tickers/keywords and in keywords_multilingual.keyword_id — every keyword has exactly one mapping. Mind status: needs_review means machine-clustered and unconfirmed; candidates shows the alternatives with their score.

Example: /taxonomy/keyword/cybersecurityindustry:cybersecurity.

NameTypeMeaning
keyword_idstring, in path
required

Example

curl "$API/taxonomy/keyword/12345" \
  -H "X-API-Key: $KEY"
GET /taxonomy/keywords/resolve

Resolve Keywords

The batch variant: resolve many keywords to their parents in ONE call — so a client does not have to query a stock's keyword list keyword by keyword. Unmapped ids are absent from the response (no 404).

NameTypeMeaning
idsstring, in query
required
Komma-getrennte keyword_ids, max. 500

Example

curl "$API/taxonomy/keywords/resolve?ids=SAP" \
  -H "X-API-Key: $KEY"
GET /taxonomy/parents

List Parents

The fine-grained level (~7,000 parents).

NameTypeMeaning
tag_typestring, in query
optional
grandparent_idstring, in query
optional
searchstring, in query
optional
Filtert label_en/label_de
limitinteger, in query
optional · default 200

Example

curl "$API/taxonomy/parents" \
  -H "X-API-Key: $KEY"
GET /taxonomy/parents/{parent_id}/keywords

Parent Keywords

Every detail keyword mapped to this parent.

NameTypeMeaning
parent_idstring, in path
required
limitinteger, in query
optional · default 500

Example

curl "$API/taxonomy/parents/482/keywords" \
  -H "X-API-Key: $KEY"
POST /taxonomy/review/bulk

Review Bulk

Viele Fälle auf einmal entscheiden (nur approve/reject — ein Sammel-Reassign auf EINEN Parent wäre fast immer falsch).

Läuft per Default als dry_run und meldet nur, wie viele betroffen wären. Erst dry_run=false schreibt. Der Vorzustand landet vollständig im Log, die Aktion ist über batch_id als Ganzes zurücknehmbar.

No parameters.

Request body BulkReview

NameTypeMeaning
verdictstring
optional · default approve
Verdict
tag_typestring
optional
Tag Type
ranksstring
optional
Ranks
min_countinteger
optional · default 0
Min Count
self_namedboolean
optional
Self Named
llm_agreesboolean
optional
nur Fälle, in denen der LLM-Vorschlag die Pipeline bestätigt
min_llm_confidencenumber
optional · default 0.0
Min Llm Confidence
keyword_idsarray
optional
Keyword Ids
reviewerstring
optional
Reviewer
limitinteger
optional · default 5000
Limit
dry_runboolean
optional · default True
Dry Run

Example

curl -X POST "$API/taxonomy/review/bulk" \
  -H "X-API-Key: $KEY" \
  -H "Content-Type: application/json" \
  -d '{ … }'
GET /taxonomy/review/log

Review Log

Was wurde zuletzt entschieden (neueste zuerst).

NameTypeMeaning
scopestring, in query
optional
batch_idstring, in query
optional
limitinteger, in query
optional · default 50

Example

curl "$API/taxonomy/review/log" \
  -H "X-API-Key: $KEY"
GET /taxonomy/review/progress

Review Progress

Kopfzeile der Oberfläche: was ist offen, was ist geschafft.

Getrennt nach den beiden Ebenen, weil sie unterschiedlich groß sind und unterschiedlich viel bewirken.

No parameters.

Example

curl "$API/taxonomy/review/progress" \
  -H "X-API-Key: $KEY"
GET /taxonomy/review/queue

Review Queue

Keywords with status=needs_review — prioritised for review. Highest score first (the most obvious corrections).

NameTypeMeaning
tag_typestring, in query
optional
ranksstring, in query
optional · default 0
review_rank-Filter, komma-separiert. 0=echte Entscheidung … 3=nicht vergleichsrelevant. 'all' = ohne Filter
min_countinteger, in query
optional · default 0
nur Keywords ab N Aktien
self_namedboolean, in query
optional
nur/keine Namensgeber-Fälle
has_llmboolean, in query
optional
nur Fälle mit LLM-Vorschlag
llm_disagreesboolean, in query
optional
nur wo LLM != Pipeline-Top-1
searchstring, in query
optional
Volltext auf Label/ID
skipinteger, in query
optional · default 0
limitinteger, in query
optional · default 50
min_scorenumber, in query
optional · default 0.0

Example

curl "$API/taxonomy/review/queue" \
  -H "X-API-Key: $KEY"
POST /taxonomy/review/undo

Review Undo

Eine Entscheidung oder eine ganze Massen-Aktion zurücknehmen.

Spielt den im Log festgehaltenen Vorzustand zurück. Felder, die es vorher nicht gab (reviewed_at beim ersten Review), werden entfernt statt auf null gesetzt — sonst würde {"$exists": true} weiter greifen.

No parameters.

Request body UndoRequest

NameTypeMeaning
entry_idstring
optional
Entry Id
batch_idstring
optional
Batch Id

Example

curl -X POST "$API/taxonomy/review/undo" \
  -H "X-API-Key: $KEY" \
  -H "Content-Type: application/json" \
  -d '{ … }'
POST /taxonomy/review/{keyword_id}

Review Decision

Records a review decision for a keyword. approve = confirm the mapping; reject = mark it wrong; reassign = move it manually to a parent_id (which must exist).

NameTypeMeaning
keyword_idstring, in path
required

Request body ReviewDecision

NameTypeMeaning
verdictstring
required
Verdict
parent_idstring
optional
Parent Id
reviewerstring
optional
Reviewer
notestring
optional
Note

Example

curl -X POST "$API/taxonomy/review/12345" \
  -H "X-API-Key: $KEY" \
  -H "Content-Type: application/json" \
  -d '{ … }'
GET /taxonomy/stats

Taxonomy Stats

Overview: number of levels and coverage.

No parameters.

Example

curl "$API/taxonomy/stats" \
  -H "X-API-Key: $KEY"
GET /taxonomy/stock/{stock_id}

Stock Tags

Parent and grandparent tags of a stock (deduplicated).

NameTypeMeaning
stock_idstring, in path
required
compare_onlyboolean, in query
optional · default False
Nur vergleichsrelevante Arten

Example

curl "$API/taxonomy/stock/SAP" \
  -H "X-API-Key: $KEY"
{
  "isin": "DE0007164600",
  "grandparents": ["Unternehmenssoftware", "Cloud-Infrastruktur"],
  "parents": ["ERP", "Datenbanken", "Business Intelligence"],
  "keywords": 47
}