{
  "openapi": "3.0.1",
  "info": {
    "title": "Ubuy Global Scraper: Cross-Border Prices & Specs",
    "description": "Extracts detailed competitive prices, specifications, currencies, and origins from Ubuy (operating in 180+ countries, e.g. ubuy.com, ubuy.com.se, ubuy.co.in). Supports search keywords and category listings.",
    "version": "0.1",
    "x-build-id": "jR9D5lMdEPLHd9ZRU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/getascraper~ubuy-com-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-getascraper-ubuy-com-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/getascraper~ubuy-com-scraper/runs": {
      "post": {
        "operationId": "runs-sync-getascraper-ubuy-com-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/getascraper~ubuy-com-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-getascraper-ubuy-com-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "Scraping Mode",
            "enum": [
              "search",
              "category",
              "urls"
            ],
            "type": "string",
            "description": "Choose how to find items: keyword search, a category page, or a direct list of product URLs.",
            "default": "search"
          },
          "domain": {
            "title": "Ubuy Country Domain",
            "enum": [
              "ubuy.us",
              "ubuy.co.in",
              "ubuy.com.se",
              "ubuy.com.tr",
              "ubuy.ca",
              "ubuy.ae",
              "ubuy.com.sa",
              "ubuy.co.jp"
            ],
            "type": "string",
            "description": "Select the specific Ubuy country site domain (and local currency) to crawl.",
            "default": "ubuy.us"
          },
          "keywords": {
            "title": "Search Keywords",
            "type": "string",
            "description": "The search query term to look up across Ubuy's directory (only applicable in search mode).",
            "default": "apple watch"
          },
          "categoryUrl": {
            "title": "Direct Category URL",
            "type": "string",
            "description": "Scrape a specific Ubuy category page (e.g. https://www.ubuy.co.in/category/electronics-10172). Only applicable in category mode.",
            "default": ""
          },
          "productUrls": {
            "title": "Product URLs",
            "type": "array",
            "description": "A list of specific Ubuy product page URLs to scrape directly (e.g. https://www.ubuy.co.in/product/SKU-slug). Only applicable in product URLs mode. Each URL is fetched as a full detail record.",
            "default": [],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "sortBy": {
            "title": "Sort Results By",
            "enum": [
              "relevanceblender",
              "date-desc-rank",
              "price-asc-rank",
              "price-desc-rank",
              "review-rank"
            ],
            "type": "string",
            "description": "Order the listing results before scraping. Useful to grab the cheapest or top-rated items first (search and category modes only).",
            "default": "relevanceblender"
          },
          "minPrice": {
            "title": "Minimum Price",
            "minimum": 0,
            "type": "number",
            "description": "Filter results to only include products with a price greater than or equal to this value in local currency.",
            "default": 0
          },
          "maxPrice": {
            "title": "Maximum Price",
            "minimum": 0,
            "type": "number",
            "description": "Filter results to only include products with a price less than or equal to this value in local currency.",
            "default": 10000
          },
          "scrapeDetails": {
            "title": "Fetch Deep Specifications",
            "type": "boolean",
            "description": "If enabled, navigates to each product detail page to extract the original list price, discount, full specs table, and review counts. Leaving this disabled is faster and cheaper.",
            "default": false
          },
          "convertToUsd": {
            "title": "Add Estimated USD Price",
            "type": "boolean",
            "description": "Add a price_usd field converted from the local currency using a live exchange rate. The value is a labeled estimate for cross-country comparison, not the price you pay at checkout.",
            "default": true
          },
          "flattenOutput": {
            "title": "Flatten Specs For CSV And Sheets",
            "type": "boolean",
            "description": "Spread the nested specifications object into separate spec_* columns. Turn this on for clean CSV, Excel, and Google Sheets exports where each specification gets its own column instead of one JSON blob.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum Listings Limit",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum total product records to extract during this crawl run.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Residential proxies (the default) are needed to pass Ubuy's Cloudflare protection reliably. Datacenter works intermittently but gets blocked under load, so it is not recommended.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}