DeFacto APIdefacto.com.tr ↗
Access DeFacto's Turkish fashion catalog via API. Search products, browse categories, apply filters, and retrieve full product details including prices and sizes.
What is the DeFacto API?
The DeFacto API exposes 4 endpoints for searching and browsing defacto.com.tr's clothing catalog. Use search_products to query items by keyword and get back titles, prices in TL, discount prices, color names, size arrays, and stock status. Category browsing, filter discovery, and full product detail retrieval — including color variants and garment properties — are also covered.
curl -X GET 'https://api.parse.bot/scraper/22c0353d-b227-4fb8-b925-2d02c14bab0e/search_products?page=1&query=ti%C5%9F%C3%B6rt' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace defacto-com-tr-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""DeFacto Product API — search, browse, filter, and inspect Turkish fashion products."""
from parse_apis.defacto_product_api import DeFacto, ProductNotFound
client = DeFacto()
# Search for t-shirts and inspect the first few results
for product in client.productsummaries.search(query="tişört", limit=3):
print(product.title, product.price, product.colorName)
# Browse a category with a color filter
item = client.productsummaries.browse(category_slug="erkek-t-shirt", filters="renk:beyaz", limit=1).first()
if item:
# Drill into full product details from a summary
detail = item.details()
print(detail.title, detail.categoryPath, detail.brand)
for size in detail.availableSizes:
print(size.name, size.stock)
# Fetch product details directly by URL
try:
product = client.products.get(product_url="/pamuklu-buyuk-beden-boxy-fit-t-shirt-3433353")
print(product.title, product.price, product.discountedPrice)
for variant in product.colorVariants:
print(variant.colorName, variant.productVariantIndex)
except ProductNotFound as exc:
print(f"Product not found: {exc}")
# Discover available filters for a search term
for group in client.filtergroups.list(query="elbise", limit=5):
print(group.group, [opt.name for opt in group.options[:3]])
print("exercised: productsummaries.search / productsummaries.browse / details / products.get / filtergroups.list")
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.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for pagination. |
| queryrequired | string | Search keyword in Turkish (e.g., 'tişört', 'elbise', 'ayakkabı') |
{
"type": "object",
"fields": {
"page": "integer, current page number",
"count": "integer, number of products returned on this page",
"query": "string, the search keyword used",
"products": "array of ProductSummary objects"
},
"sample": {
"data": {
"page": 1,
"count": 24,
"query": "tişört",
"products": [
{
"price": 499.99,
"sizes": [
{
"name": "3XL",
"barcode": "8684585266918"
}
],
"stock": 1350,
"title": "Pamuklu Büyük Beden Boxy Fıt T-shırt",
"seoName": "pamuklu-buyuk-beden-boxy-fit-t-shirt",
"isOutlet": false,
"longCode": "H0997AX26SPBK81",
"colorName": "Siyah",
"productUrl": "https://www.defacto.com.tr/pamuklu-buyuk-beden-boxy-fit-t-shirt-3433353",
"categoryName": "Tişört",
"discountedPrice": 499.99,
"productVariantIndex": 3433353
}
]
},
"status": "success"
}
}About the DeFacto API
Search and Category Browsing
The search_products endpoint accepts a query string (e.g., tişört, elbise, ayakkabı) and an optional page integer for pagination. Each product in the response includes title, longCode, price, discountedPrice, colorName, sizes, stock, productUrl, and imageUrl. The browse_category endpoint works similarly but takes a category_slug (e.g., erkek-t-shirt, kadin-elbise) and an optional filters string in key:value;key:value format — for example, renk:mavi to narrow to blue items.
Product Details and Filter Discovery
get_product_details accepts either a full URL or a path segment (e.g., /oversize-tisort-3374606) and returns the complete product record: images array, colorVariants (each with colorName, imageUrl, and url), structured properties such as Kalıp (fit), Yaka (collar), and Kol Boyu (sleeve length), categoryPath breadcrumb, and description when available. The get_search_filters endpoint takes a query and returns filter groups — Cinsiyet, Kategori, Beden, Renk, Fiyat, Yaka, Kol Boyu, Kalıp, and more — each with name and count fields so you can build dynamic filter UIs or pre-qualify filter values before calling browse_category.
Response Shape Notes
All filter names and values are in Turkish, matching the DeFacto site's locale. Prices are expressed in Turkish Lira (TL). The longCode field acts as a stable product identifier across search and detail responses, making it practical to cross-reference results. Both search and category endpoints return a count field indicating how many products are on the current page alongside the page number.
The DeFacto API is a managed, monitored endpoint for defacto.com.tr — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when defacto.com.tr changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official defacto.com.tr API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Build a price-tracking tool that monitors
priceanddiscountedPricechanges for specificlongCodeproducts over time. - Aggregate size and stock availability across categories using
sizesandstockfields frombrowse_category. - Construct a color-filtered catalog view by passing
renk:valuefilters tobrowse_categoryafter discovering valid color options viaget_search_filters. - Generate product comparison pages by fetching
colorVariantsandpropertiesfromget_product_detailsfor multiple items. - Index DeFacto's category structure by iterating category slugs in
browse_categoryand collectingcategoryPathvalues from detail pages. - Power a fashion recommendation feed that surfaces
discountedPriceitems filtered by gender (Cinsiyet) and size (Beden) from filter discovery results. - Sync product image galleries using the
imagesarray fromget_product_detailsfor use in external merchandising tools.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does DeFacto offer an official developer API?+
What does get_product_details return beyond what search results include?+
get_product_details returns the full images array, structured properties (Kalıp, Yaka, Kol Boyu), all colorVariants with their individual URLs and images, the categoryPath breadcrumb, and a description field. The search and browse endpoints return only summary fields: title, price, discountedPrice, colorName, sizes, stock, productUrl, and imageUrl.How do filters work with browse_category, and how do I know valid filter values?+
get_search_filters with a relevant query to retrieve filter groups and their available values with item counts. Then pass those values as a semicolon-delimited string to the filters parameter of browse_category — for example, renk:mavi;beden:M. All filter keys and values are in Turkish.Does the API expose customer reviews or ratings for products?+
Is pagination supported across all listing endpoints?+
search_products and browse_category both accept a page integer parameter and return page and count in their responses, allowing you to iterate through result pages. get_product_details and get_search_filters return single-page results by nature and do not use pagination.