{
  "openapi": "3.0.1",
  "info": {
    "title": "🛒 eBay Sold Comps Scraper",
    "description": "Scrape eBay sold listings (90-day window) for any query. Sold price, condition, shipping, sold date, seller info. Plus computed comps: median, P10/P90, byVariant grouped by storage/color/condition, sell-through rate, velocity. Export, run via API, schedule, or integrate with other tools.",
    "version": "0.1",
    "x-build-id": "1mClYWE856UR6wifr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/skootle~ebay-sold-comps/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-skootle-ebay-sold-comps",
        "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/skootle~ebay-sold-comps/runs": {
      "post": {
        "operationId": "runs-sync-skootle-ebay-sold-comps",
        "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/skootle~ebay-sold-comps/run-sync": {
      "post": {
        "operationId": "run-sync-skootle-ebay-sold-comps",
        "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": {
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Free-text eBay searches, e.g. ['iphone 15 pro 256gb', 'nintendo switch oled']. One run handles multiple queries; comps are computed per query.",
            "items": {
              "type": "string"
            }
          },
          "ebaySite": {
            "title": "eBay marketplace",
            "enum": [
              "EBAY_US",
              "EBAY_GB",
              "EBAY_DE",
              "EBAY_FR",
              "EBAY_IT",
              "EBAY_ES",
              "EBAY_AU",
              "EBAY_CA"
            ],
            "type": "string",
            "description": "Which eBay regional site to query.",
            "default": "EBAY_US"
          },
          "daysToScrape": {
            "title": "Sold-listings window (days)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "How far back to look for sold listings. eBay caps this at 90 days.",
            "default": 30
          },
          "itemsPerPage": {
            "title": "Items per page",
            "minimum": 25,
            "maximum": 240,
            "type": "integer",
            "description": "How many results per fetched page (eBay accepts 25, 50, 60, 120, 240).",
            "default": 60
          },
          "maxItems": {
            "title": "Max sold rows",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum sold-listing records to save. Default is conservative so the daily auto-test fits Apify's 5-minute window. Raise for production.",
            "default": 10
          },
          "emitComps": {
            "title": "Emit comps_summary record per query",
            "type": "boolean",
            "description": "When true, the actor writes one comps_summary record per search query with median/P10-P90, by-condition bands, and by-variant bands grouped by itemSpecifics.",
            "default": true
          },
          "measureSellThrough": {
            "title": "Measure sell-through rate",
            "type": "boolean",
            "description": "When true, the actor also fetches active listings for each query to compute sell-through rate (sold-last-30d / (sold-last-30d + currently-listed)).",
            "default": true
          },
          "conditionIds": {
            "title": "Condition filter (eBay condition IDs)",
            "type": "array",
            "description": "Optional eBay condition IDs to filter by. 1000=New, 1500=New (Other), 1750=Open Box, 2000=Certified Refurb, 2500=Seller Refurb, 3000=Used, 7000=For Parts.",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Category ID (_sacat)",
            "type": "string",
            "description": "Optional eBay category ID to scope the search.",
            "default": ""
          },
          "useApifyProxy": {
            "title": "Use Apify proxy",
            "type": "boolean",
            "description": "Use Apify residential proxy. Recommended for production; safer against rate limits. The free Apify plan includes a small proxy budget.",
            "default": true
          },
          "apifyProxyGroups": {
            "title": "Apify proxy groups",
            "type": "array",
            "description": "Apify proxy groups. RESIDENTIAL is recommended. Override only if your account has dedicated groups.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}