{
  "openapi": "3.0.1",
  "info": {
    "title": "SmartBuyGlasses",
    "description": "Collect public SmartBuyGlasses product data, including prices, stock status, brands, frame and lens details, and product page links. Choose a store and a way to find products: a catalogue, brand or category pages, product pages, or keywords. Each product is saved as one dataset row.",
    "version": "0.0",
    "x-build-id": "rK7HnHAzd8CadoaEb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maximedupre~smartbuyglasses/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maximedupre-smartbuyglasses",
        "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/maximedupre~smartbuyglasses/runs": {
      "post": {
        "operationId": "runs-sync-maximedupre-smartbuyglasses",
        "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/maximedupre~smartbuyglasses/run-sync": {
      "post": {
        "operationId": "run-sync-maximedupre-smartbuyglasses",
        "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",
        "required": [
          "findProductsBy",
          "regionalStorefront",
          "catalogue"
        ],
        "properties": {
          "findProductsBy": {
            "title": "Find products by",
            "enum": [
              "brand-category-pages",
              "product-search-pages",
              "keywords-or-brands",
              "catalogue"
            ],
            "type": "string",
            "description": "Choose how to find products. For Catalogue, choose a store and catalogue below. For other choices, fill in the matching section; other sections are ignored."
          },
          "brandOrCategoryPageUrls": {
            "title": "Brand or category page URLs",
            "type": "array",
            "description": "Add public URLs for the brand or category pages to read.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "description": "Public brand or category page URL.",
                  "type": "string"
                }
              },
              "required": [
                "url"
              ]
            }
          },
          "productOrSearchPageUrls": {
            "title": "Product or search page URLs",
            "type": "array",
            "description": "Add public URLs for individual product pages or search-results pages.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "description": "Public product or search-results page URL.",
                  "type": "string"
                }
              },
              "required": [
                "url"
              ]
            }
          },
          "searchTerms": {
            "title": "Keywords or brand names",
            "type": "array",
            "description": "Add one or more keywords or brand names to search for.",
            "items": {
              "type": "string"
            }
          },
          "regionalStorefront": {
            "title": "Regional storefront URL",
            "pattern": "^https://([a-zA-Z0-9-]+\\.)?(smartbuyglasses\\.[a-zA-Z.]+|visiondirect\\.com\\.au|easylunettes\\.fr|oculosworld\\.com\\.br|gafasworld\\.es|oculosworld\\.com\\.pt|lentesworld\\.com\\.mx|gafasworld\\.com\\.co|visiondirecta\\.cl|optykaworld\\.pl)/?$",
            "type": "string",
            "description": "Enter the full HTTPS address of the SmartBuyGlasses country store you want, such as https://www.smartbuyglasses.com/ or https://visiondirect.com.au/. Page URLs must use this same store. Prices use its currency."
          },
          "catalogue": {
            "title": "Catalogue",
            "type": "string",
            "description": "Choose one catalogue or all catalogues sold by this storefront."
          },
          "minimumPrice": {
            "title": "Minimum price",
            "minimum": 0,
            "type": "number",
            "description": "Leave blank for no lower price limit. Otherwise, keep products at or above this listed price, in the selected storefront's currency."
          },
          "maximumPrice": {
            "title": "Maximum price",
            "minimum": 0,
            "type": "number",
            "description": "Leave blank for no upper price limit. Otherwise, keep products at or below this listed price, in the selected storefront's currency."
          },
          "availableOnly": {
            "title": "Available only",
            "type": "boolean",
            "description": "Turn this on to keep only products the storefront marks as available. Leave it off to include all products, including sold-out ones."
          },
          "frameShape": {
            "title": "Frame shape",
            "type": "string",
            "description": "Leave blank for any shape. Otherwise, filter sunglasses and prescription eyeglasses by frame shape. Pick a suggested shape, or type another shape exactly as the store writes it. This does not filter contact lenses."
          },
          "lensType": {
            "title": "Lens type",
            "type": "string",
            "description": "Leave blank for any lens type. Otherwise, filter sunglasses and prescription eyeglasses by lens type, such as Single Vision, Polarized, or Blue Light Glasses. Type the name exactly as the chosen store writes it. This does not filter contact lenses."
          },
          "intendedWearer": {
            "title": "Intended wearer",
            "enum": [
              "Men",
              "Women",
              "Kids"
            ],
            "type": "string",
            "description": "Leave blank for any wearer. Otherwise, pick Men, Women, or Kids to filter sunglasses and prescription eyeglasses for that wearer. Kids is the store's label for children. This does not filter contact lenses."
          },
          "frameColor": {
            "title": "Frame color",
            "type": "string",
            "description": "Leave blank for any color. Otherwise, filter sunglasses and prescription eyeglasses by frame color. Pick a suggested color, or type another color using the label the store's color filter uses. This does not filter contact lenses."
          },
          "frameMaterial": {
            "title": "Frame material",
            "type": "string",
            "description": "Leave blank for any material. Otherwise, filter sunglasses and prescription eyeglasses by frame material. Pick a suggested material, or type another material using the label the store's material filter uses. This does not filter contact lenses."
          },
          "frameType": {
            "title": "Rim style",
            "type": "string",
            "description": "Leave blank for any rim style. Otherwise, filter sunglasses and prescription eyeglasses by rim style, such as full rim or rimless. This does not filter contact lenses."
          },
          "dealSections": {
            "title": "Deal sections",
            "type": "array",
            "description": "Leave blank for all sections. Otherwise, add cheap-glasses, clearance, or outlet sections. This applies to Catalogue, Brand or category pages, search-result pages under Product or search pages, and Keywords or brand names. It does not change a single product URL.",
            "items": {
              "type": "string"
            }
          },
          "sortOrder": {
            "title": "Order results by",
            "enum": [
              "price-low-to-high",
              "price-high-to-low",
              "popularity",
              "largest-discount",
              "release-recency",
              "product-name"
            ],
            "type": "string",
            "description": "Leave blank to keep the store order. Choose the order for Catalogue, Brand or category pages, search-result pages under Product or search pages, and Keywords or brand names. A single product URL still returns that product."
          },
          "maxItems": {
            "title": "Maximum products",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many products. Leave blank to collect all available products for your chosen inputs and filters until the source is exhausted, meaning the store has no more matching products."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}