{
  "openapi": "3.0.1",
  "info": {
    "title": "eBay Scraper - Prices, Sold Intelligence & Auction Data",
    "description": "Scrape eBay listings across 13 country domains with sold-price intelligence. Auction + Buy It Now, p10–p90 price bands, 7d/30d trend deltas, market velocity, 25+ fields, AI analysis. Playwright-powered, pay-per-event.",
    "version": "2.0",
    "x-build-id": "2IeJtX2jcc5CqbYML"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/harvestlab~ebay-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-harvestlab-ebay-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/harvestlab~ebay-scraper/runs": {
      "post": {
        "operationId": "runs-sync-harvestlab-ebay-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/harvestlab~ebay-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-harvestlab-ebay-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": {
          "searchQuery": {
            "title": "Search Query",
            "type": "string",
            "description": "Keyword(s) to search for on eBay (e.g. 'vintage Rolex', 'pokemon cards', 'Nintendo Switch OLED')"
          },
          "query": {
            "title": "Search Query (CLI alias)",
            "type": "string",
            "description": "CLI alias for searchQuery. Hidden from Console form."
          },
          "q": {
            "title": "Search Query (CLI alias)",
            "type": "string",
            "description": "CLI alias for searchQuery. Hidden from Console form."
          },
          "search": {
            "title": "Search Query (CLI alias)",
            "type": "string",
            "description": "CLI alias for searchQuery. Hidden from Console form."
          },
          "keyword": {
            "title": "Search Query (CLI alias)",
            "type": "string",
            "description": "CLI alias for searchQuery. Hidden from Console form."
          },
          "searchTerm": {
            "title": "Search Query (CLI alias)",
            "type": "string",
            "description": "CLI alias for searchQuery. Hidden from Console form."
          },
          "productUrls": {
            "title": "Product URLs",
            "type": "array",
            "description": "Direct eBay listing URLs to scrape individually (e.g. https://www.ebay.com/itm/123456789012, https://www.ebay.co.uk/itm/234567890123). Use this instead of searchQuery when you already have specific listing IDs. Must be full /itm/ URLs — category or search URLs won't work.",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "Product URLs (CLI alias)",
            "type": "array",
            "description": "CLI alias for productUrls. Hidden from Console form.",
            "items": {
              "type": "string"
            }
          },
          "links": {
            "title": "Product URLs (CLI alias)",
            "type": "array",
            "description": "CLI alias for productUrls. Hidden from Console form.",
            "items": {
              "type": "string"
            }
          },
          "ebayDomain": {
            "title": "eBay Domain",
            "enum": [
              "ebay.com",
              "ebay.co.uk",
              "ebay.de",
              "ebay.fr",
              "ebay.it",
              "ebay.es",
              "ebay.com.au",
              "ebay.ca",
              "ebay.nl",
              "ebay.at",
              "ebay.ch",
              "ebay.ie",
              "ebay.pl"
            ],
            "type": "string",
            "description": "eBay country/regional domain to search. Prices and listings are localized per country — pick the market you want to scrape.",
            "default": "ebay.com"
          },
          "domain": {
            "title": "Domain (CLI alias for ebayDomain)",
            "type": "string",
            "description": "CLI alias for ebayDomain — accepts the same country domain values. Hidden from the Console form; exposed so `apify call -i '{\"domain\":\"ebay.de\"}'` works for users copying JSON between portfolio scrapers."
          },
          "listingType": {
            "title": "Listing Type",
            "enum": [
              "all",
              "auction",
              "buy_it_now"
            ],
            "type": "string",
            "description": "Filter by sale format. Auction = bidding with end time; Buy It Now = fixed-price instant purchase; All = both.",
            "default": "all"
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "best_match",
              "price_low",
              "price_high",
              "ending_soonest",
              "newly_listed"
            ],
            "type": "string",
            "description": "Search result ordering. 'Best Match' = eBay's relevance algorithm (default). 'Ending Soonest' = auctions closing first (great for bargain-hunting). 'Newly Listed' = most recently posted. Price sorts apply to post-shipping total on ebay.com.",
            "default": "best_match"
          },
          "minPrice": {
            "title": "Minimum Price",
            "type": "number",
            "description": "Minimum listing price in the domain's local currency (USD on ebay.com, GBP on ebay.co.uk, EUR on .de/.fr/.it/.es/.nl, AUD on .com.au, CAD on .ca). Example: 50 on ebay.com filters out listings under $50. Leave empty for no lower bound."
          },
          "maxPrice": {
            "title": "Maximum Price",
            "type": "number",
            "description": "Filter results by maximum price in the selected domain's local currency (USD on ebay.com, GBP on ebay.co.uk, etc.)."
          },
          "itemCondition": {
            "title": "Item Condition",
            "enum": [
              "any",
              "new",
              "open_box",
              "refurbished",
              "used"
            ],
            "type": "string",
            "description": "Filter by item condition. Refurbished = certified-restored; Open Box = returned/unused; Used = pre-owned; New = sealed.",
            "default": "any"
          },
          "maxProducts": {
            "title": "Max Products",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum number of products to scrape (1-200). Also accepts 'maxItems' as an alias.",
            "default": 50
          },
          "fetchDetails": {
            "title": "Fetch Detail Pages (Extra Fields)",
            "type": "boolean",
            "description": "Visit each listing page to fetch full details (seller, full description, item specifics). Required for auction listings if you need `seller` field populated. Slower (~2-3x run time). Recommended for Buy It Now analysis too.",
            "default": false
          },
          "soldOnly": {
            "title": "Sold Listings Intelligence Mode",
            "type": "boolean",
            "description": "Scrape only completed sales (eBay's LH_Sold=1&LH_Complete=1 filter, ~90 day window) and emit a `sold_listings_summary` item with recommended list price (p60 of sold prices when n>=20, else median), p10/p25/p50/p75/p90 price band, median days-to-sell, market_velocity ('hot' | 'steady' | 'slow' | 'cold'), and a 0-1 confidence_score blending sample size + dispersion + date coverage. **v2.0: the summary also carries a `sold_listings_trend` block** with 7d/30d price deltas, velocity delta, and volume delta against prior runs (persisted in a named KV store, one history slot per searchQuery+domain). Individual sold listings bill at $0.005 each; summary is $0.10; trend bills $0.03 only when prior history exists.",
            "default": false
          },
          "soldDateLookback": {
            "title": "Sold Date Lookback (Days)",
            "minimum": 30,
            "maximum": 365,
            "type": "integer",
            "description": "How far back to assume eBay's LH_Sold window covers when computing market_velocity (sold-per-day). eBay typically retains 90 days of completed-sale data. Only used when soldOnly=true. Values: 30-365, default 90.",
            "default": 90
          },
          "maxItems": {
            "title": "Max Items (alias for Max Products)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Alternative name for Max Products — accepts the same values (1-200). Use either maxProducts or maxItems."
          },
          "enableAiAnalysis": {
            "title": "Enable AI Analysis",
            "type": "boolean",
            "description": "Generate AI-powered market pricing analysis with price distribution, seller landscape, and buying recommendations",
            "default": false
          },
          "llmProvider": {
            "title": "LLM Provider",
            "enum": [
              "openrouter",
              "anthropic",
              "google",
              "openai",
              "ollama"
            ],
            "type": "string",
            "description": "AI backend for market/pricing analysis. 'OpenRouter' (default) is cheapest — Gemini Flash via OpenRouter is ~$0.001 per analysis. 'Anthropic' = Claude, 'Google AI' = Gemini direct, 'OpenAI' = GPT-4o mini, 'Ollama' = self-hosted (no API cost). Each provider needs its own API key field below.",
            "default": "openrouter"
          },
          "llmModel": {
            "title": "LLM Model",
            "type": "string",
            "description": "Specific model to use. Leave empty for the provider default (google/gemini-2.0-flash-001 for OpenRouter, claude-sonnet-4-20250514 for Anthropic, gemini-2.0-flash for Google AI, gpt-4o-mini for OpenAI, llama3.1 for Ollama)."
          },
          "openrouterApiKey": {
            "title": "OpenRouter API Key",
            "type": "string",
            "description": "API key from openrouter.ai (required if using OpenRouter provider)"
          },
          "anthropicApiKey": {
            "title": "Anthropic API Key",
            "type": "string",
            "description": "API key from console.anthropic.com (required if using Anthropic provider)"
          },
          "googleApiKey": {
            "title": "Google AI API Key",
            "type": "string",
            "description": "API key for Google AI (Gemini). Get one at aistudio.google.com/app/apikey"
          },
          "openaiApiKey": {
            "title": "OpenAI API Key",
            "type": "string",
            "description": "API key from platform.openai.com (required if using OpenAI provider)"
          },
          "ollamaBaseUrl": {
            "title": "Ollama Base URL",
            "type": "string",
            "description": "Base URL for Ollama API. Default: http://localhost:11434"
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings. eBay works with datacenter proxies — residential not required."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}