tori
by zeriaxdev
README.md
# tori
Tori.fi scraper + price analyzer, exposed over MCP. Same shape as `kruoka`.
No API key: Tori's search page embeds its full react-query cache as base64 JSON,
so `search()` reads structured listings straight out of the HTML. Item pages
expose JSON-LD `Product`.
## Tools
| tool | what |
|:--|:--|
| `search` | query, page, sort, filters → listings + category facets |
| `get_item` | listing ID → title, price, description, condition, properties |
| `analyze_price` | query + price → percentile, median comparison, verdict |
| `analyze_listing` | listing ID → same, using the ad's own title and price |
## Analyzer
Pulls N pages of comparables, keeps titles matching every query word (whole-word,
so "s" doesn't match a Series X), drops prices outside 0.25×–4× the median, then
reports min/p25/median/p75/max and where the price sits.
Tori's search is loose — a console query returns games and controllers. When the
sample looks mixed, narrow with the `product_category` value from the returned
`categories` facets:
```ts
analyze("xbox series s", 200, 3, { product_category: "2.93.3905.63" }) // Pelikonsolit
```
These are **asking** prices, not sold prices.
## Run
```sh
bun install
bun test
bun run mcp # stdio MCP server
claude mcp add tori -- bun "$(pwd)/src/mcp.ts" # run from the repo root
```
## Not here
- Hintaopas / Hintaseuranta retail reference: both sit behind a Cloudflare JS
challenge, so they need a headless browser. Not wired up.
- No cache, no scheduler, no HTTP API — add if the request rate ever justifies it.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues