{
  "openapi": "3.0.1",
  "info": {
    "title": "eBay Sold Listings Scraper — Price Comps & Analytics",
    "description": "Scrape eBay sold/completed listings and get a price-analytics report: min/max/avg/median, percentiles, sell-through velocity, weekly price trend, and condition breakdown. 8 marketplaces. MCP-ready.",
    "version": "0.1",
    "x-build-id": "Z5X8ghfKOiTsbPOJ7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/khadinakbar~ebay-sold-comps-analytics-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-khadinakbar-ebay-sold-comps-analytics-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/khadinakbar~ebay-sold-comps-analytics-scraper/runs": {
      "post": {
        "operationId": "runs-sync-khadinakbar-ebay-sold-comps-analytics-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/khadinakbar~ebay-sold-comps-analytics-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-khadinakbar-ebay-sold-comps-analytics-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 to search eBay SOLD/completed listings (e.g. 'airpods pro 2'). The actor adds eBay's sold+completed filter automatically, so you do not need to set it. Defaults to 'airpods pro 2'. NOT a product URL — to scrape sold results from a specific eBay search page, use startUrls instead."
          },
          "startUrls": {
            "title": "eBay search URLs",
            "type": "array",
            "description": "Optional list of eBay search-result URLs to scrape instead of a keyword. Each URL is forced into sold+completed mode automatically (LH_Sold=1&LH_Complete=1 are injected). Use this for advanced eBay filters you build in the browser. Leave empty to use searchQuery. NOT for /itm/ product-detail URLs.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "title": "URL",
                  "type": "string",
                  "description": "An eBay search-results URL to scrape (forced to sold+completed mode)."
                }
              },
              "required": [
                "url"
              ]
            }
          },
          "marketplace": {
            "title": "Marketplace",
            "enum": [
              "ebay.com",
              "ebay.co.uk",
              "ebay.de",
              "ebay.fr",
              "ebay.it",
              "ebay.es",
              "ebay.ca",
              "ebay.com.au"
            ],
            "type": "string",
            "description": "Which eBay marketplace to query. Picks the domain and pins the residential proxy to the matching country. Defaults to ebay.com (US). Ignored when startUrls are supplied (the URL's own domain wins).",
            "default": "ebay.com"
          },
          "maxItems": {
            "title": "Max sold items",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of sold listings to scrape and feed into the analytics report. Range 1–1000. More items give a more accurate price report but cost more. Defaults to 50. This is a hard cap — billing never exceeds it.",
            "default": 50
          },
          "condition": {
            "title": "Item condition",
            "enum": [
              "any",
              "new",
              "used",
              "refurbished",
              "open_box"
            ],
            "type": "string",
            "description": "Filter sold listings by item condition. 'any' returns all conditions (default). Use 'new' or 'used' to price a specific condition tier — resellers usually want one or the other, not both mixed.",
            "default": "any"
          },
          "daysBack": {
            "title": "Sold within last N days",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "Keep only items sold within the last N days (filtered by parsed sold date). eBay exposes roughly the last 90 days of sold history, so values above 90 have no extra effect. Leave empty for all available sold history. Example: 30."
          },
          "minPrice": {
            "title": "Min price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional lower price bound passed to eBay's own filter. Excludes sold listings below this amount, in the marketplace's local currency. Leave empty for no lower bound. NOT a currency-converted value."
          },
          "maxPrice": {
            "title": "Max price",
            "minimum": 0,
            "type": "integer",
            "description": "Optional upper price bound passed to eBay's own filter. Excludes sold listings above this amount, in the marketplace's local currency. Leave empty for no upper bound. NOT a currency-converted value."
          },
          "sortBy": {
            "title": "Sort order",
            "enum": [
              "newest",
              "best_match",
              "ending_soon",
              "price_asc",
              "price_desc"
            ],
            "type": "string",
            "description": "Order eBay returns sold results in. 'newest' (default) surfaces the most recent sales first — best for current pricing. 'price_asc'/'price_desc' sort by price. Affects which items fill the maxItems cap.",
            "default": "newest"
          },
          "includeReport": {
            "title": "Include analytics report",
            "type": "boolean",
            "description": "When true (default), the actor appends one analytics-report record summarizing the sold sample: min/max/avg/median/percentile prices, sell-through velocity, weekly price trend, and breakdowns by condition and listing type. Set false to get only raw sold-item rows and skip the per-report fee.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. The actor uses its built-in residential proxy by default (required — eBay blocks datacenter IPs), so you normally leave this alone. Override only if you want to supply your own residential proxy.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}