defacto.com APIdefacto.com ↗
Access DeFacto Turkey fashion products via API. Search items, browse categories, get variant details, filter results, and add to cart programmatically.
curl -X GET 'https://api.parse.bot/scraper/4fb23c7d-8a75-43c8-a180-b732e963007a/search_products?page=1&query=tshirt' \ -H 'X-API-Key: $PARSE_API_KEY'
Search for products by keyword on DeFacto Turkey. Returns paginated results with product details including pricing, color, stock, and campaign information.
| Param | Type | Description |
|---|---|---|
| page | integer | Page number for pagination. |
| queryrequired | string | Search keyword (e.g. 'tshirt', 'dress'). |
{
"type": "object",
"fields": {
"page": "current page number",
"count": "number of products returned on this page",
"query": "the search query used",
"products": "array of product objects with LongCode, Name, Price, DiscountedPrice, ColorName, Stock, Sizes, CampaignBadge, and more"
},
"sample": {
"data": {
"page": 1,
"count": 24,
"query": "tshirt",
"products": [
{
"Name": "Standart Fıt Polo Yaka Tişört",
"Price": 999.99,
"Sizes": [
{
"Barcode": "8684582386275",
"MatrixId": null,
"SizeName": "XL"
}
],
"Stock": 30,
"LongCode": "F7611AX26SPER14",
"ColorName": "Ekru",
"DiscountedPrice": 999.99,
"CampaignDiscountedPrice": 500
}
]
},
"status": "success"
}
}About the defacto.com API
The DeFacto API covers 5 endpoints for interacting with DeFacto Turkey's apparel catalog, from keyword search to cart management. search_products returns paginated results with fields like DiscountedPrice, ColorName, Stock, Sizes, and CampaignBadge, while get_product_detail exposes the ProductVariantMatrixId values you need to add specific size variants to a cart.
Search and Category Browsing
The search_products endpoint accepts a required query string (e.g. 'tshirt', 'dress') and an optional page integer for pagination. Each product in the response includes LongCode, Name, Price, DiscountedPrice, ColorName, Stock, Sizes, and CampaignBadge. The get_category_products endpoint works the same way but accepts a category slug (e.g. 'women-dresses', 'men-tshirts') instead of a search keyword. Both endpoints return the same product object shape along with page, count, and the originating query or category slug.
Product Detail and Variant Resolution
get_product_detail takes a product_code (the LongCode surfaced by search and category endpoints) and returns a Data array containing ProductName, a Sizes array where each entry includes a ProductVariantMatrixId, and ProductDetailProductColors for available color variants, plus pictures and full pricing. The ProductVariantMatrixId UUID from any size entry is the value required by add_to_cart.
Filtering and Cart Operations
get_search_filters retrieves filter groups for a given query or category slug. Each filter group has a filter_name and an options array with label, value, and optional count fields — covering dimensions like sort order, gender, category, size, color, and price range. The add_to_cart endpoint accepts a variant_id (the ProductVariantMatrixId) and an optional quantity, returning a Turkish-language confirmation string in Data, a Status integer (1 for success), and an ErrorCode integer (0 for no error).
- Build a price-tracking tool that monitors
DiscountedPriceandCampaignBadgechanges across DeFacto's catalog. - Aggregate DeFacto category listings by
slugto populate a comparison shopping feed for Turkish apparel. - Automate size availability checks by polling
StockandSizesfields fromsearch_productsfor specific items. - Construct a faceted search UI using filter groups and option counts returned by
get_search_filters. - Resolve product color variants programmatically via
ProductDetailProductColorsfromget_product_detail. - Automate cart population for order testing by chaining
get_product_detailto obtainProductVariantMatrixIdand passing it toadd_to_cart. - Index DeFacto's apparel catalog by category slug for trend analysis across product names and pricing.
| 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 | 250 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 have an official public developer API?+
How do I go from a search result to adding a specific size to the cart?+
search_products or get_category_products to get a product's LongCode. Pass that value as product_code to get_product_detail, which returns a Sizes array where each entry contains a ProductVariantMatrixId. Use that UUID as variant_id in add_to_cart along with an optional quantity.Does the API cover user account data such as order history or wishlists?+
Is the DeFacto API limited to Turkey, and are prices in Turkish Lira?+
add_to_cart is also in Turkish. Coverage of other regional DeFacto storefronts is not currently included. You can fork it on Parse and revise to add endpoints targeting other regional domains.What does `get_search_filters` return, and can I use filter values to narrow search results?+
get_search_filters returns an array of filter group objects, each with a filter_name and an options array containing label, value, and an optional count. It accepts either a query string or a category slug. The filter values document what dimensions exist (size, color, price range, gender, etc.), but the search_products and get_category_products endpoints do not currently accept those filter values as direct input parameters. You can fork it on Parse and revise to add filtered search support.