{
  "openapi": "3.0.1",
  "info": {
    "title": "Etsy Sales Intelligence",
    "description": "Etsy sales estimator and revenue calculator. Reverse-engineers hidden per-listing lifetime sales from public signals (reviews, shop stats, badges, velocity) with confidence bands and AI translation. Works on any listing, shop, or keyword. $0.05 per listing. Alternative to eRank and EtsyHunt.",
    "version": "0.0",
    "x-build-id": "vbojFgywhB3b1N7tI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/marielise.dev~etsy-sales-intelligence/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-marielise.dev-etsy-sales-intelligence",
        "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/marielise.dev~etsy-sales-intelligence/runs": {
      "post": {
        "operationId": "runs-sync-marielise.dev-etsy-sales-intelligence",
        "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/marielise.dev~etsy-sales-intelligence/run-sync": {
      "post": {
        "operationId": "run-sync-marielise.dev-etsy-sales-intelligence",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "listing",
              "shop",
              "search"
            ],
            "type": "string",
            "description": "How to source the Etsy listings to analyse. Use `listing` for one or more specific product URLs. Use `shop` to audit every listing in a shop. Use `search` to research a niche by keyword (returns top results). Pick exactly one mode and provide its matching input field.",
            "default": "listing"
          },
          "listingUrls": {
            "title": "Listing URLs",
            "type": "array",
            "description": "Required when mode is `listing`. One or more Etsy product URLs in the form `https://www.etsy.com/listing/<numeric-id>/<slug>`. Each URL is one billable record at $0.05. Ignored when mode is `shop` or `search`. Defaults to a single sample listing so a run with no input still exercises the full pipeline.",
            "default": [
              {
                "url": "https://www.etsy.com/listing/537050963/custom-dog-bandanas-create-your-own-pet"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "shopUrl": {
            "title": "Shop URL",
            "type": "string",
            "description": "Required when mode is `shop`. Full Etsy shop URL in the form `https://www.etsy.com/shop/<ShopName>`. The actor will discover and analyse up to `maxResults` listings from this shop. Ignored when mode is `listing` or `search`."
          },
          "searchQuery": {
            "title": "Search Query",
            "type": "string",
            "description": "Required when mode is `search`. Free-text keywords describing the Etsy niche to research, e.g. `minimalist wall art`, `handmade leather wallet`, `dog bandana`. Returns up to `maxResults` top-ranking listings for this query. Ignored when mode is `listing` or `shop`."
          },
          "minReviews": {
            "title": "Min Reviews",
            "minimum": 0,
            "type": "integer",
            "description": "Skip listings with fewer reviews than this. Reviews drive estimation accuracy. Skipped listings are NOT charged.",
            "default": 0
          },
          "minEstimatedRevenue": {
            "title": "Min Estimated Revenue (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip listings with estimated revenue below this threshold (USD). Skipped listings are NOT charged.",
            "default": 0
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on the number of listings to deliver. Your bill is at most `maxResults × $0.05`. Default 50 → $2.50 max. When calling from an LLM tool/MCP client, default to small values (5–20) for cost safety unless the user explicitly asked for a larger batch.",
            "default": 50
          },
          "trackOverTime": {
            "title": "Track Over Time",
            "type": "boolean",
            "description": "If enabled, the actor stores per-listing snapshots in its key-value store. Subsequent runs against the same listings return a `delta` block with review growth, sales growth, and sales-per-day. Use with Apify Schedules to automate weekly tracking.",
            "default": false
          },
          "concurrency": {
            "title": "Concurrent listings",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many listings to process in parallel. Default 5. Higher = faster, but each step adds parallel scraping requests. Max 20.",
            "default": 5
          },
          "plausibilityCheck": {
            "title": "Extra AI plausibility check (off by default)",
            "type": "boolean",
            "description": "By default, deterministic math checks flag obvious impossibilities (e.g. listingReviews > shopTotalReviews, priceUSD ≤ 0, parsing-error titles). Enable this to ALSO run a Claude Haiku sanity check that catches softer outliers. Off by default because the LLM occasionally flags legitimate edge cases (e.g. shops where one hit listing carries all reviews).",
            "default": false
          },
          "debugDumpHtml": {
            "title": "Debug: dump HTML to key-value store",
            "type": "boolean",
            "description": "Saves each scraped listing's raw HTML and shop HTML to the run's key-value store under LISTING_HTML_<id> and SHOP_HTML_<shopName>. Use only if a field comes back unexpectedly null and you want to share the source HTML when filing an issue. Keep off for production.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}