# SmartBuyGlasses Scraper (`solidcode/smartbuyglasses-scraper`) Actor

\[💰 $0.9 / 1K] Extract SmartBuyGlasses sunglasses, eyeglasses and contact lenses: price, discount, stock, rating, brand, UPC, frame shape, material, lens type, prescription and PD range, plus images. Search by keyword, brand or URL across 34 country stores.

- **URL**: https://apify.com/solidcode/smartbuyglasses-scraper.md
- **Developed by:** [SolidCode](https://apify.com/solidcode) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## SmartBuyGlasses Scraper

Pull the full SmartBuyGlasses eyewear catalogue at scale — live prices and discounts, real stock counts, star ratings, UPC codes, frame measurements in millimetres, prescription and PD ranges, and every product image, from any of the 34 country storefronts in that store's own currency. Built for eyewear retailers, dropshippers, and price-comparison teams who need an accurate, priced, in-stock product feed without hand-building a URL for every brand and market.

### Why This Scraper?

- **Real prices and real stock counts, not just spec sheets** — every row carries `price`, `originalPrice`, `discountPercent`, `currency`, `inStock` and `stockLeft` (the actual "72 left" number the store shows shoppers). Most eyewear feeds stop at the spec table.
- **34 country storefronts in 25 currencies** — United States (USD), Germany (EUR), Japan (JPY), Brazil (BRL), Poland (PLN), South Africa (ZAR) and 28 more. Pick a store and you get its prices, its language, and its local stock — not converted approximations.
- **Localised stores handled properly** — a run against the German store correctly matches its own filter wording (polarised lenses, in-stock badges) instead of quietly returning zero rows, while product attributes still ship in consistent English for clean joins.
- **55 filter values across 5 frame and lens dimensions** — 15 frame shapes (Aviator, Wayfarer, Cat Eye, Browline, Butterfly…), 9 frame materials (Acetate, Titanium, TR90, Carbon Fiber, Eco-Friendly…), 22 frame colours, 4 frame types (Full Rim, Rimless, Semi Rimless, Clip-On) and 5 lens types (Polarized, Photochromic, Mirrored, Single Vision, Multifocal / Progressive).
- **Complete optical spec block for prescription resellers** — `prescriptionRange` (SPH and CYL bounds), `pdRange`, `progressiveCompatible`, `lensCompatibility`, `uvProtection` category, plus five frame measurements in mm: lens width, bridge, temple length, lens height and total width.
- **UPC / GTIN-13 on every frame** — the identifier you need to match SmartBuyGlasses inventory against Amazon, eBay, Google Shopping or your own PIM, alongside SKU, manufacturer, colour code, collection and release year.
- **Ratings and review counts where shoppers have left them** — `rating` and `reviewCount` come straight from the product page, so you can rank by social proof, not just by price. Frames with no reviews yet are returned with both fields empty rather than a made-up score.
- **Four entry points that all work together** — paste product, brand, category or search URLs; type keywords; name brands; or just pick a catalogue. Combine them in one run and results are deduplicated by colourway.
- **Sunglasses, prescription eyeglasses and contact lenses** — three catalogues, one dropdown, with server-side price-range filtering and six sort orders including Biggest Discount for deal-hunting runs.

### Use Cases

**Price Monitoring & MAP Compliance**

- Track competitor pricing on the same frames across the US, UK, German and Australian stores
- Detect price drops and discount depth daily with `originalPrice` and `discountPercent`
- Flag frames selling below your minimum advertised price by brand
- Compare a brand's positioning in 25 currencies without manual currency lookups

**Competitive Intelligence**

- Measure how deep a rival's clearance and outlet inventory really goes
- See which colourways of a model are running low on stock before they sell out
- Benchmark assortment breadth by brand, frame shape and material
- Track new-release volume by monitoring the Newest sort order week over week

**Dropshipping & Catalog Building**

- Build a ready-to-import product feed with UPC, images, descriptions and specs
- Keep listings accurate with live stock counts instead of stale availability flags
- Filter to in-stock-only items so you never list a sold-out frame
- Pull an entire brand catalogue in a single run and refresh it on a schedule

**Market Research**

- Analyse which frame shapes and materials dominate each regional market
- Chart average price by brand, gender and lens type
- Study how discounting differs between Europe, Asia-Pacific and Latin America
- Quantify the share of frames offering polarized or photochromic lenses

**Affiliate & Comparison Sites**

- Power a "best sunglasses under $150" page with fresh, filtered data
- Populate comparison tables with ratings, review counts and measurements
- Auto-update deal pages sorted by biggest discount
- Enrich existing eyewear listings with face-shape and UV-protection guidance

### Getting Started

#### Browse a Catalogue

The simplest run — the first 50 sunglasses from the US store:

```json
{
    "productType": "sunglasses",
    "maxItems": 50
}
```

#### Collect a Brand with Filters

Polarized Ray-Ban aviators for men, in stock, under $250:

```json
{
    "brands": ["Ray-Ban"],
    "gender": "men",
    "frameShape": ["aviator"],
    "lensType": ["polarized"],
    "inStockOnly": true,
    "maxPrice": 250,
    "maxItems": 200
}
```

#### Hunt the Biggest Discounts on a Local Store

The 100 steepest markdowns in the German clearance section:

```json
{
    "country": "de",
    "productType": "eyeglasses",
    "deals": "clearance",
    "sortBy": "discount",
    "maxItems": 100
}
```

#### Full Run — Links, Keywords and Brands Together

```json
{
    "startUrls": [
        { "url": "https://www.smartbuyglasses.com/designer-sunglasses/Prada/" },
        { "url": "https://www.smartbuyglasses.co.uk/designer-eyeglasses/women/cat-eye" }
    ],
    "searchTerms": ["blue light glasses"],
    "brands": ["Oakley", "Gucci"],
    "productType": "all",
    "frameMaterial": ["acetate", "titanium"],
    "frameColor": ["black", "tortoiseshell"],
    "frameType": ["full-rim"],
    "minPrice": 80,
    "maxPrice": 400,
    "sortBy": "price-asc",
    "country": "us",
    "includeProductDetails": true,
    "maxItems": 1000
}
```

### Input Reference

#### What to Scrape

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `startUrls` | array | Ray-Ban sunglasses page | Any SmartBuyGlasses links — category, brand, search results or a single product page. Each link is recognised automatically and collected from the store it belongs to. |
| `searchTerms` | array | `[]` | Keywords such as `"ray-ban aviator"` or `"blue light glasses"`. Each keyword runs its own search. |
| `brands` | array | `[]` | Brand names such as `"Ray-Ban"`, `"Prada"` or `"Oakley"`. Each brand is collected separately — the best way to gather a large catalogue. |
| `productType` | string | `"sunglasses"` | Which catalogue to browse: Sunglasses, Eyeglasses, Contact Lenses, or All Of Them. |

#### Filters

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `gender` | string | `"any"` | Any, Men, Women or Kids. |
| `frameShape` | array | `[]` | Aviator, Browline, Butterfly, Cat Eye, Geometric, Goggle, Oval, Oversized, Pilot, Rectangle, Round, Single Lens, Square, Wayfarer, Wraparound. |
| `frameMaterial` | array | `[]` | Acetate, Carbon Fiber, Eco-Friendly, Metal, Plastic, Polycarbonate, TR90, Titanium, Wood. |
| `frameType` | array | `[]` | Clip-On, Full Rim, Rimless, Semi Rimless. |
| `lensType` | array | `[]` | Mirrored, Multifocal / Progressive, Photochromic, Polarized, Single Vision. |
| `frameColor` | array | `[]` | 22 colours from Black and Tortoiseshell through Rose Gold, Gunmetal, Rainbow and Two-Tone. |
| `deals` | string | `"any"` | Restrict to a discount section: Everything, Cheap Glasses, Clearance or Outlet. |
| `inStockOnly` | boolean | `false` | Only collect products available to buy right now. |
| `minPrice` | integer | empty | Minimum price, in the currency of the store you picked. |
| `maxPrice` | integer | empty | Maximum price, in the currency of the store you picked. |

#### Store and Sorting

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `country` | string | `"us"` | Which of the 34 country stores to read — sets currency, language and local stock. Choices run from United States (USD), United Kingdom (GBP) and Germany (EUR) through Japan (JPY), Brazil (BRL), India (INR), United Arab Emirates (AED) and South Africa (ZAR). |
| `sortBy` | string | `"popularity"` | Popularity, Price: Low to High, Price: High to Low, Biggest Discount, Newest, or Name: A to Z. |

#### Output and Limits

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `includeProductDetails` | boolean | `true` | Open each product page for the full spec sheet — UPC, manufacturer, materials, face shapes, UV protection, prescription and PD range, measurements, rating and all images. Turn off for a much faster run returning name, brand, price, discount, stock and the main image. |
| `maxItems` | integer | `50` | Stop after this many products across every link, keyword and brand. Set to `0` to collect everything found, up to the store's own ceiling of 2,000 products per single search, brand, category or link. To go past 2,000, add several brands, keywords or filtered links rather than raising this number. |

### Output

Every product colourway is one flat row with 51 fields:

```json
{
    "productId": "23701",
    "name": "Ray-Ban RB2140 Original Wayfarer 901",
    "modelName": "RB2140 Original Wayfarer 901",
    "brand": "Ray-Ban",
    "collection": "Wayfarer Collection",
    "colorCode": "901",
    "sku": "805289126577",
    "upc": "805289126577",
    "manufacturer": "Luxottica Italia srl",
    "year": 2009,
    "productType": "sunglasses",
    "url": "https://www.smartbuyglasses.com/designer-sunglasses/Ray-Ban/Ray-Ban-RB2140-Original-Wayfarer-901-23701.html",
    "price": 191.0,
    "originalPrice": null,
    "discountPercent": null,
    "currency": "USD",
    "availability": "InStock",
    "inStock": true,
    "stockLeft": 72,
    "badges": ["Virtual Try-On", "In Stock", "Fast Shipping", "Best Seller"],
    "rating": 4.8,
    "reviewCount": 51,
    "gender": "Unisex",
    "frameColor": "Black",
    "frameShape": "Wayfarer",
    "frameStyle": "Full Rim",
    "frameMaterial": "Plastic",
    "faceShape": ["Heart", "Oval", "Triangle"],
    "lensMaterial": "Glass",
    "lensColor": "Green",
    "lensType": ["Multifocal/Progressive", "Single Vision"],
    "uvProtection": "Category 3",
    "specialFeatures": ["Prescription", "Spring Hinge", "Adjustable Nose Pads", "Top 100"],
    "lensCompatibility": ["Progressive", "Reading", "Distance", "Fashion", "Computer"],
    "prescriptionRange": "SPH: -8.00 to +7.00 CYL: -4.00 to +4.00",
    "progressiveCompatible": true,
    "pdRange": "60 to 84 mm",
    "sizes": ["M", "L"],
    "lensWidth": 50.0,
    "bridgeWidth": 22.0,
    "templeLength": 150.0,
    "lensHeight": 41.0,
    "totalWidth": 142.0,
    "imageUrl": "https://www.smartbuyglasses.com/image4/1/14/23701_1694757622222.jpg",
    "images": [
        "https://www.smartbuyglasses.com/image4/1/14/23701_1694757622222.jpg",
        "https://image4.cdnsbg.com/1/14/23701_side_1_1694757622222.jpg",
        "https://image4.cdnsbg.com/1/14/23701_side_2_1694757622223.jpg"
    ],
    "description": "Whether it's music, food, movies, or fashion, nothing beats the classics...",
    "moreColorCount": 5,
    "storeCountry": "us",
    "storeDomain": "smartbuyglasses.com",
    "sourceUrl": "https://www.smartbuyglasses.com/designer-sunglasses/Ray-Ban/",
    "scrapedAt": "2026-08-01T15:01:26Z"
}
```

#### Product Identity

| Field | Type | Description |
|-------|------|-------------|
| `productId` | string | Unique id for this exact colourway — use it to deduplicate |
| `name` | string | Full product name including the brand |
| `modelName` | string | Model name with the brand stripped off |
| `brand` | string | Brand name, for example `Ray-Ban` |
| `collection` | string | Brand collection, for example `Wayfarer Collection` |
| `colorCode` | string | Manufacturer colour code for this variant |
| `sku` | string | Store SKU |
| `upc` | string | UPC / GTIN-13 barcode for cross-marketplace matching |
| `manufacturer` | string | Legal manufacturer name |
| `year` | integer | Model release year |
| `productType` | string | `sunglasses`, `eyeglasses` or `contact-lenses` |
| `url` | string | Direct link to the product page |

#### Pricing & Availability

| Field | Type | Description |
|-------|------|-------------|
| `price` | number | Current selling price in the store's currency |
| `originalPrice` | number | Recommended retail price when the item is discounted |
| `discountPercent` | number | Percentage off, rounded to one decimal |
| `currency` | string | ISO currency code of the store, for example `USD` or `EUR` |
| `availability` | string | `InStock` or `OutOfStock` |
| `inStock` | boolean | Whether the item can be bought right now |
| `stockLeft` | integer | Units remaining, as shown on the product page |
| `badges` | array | Store labels such as `Best Seller`, `Fast Shipping` or `Virtual Try-On`, in that store's own wording |

#### Ratings & Frame Specs

| Field | Type | Description |
|-------|------|-------------|
| `rating` | number | Average customer star rating out of 5 |
| `reviewCount` | integer | Number of customer reviews |
| `gender` | string | `Men`, `Women`, `Kids` or `Unisex` |
| `frameColor` | string | Frame colour |
| `frameShape` | string | Frame shape, for example `Wayfarer` or `Aviator` |
| `frameStyle` | string | Frame type: `Full Rim`, `Rimless`, `Semi Rimless` or `Clip-On` |
| `frameMaterial` | string | Frame material, for example `Acetate` or `Titanium` |
| `faceShape` | array | Face shapes the frame suits, for example `Heart`, `Oval` |
| `lensMaterial` | string | Lens material, for example `Glass` or `Polycarbonate` |
| `lensColor` | string | Lens tint colour |
| `lensType` | array | Lens types available, for example `Polarized`, `Single Vision` |
| `uvProtection` | string | UV protection category, for example `Category 3` |
| `specialFeatures` | array | Extras such as `Spring Hinge` or `Adjustable Nose Pads` |

#### Prescription & Measurements

| Field | Type | Description |
|-------|------|-------------|
| `lensCompatibility` | array | Prescription uses supported: `Progressive`, `Reading`, `Distance`, `Fashion`, `Computer` |
| `prescriptionRange` | string | SPH and CYL bounds the frame accepts |
| `progressiveCompatible` | boolean | Whether progressive lenses can be fitted |
| `pdRange` | string | Supported pupillary distance range in mm |
| `sizes` | array | Size categories offered, for example `M`, `L` |
| `lensWidth` | number | Lens width in mm |
| `bridgeWidth` | number | Bridge width in mm |
| `templeLength` | number | Temple (arm) length in mm |
| `lensHeight` | number | Lens height in mm |
| `totalWidth` | number | Total frame width in mm |

#### Media & Run Context

| Field | Type | Description |
|-------|------|-------------|
| `imageUrl` | string | Main product image |
| `images` | array | All product images, deduplicated |
| `description` | string | Full product description |
| `moreColorCount` | integer | How many other colourways of this model exist |
| `storeCountry` | string | Country store this row came from, for example `us` |
| `storeDomain` | string | Domain of that store |
| `sourceUrl` | string | The link, keyword or catalogue this row was found through |
| `scrapedAt` | string | UTC timestamp of collection |

### Tips for Best Results

- **Pick the country store that matches the market you are pricing for.** The store sets the currency, the language of names and descriptions, and the stock counts — a US run will not tell you what a frame costs or whether it is available in Germany.
- **Any single search, category, brand or link returns at most 2,000 products.** That is the store's own ceiling. To go wider, list several brands or add filtered links rather than raising `maxItems`; the run log names any query that hits the cap.
- **Split large catalogues by brand.** Naming five brands gives you up to five times the 2,000-product allowance and keeps every row attributable to a clean source.
- **Turn `includeProductDetails` off when you only need the catalogue.** Name, brand, price, discount, stock and the main image come back far faster and cheaper; switch it back on when you need UPC, measurements, ratings or prescription data.
- **Pair `sortBy: "discount"` with a small `maxItems` to surface only the best deals** — sorting by Biggest Discount and keeping the top 100 is far more efficient than collecting everything and filtering afterwards.
- **Deduplicate on `productId`, never on model name.** Each colourway of a frame is its own product with its own price, stock and images, so the same model name legitimately appears several times.
- **Contact lenses have no frame, so measurement and size fields stay empty for them** — and the Italy, Colombia, Singapore and Taiwan stores do not sell them at all. Use a frame catalogue on those stores.

### Pricing

**From $0.90 per 1,000 results** — pay only for the products you actually receive. Bronze, Silver and Gold subscribers pay progressively less; the table below shows the total cost at each discount tier.

| Results | No discount | Bronze | Silver | Gold |
|---------|-------------|--------|--------|------|
| 100 | $0.11 | $0.10 | $0.10 | $0.09 |
| 1,000 | $1.05 | $1.00 | $0.95 | $0.90 |
| 10,000 | $10.50 | $10.00 | $9.50 | $9.00 |
| 100,000 | $105.00 | $100.00 | $95.00 | $90.00 |

One result is one product colourway row. **No compute or time-based charges — you pay per result, plus a small fixed per-run start fee.** Apify platform fees are billed separately.

### Integrations

Export data in JSON, CSV, Excel, XML or RSS. Connect to 1,500+ apps via:

- **Zapier** / **Make** / **n8n** — Workflow automation
- **Google Sheets** — Direct spreadsheet export
- **Slack** / **Email** — Notifications when a run finishes
- **Webhooks** — Trigger your own APIs on new results
- **Apify API** — Full programmatic access from any language

### Legal & Ethical Use

This actor collects publicly available product information from SmartBuyGlasses — the same catalogue, pricing and specification data any visitor can see on the public store pages. It does not collect personal data, does not access accounts, and does not bypass paywalls.

You are responsible for how you use the data you collect. Review SmartBuyGlasses' terms of service, respect applicable copyright in product imagery and descriptions, and comply with the data protection laws of your jurisdiction, including GDPR and CCPA where they apply. Use the data for price monitoring, market research, catalogue building and comparable legitimate business purposes.

# Actor input Schema

## `startUrls` (type: `array`):

Paste any SmartBuyGlasses page links — a category page (sunglasses, eyeglasses, contact lenses), a brand page, a search results page, or a single product page. The scraper works out what each link is and collects every product it finds. Works with any of the country stores.

## `searchTerms` (type: `array`):

Search the store by keyword, for example 'ray-ban aviator' or 'blue light glasses'. Each keyword runs its own search and every matching product is collected. Leave empty if you are only using links.

## `brands` (type: `array`):

Collect specific brands by name, for example 'Ray-Ban', 'Prada' or 'Oakley'. Each brand is collected separately, which is the best way to gather a large catalogue — see the note on the results limit below.

## `productType` (type: `string`):

Which catalogue to browse when you have not given any links, keywords or brands above. Also decides which catalogue your brand and filter choices apply to. Note: the Italy, Colombia, Singapore and Taiwan stores do not sell contact lenses.

## `gender` (type: `string`):

Only collect eyewear made for this audience.

## `frameShape` (type: `array`):

Only collect these frame shapes. Leave empty to include all shapes.

## `frameMaterial` (type: `array`):

Only collect frames made from these materials. Leave empty to include all materials.

## `frameType` (type: `array`):

Only collect these frame types. Leave empty to include all types.

## `lensType` (type: `array`):

Only collect eyewear with these lens types, such as polarized or photochromic. Leave empty to include all lens types.

## `frameColor` (type: `array`):

Only collect frames in these colours. Leave empty to include all colours.

## `deals` (type: `string`):

Limit results to one of the store's discount sections instead of the full catalogue.

## `inStockOnly` (type: `boolean`):

Only collect products that are available to buy right now. Turn off to also include sold-out items.

## `minPrice` (type: `integer`):

Only collect products priced at or above this amount, in the currency of the store you picked below. Leave empty for no minimum.

## `maxPrice` (type: `integer`):

Only collect products priced at or below this amount, in the currency of the store you picked below. Leave empty for no maximum.

## `sortBy` (type: `string`):

The order products are collected in. This is useful together with the results limit — for example, sort by biggest discount and keep the top 100 to find the best deals.

## `country` (type: `string`):

Which of the 34 SmartBuyGlasses country stores to collect from. This sets the currency, the language of product names and descriptions, and the stock levels shown. Ignored for any link you paste that already points at a specific country store — those are always collected from the store they belong to.

## `includeProductDetails` (type: `boolean`):

Open each product page to collect the complete spec sheet — UPC, manufacturer, frame and lens materials, face shapes, UV protection, prescription and PD range, frame measurements, star rating and the full image gallery. Turn this off for a much faster, cheaper run that returns only what is visible on listing pages: name, brand, price, discount, stock and the main image.

## `maxItems` (type: `integer`):

Stop after collecting this many products in total, across every link, keyword and brand. Set to 0 to collect everything found. Important: the store serves a maximum of 2,000 products per single search, category, brand or link — that is a limit on the store's side, not on this scraper. To gather more than 2,000, add several brands, keywords or filtered links above rather than raising this number; the run will tell you in the log whenever a search hits that ceiling.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.smartbuyglasses.com/designer-sunglasses/Ray-Ban/"
    }
  ],
  "searchTerms": [],
  "brands": [],
  "productType": "sunglasses",
  "gender": "any",
  "frameShape": [],
  "frameMaterial": [],
  "frameType": [],
  "lensType": [],
  "frameColor": [],
  "deals": "any",
  "sortBy": "popularity",
  "country": "us",
  "includeProductDetails": true,
  "maxItems": 50
}
```

# Actor output Schema

## `overview` (type: `string`):

Table of scraped products with pricing, stock and key frame details.

## `specifications` (type: `string`):

Table of frame, lens and prescription specifications for each product.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://www.smartbuyglasses.com/designer-sunglasses/Ray-Ban/"
        }
    ],
    "searchTerms": [],
    "brands": [],
    "productType": "sunglasses",
    "gender": "any",
    "frameShape": [],
    "frameMaterial": [],
    "frameType": [],
    "lensType": [],
    "frameColor": [],
    "deals": "any",
    "inStockOnly": false,
    "sortBy": "popularity",
    "country": "us",
    "includeProductDetails": true,
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("solidcode/smartbuyglasses-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": [{ "url": "https://www.smartbuyglasses.com/designer-sunglasses/Ray-Ban/" }],
    "searchTerms": [],
    "brands": [],
    "productType": "sunglasses",
    "gender": "any",
    "frameShape": [],
    "frameMaterial": [],
    "frameType": [],
    "lensType": [],
    "frameColor": [],
    "deals": "any",
    "inStockOnly": False,
    "sortBy": "popularity",
    "country": "us",
    "includeProductDetails": True,
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("solidcode/smartbuyglasses-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.smartbuyglasses.com/designer-sunglasses/Ray-Ban/"
    }
  ],
  "searchTerms": [],
  "brands": [],
  "productType": "sunglasses",
  "gender": "any",
  "frameShape": [],
  "frameMaterial": [],
  "frameType": [],
  "lensType": [],
  "frameColor": [],
  "deals": "any",
  "inStockOnly": false,
  "sortBy": "popularity",
  "country": "us",
  "includeProductDetails": true,
  "maxItems": 50
}' |
apify call solidcode/smartbuyglasses-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,solidcode/smartbuyglasses-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/v675OtFzHCIhd0TG0/builds/DLJCkUaOeL7qbryRd/openapi.json
