RikaidoDeveloper

GET /v1/graph

The food graph

One ingredient in; what the graph knows out. What it is made of, what replaces it, and its neighbourhood.

GEThttps://api.rikaido.app/v1/graph/ingredients/:name

The graph is what knows that “peanut butter” breaks “peanut”, that “coconut milk” does not break “milk”, and that honey replaces sugar at 7 to 8. It is the harness's private half; through this door you read it one ingredient at a time.

The request

:namestring · required
The ingredient's name, in English or French, as a person writes it. “peanut butter”, “beurre d’arachide”, “chicken thigh”.
?neighbours=1flag
Adds the neighbourhood — the nodes and edges around the ingredient: what it pairs with, what it replaces, what contains it.

The answer

200
{
  "query": "beurre d’arachide",
  "canonical": "peanut butter",
  "known": true,
  "facts": {
    "allergens": ["peanut"],
    "animalFlesh": false,
    "animalProduct": false,
    "seafood": false,
    "matched": ["peanut butter"]
  },
  "substitutions": [],
  "art": { "slug": "peanut_butter", "kawaii": true, "toy": true }
}
knownboolean
false when the graph has never seen this food. It does not mean “contains nothing” — it means it could read nothing. The harness names that case unknown-ingredient.
facts.allergens[]string[]
Among the nine: peanut, tree-nut, milk, egg, wheat, soy, fish, shellfish, sesame.
facts.matched[]string[]
The words that decided it, longest first. It is what lets a refusal card name the thing refused, not the whole line.
substitutions[]{ swap, ratio, preservesRole, why, caveat? }
The swaps the table holds, with the ratio and the role preserved. Empty for the long tail — never invented.
art{ slug, kawaii, toy }
The same slug the cast reads, and what it has drawn.
neighbourhoodobject | null
With ?neighbours=1: { found, focusId, nodes[], edges[] }. null when the hosted graph is unreachable — never an empty neighbourhood that would look true.

Search

GEThttps://api.rikaido.app/v1/graph/search?q=&limit=&locale=

The graph's own search, lexical and semantic: q (up to 80 characters), limit (1–20, default 8), locale (fr or en; labels come back in that language). Answers 503 graph_not_configured when the hosted graph is unreachable.

What it costs

$0.002 per call, search or read. A 400, a 404 and a 503 are not counted.