# Defacto (Türkiye) — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and browse DeFacto's Turkish product catalog to find clothing items, explore categories, and view detailed product information including pricing and availability. Apply filters to narrow down results by color, size, gender, and more.

**Category:** E-commerce | **Website:** [defacto.com.tr/](https://defacto.com.tr/) | **Docs:** [parse.bot/marketplace/df4048af-5e95-4c40-9e32-4308c8e96df8/defacto-com-tr-api](https://parse.bot/marketplace/df4048af-5e95-4c40-9e32-4308c8e96df8/defacto-com-tr-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-defacto-com-tr-api-df4048af/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### browse_category

Browse products in a specific DeFacto category by URL slug. Supports optional Turkish-language filters via a semicolon-separated filter string. Returns paginated product summaries. Filter keys and values are discoverable via get_search_filters.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_slug` | string | Yes | Category URL slug (e.g., 'erkek-t-shirt', 'kadin-elbise') |
| `filters` | string | No | Filter string passed as 'filtre' query parameter in format 'key:value;key:value' (e.g., 'renk:mavi', 'renk:mavi;beden:l'). Filter group names and values are Turkish and can be discovered via the get_search_filters endpoint. |
| `page` | integer | No | Page number for pagination. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-defacto-com-tr-api-df4048af/browse_category \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category_slug":"<string>","filters":"<string>","page":"<integer>"}'
```

### get_product_details

Retrieve full product details for a single item including images, available sizes with stock, color variants, material composition, and properties. Accepts product URL paths or full URLs. The productUrl field from search_products or browse_category results can be passed directly.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `product_url` | string | Yes | Product URL path or full URL (e.g., '/oversize-tisort-3374606' or 'https://www.defacto.com.tr/oversize-tisort-3374606'). The productUrl field from search_products or browse_category results can be used directly. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-defacto-com-tr-api-df4048af/get_product_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product_url":"<string>"}'
```

### get_search_filters

Retrieve available filter options for a search query. Returns filter groups like Cinsiyet (gender), Kategori (category), Beden (size), Renk (color), Fiyat (price), Yaka (collar), Kol Boyu (sleeve length), Kalıp (fit). Filter names and values are in Turkish and can be used with browse_category's filters parameter.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword to get available filters for (e.g., 'tişört', 'elbise', 'ayakkabi') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-defacto-com-tr-api-df4048af/get_search_filters \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### search_products

Full-text search over DeFacto's product catalog by keyword. Returns paginated product summaries including title, price, color, sizes, and stock. Pagination via integer page parameter. Results are in Turkish.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number for pagination. |
| `query` | string | Yes | Search keyword in Turkish (e.g., 'tişört', 'elbise', 'ayakkabı') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-defacto-com-tr-api-df4048af/search_products \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","query":"<string>"}'
```
