# Dafiti — Latin America's largest fashion marketplace (Brazil + Colombia), with size-level availability, brand, colour, discount and marketplace seller

> Search Dafiti's fashion catalogue by keyword. Every row carries the brand, the colour, the seller, the cash price AND the struck-through list price, the discount, and whether the tile was a paid placement. A query that matches nothing returns an honest empty result rather than the padded grid the site shows in its place.
> ReefAPI engine `dafiti` · 4 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/dafiti/v1/<action>` with a JSON body.
- **Auth:** header `x-api-key: <YOUR_REEFAPI_KEY>` — create one free (1,000 credits, no card): https://reefapi.com/signup
- **Response (every call):** `{ ok: boolean, data: ..., meta: { record_count, credits, ... }, error: { code, message } }` — branch on `ok`. Failed calls are free except verified SHEIN NOT_FOUND on product/detail and price (4 credits).
- **One key + one shared credit pool** across every ReefAPI API. Per-call credits are listed on each endpoint below.
- **Use it from an AI agent (MCP):** connect `https://api.reefapi.com/mcp` (remote streamable-http, `Authorization: Bearer <key>`) and your assistant can call these actions directly.

## Endpoints

### POST /dafiti/v1/search — 3 credits
Search Dafiti's fashion catalogue by keyword. Every row carries the brand, the colour, the seller, the cash price AND the struck-through list price, the discount, and whether the tile was a paid placement. A query that matches nothing returns an honest empty result rather than the padded grid the site shows in its place.

**Parameters:**
- `query` (string, required) — What a shopper would type, in the storefront's language: 'tenis nike', 'vestido longo', 'bolsa couro'.
- `country` (enum, optional, default "br") — Which Dafiti storefront to read. Only two of the four historical storefronts are still shops: br (dafiti.com.br, prices in BRL) and co (dafiti.com.co, prices in COP). They are different front-ends with different field coverage — size-level stock exists on br only. [one of: br, co]
- `sort` (enum, optional, default "relevance") — Result order. Only the orders Dafiti actually applies are accepted — it also takes a 'popularity' order and then ignores it (measured: identical to the default), so that one is deliberately not offered. [one of: relevance, price_asc, price_desc, discount, newest]
- `page` (integer, optional, default 1) — Result page. br serves ~58 products per page, co ~48. The source stops paging at its own last page, reported as meta.extra.last_page.
- `limit` (integer, optional) — Cap the rows returned from the page (1-60). The source's page size is fixed, so this trims rather than fetching fewer.
- `brand` (string, optional) — Filter to one brand, spelled as `facets.brands` spells it (e.g. 'nike', 'adidas'). br only.
- `color` (string, optional) — Filter to one colour, spelled as `facets.colors` spells it ('Preto', 'Branco', 'Azul'). br only.
- `size` (string, optional) — Filter to products available in one size, as `facets.sizes` spells it ('40', 'M', 'PP'). br only.
- `seller` (string, optional) — Filter to one marketplace seller, as `facets.sellers` spells it. 'Dafiti' means Dafiti's own stock. br only.
- `price_min` (number, optional) — Lowest price to include, in the storefront's own currency.
- `price_max` (number, optional) — Highest price to include, in the storefront's own currency.
- `free_shipping` (boolean, optional) — Only products Dafiti ships free. Measured to bite: 'tenis' goes from 34 667 to 9 779 results. br only.

**Returns:** products[]{sku, title, brand, color, sold_by_dafiti, seller, url, image, price_pix_brl|price_cop, price_card_brl, list_price_brl|list_price_cop, discount_pct, discount_pct_source, installments, category_path, sponsored, currency}, total_results, page, last_page, facets{brands,colors,sizes,sellers}, no_match, sponsored_count

**Example request body:**
```json
{
  "query": "tenis",
  "country": "br"
}
```

### POST /dafiti/v1/category — 3 credits
Browse a Dafiti category page (e.g. 'roupas-femininas/vestidos') with the same row shape and the same filters as search. Use it to walk a catalogue rather than guess keywords.

**Parameters:**
- `category_path` (string, required) — The category path exactly as it appears in a Dafiti URL, without the host and without leading or trailing slashes. A path the site does not have returns NOT_FOUND, not an empty page.
- `country` (enum, optional, default "br") — Which Dafiti storefront to read. Only two of the four historical storefronts are still shops: br (dafiti.com.br, prices in BRL) and co (dafiti.com.co, prices in COP). They are different front-ends with different field coverage — size-level stock exists on br only. [one of: br, co]
- `sort` (enum, optional, default "relevance") — Result order. Only the orders Dafiti actually applies are accepted — it also takes a 'popularity' order and then ignores it (measured: identical to the default), so that one is deliberately not offered. [one of: relevance, price_asc, price_desc, discount, newest]
- `page` (integer, optional, default 1) — Result page. br serves ~58 products per page, co ~48. The source stops paging at its own last page, reported as meta.extra.last_page.
- `limit` (integer, optional) — Cap the rows returned from the page (1-60). The source's page size is fixed, so this trims rather than fetching fewer.
- `brand` (string, optional) — Filter to one brand, spelled as `facets.brands` spells it (e.g. 'nike', 'adidas'). br only.
- `color` (string, optional) — Filter to one colour, spelled as `facets.colors` spells it ('Preto', 'Branco', 'Azul'). br only.
- `size` (string, optional) — Filter to products available in one size, as `facets.sizes` spells it ('40', 'M', 'PP'). br only.
- `seller` (string, optional) — Filter to one marketplace seller, as `facets.sellers` spells it. 'Dafiti' means Dafiti's own stock. br only.
- `price_min` (number, optional) — Lowest price to include, in the storefront's own currency.
- `price_max` (number, optional) — Highest price to include, in the storefront's own currency.
- `free_shipping` (boolean, optional) — Only products Dafiti ships free. Measured to bite: 'tenis' goes from 34 667 to 9 779 results. br only.

**Returns:** same product rows as `search`, plus total_results, page, last_page, facets, category_path

### POST /dafiti/v1/product — 3 credits
One product in full: prices (cash and card), the struck-through list price, the discount, brand, colour, marketplace seller, rating and review count, the attribute table, the images, the other colourways — and on br the full size list with a remaining-stock integer per size.

**Parameters:**
- `sku` (string, required) — The Dafiti config SKU from a search row ('KO992SHF67UFS'). A variant SKU ending in '-53' is accepted and resolved to its parent.
- `country` (enum, optional, default "br") — Which Dafiti storefront to read. Only two of the four historical storefronts are still shops: br (dafiti.com.br, prices in BRL) and co (dafiti.com.co, prices in COP). They are different front-ends with different field coverage — size-level stock exists on br only. [one of: br, co]

**Returns:** product{sku, title, brand, color, seller, url, currency, price_pix_brl|price_cop, price_card_brl, list_price_*, discount_pct, rating, review_count, description, category_path, images[], sizes[]{size, variant_sku, in_stock, stock_qty, stock_at_least, stock_capped, seller}, sizes_in_stock, sizes_total, stock_total, stock_total_at_least, other_colors[], attributes{}}

### POST /dafiti/v1/availability — 1 credit
SIZE-LEVEL STOCK for up to 10 products in ONE call, from the storefront's own 3.7 KB JSON: per size, the variant SKU, whether it is buyable, how many units remain, and who ships it. Brazil only — the Colombian storefront publishes no stock anywhere. This is the cheap call: use it to re-check stock, and `product` only when you need the full record.

**Parameters:**
- `skus` (array, required) — 1-10 Dafiti config SKUs. Ten SKUs in one call cost one credit, where ten `product` calls would cost more and move 78x the bytes.
- `country` (enum, optional, default "br") — Brazil only: the Colombian storefront has no stock endpoint and no published size names. [one of: br]

**Returns:** items[]{sku, title, brand, url, price_pix_brl, list_price_brl, sizes[]{size, variant_sku, in_stock, stock_qty, seller}, sizes_in_stock, sizes_total, stock_total, stock_total_at_least}, requested, resolved, not_found[]

**Example request body:**
```json
{
  "skus": [
    "KO992SHF67UFS"
  ]
}
```

## More
- Try it live, no code: https://reefapi.com/playground?engine=dafiti
- Human docs page: https://reefapi.com/docs/dafiti
- Overview page: https://reefapi.com/dafiti-api
- Every ReefAPI API in one file (for your AI): https://reefapi.com/llms-full.txt
