{
  "openapi": "3.0.1",
  "info": {
    "title": "Mercari Japan & Yahoo! Auctions — Clean Sold Comps & Deals",
    "description": "Scrape Mercari Japan and Yahoo! Auctions (sold comps & live listings) in one run. Filters junk, box-only & irrelevant items, normalizes conditions to English, converts JPY to USD, and flags underpriced resale deals.",
    "version": "0.1",
    "x-build-id": "LTGvCaIIDeuLB8r8C"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ajisai-labs~japan-resale-intel-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ajisai-labs-japan-resale-intel-api",
        "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/ajisai-labs~japan-resale-intel-api/runs": {
      "post": {
        "operationId": "runs-sync-ajisai-labs-japan-resale-intel-api",
        "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/ajisai-labs~japan-resale-intel-api/run-sync": {
      "post": {
        "operationId": "run-sync-ajisai-labs-japan-resale-intel-api",
        "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": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Search keywords",
            "type": "array",
            "description": "Keywords (English or Japanese) to analyze across Japanese resale marketplaces.",
            "items": {
              "type": "string"
            }
          },
          "marketplaces": {
            "title": "Marketplaces",
            "uniqueItems": true,
            "type": "array",
            "description": "Target Japanese marketplaces ('mercari', 'yahoo_auctions').",
            "items": {
              "type": "string",
              "enum": [
                "mercari",
                "yahoo_auctions"
              ],
              "enumTitles": [
                "Mercari Japan",
                "Yahoo! Auctions Japan"
              ]
            },
            "default": [
              "mercari",
              "yahoo_auctions"
            ]
          },
          "includeSold": {
            "title": "Include sold comps",
            "type": "boolean",
            "description": "Fetch sold/completed listings to compute clean market price benchmarks.",
            "default": true
          },
          "includeLive": {
            "title": "Include live listings",
            "type": "boolean",
            "description": "Fetch currently active listings and score them against the clean sold median.",
            "default": true
          },
          "maxItemsPerMarket": {
            "title": "Max items per market",
            "minimum": 10,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum listings to scan per keyword, marketplace, and status (sold/live).",
            "default": 60
          },
          "priceMinJpy": {
            "title": "Minimum price (JPY)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional lower price bound in JPY."
          },
          "priceMaxJpy": {
            "title": "Maximum price (JPY)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional upper price bound in JPY."
          },
          "excludeKeywords": {
            "title": "Exclude keywords",
            "type": "array",
            "description": "Optional negative keywords forwarded to Mercari searchCondition.excludeKeyword.",
            "items": {
              "type": "string"
            },
            "default": []
          },
          "excludeNoise": {
            "title": "Exclude Japanese resale noise",
            "type": "boolean",
            "description": "Filter out junk, box/parts/guidebook-only, reserved listings, and irrelevant matches from comps and dataset output.",
            "default": true
          },
          "excludeBundles": {
            "title": "Exclude bundles / lots",
            "type": "boolean",
            "description": "Also exclude multi-item bundles and lot listings (まとめ売り / ○点セット) from comps and output.",
            "default": false
          },
          "underpricedThresholdPct": {
            "title": "Underpriced deal threshold (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Minimum discount percentage below the clean sold median to flag a live listing as an underpriced deal.",
            "default": 20
          },
          "maxUnderpricedDiscountPct": {
            "title": "Max underpriced discount guard (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Upper discount percentage cap to avoid flagging extreme low-price accessories (e.g. 95% off covers/cables) as false deals.",
            "default": 70
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "both",
              "listings_only",
              "summary_only"
            ],
            "type": "string",
            "description": "Choose whether to push summaries, listings, or both to the default Dataset. SUMMARY is always saved to Key-Value Store.",
            "default": "both"
          },
          "usdJpyRate": {
            "title": "Fixed USD/JPY rate (optional)",
            "minimum": 1,
            "type": "number",
            "description": "Optional fixed JPY per 1 USD exchange rate (e.g. 158.0). If omitted, fetches live rate from Frankfurter API with safe fallback."
          },
          "autoEscalateProxy": {
            "title": "Auto-escalate to JP Residential Proxy on block",
            "type": "boolean",
            "description": "Start requests without a proxy and automatically escalate to JP Residential Proxy only if a marketplace blocks (HTTP 401/403/429).",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify Proxy configuration. Leave disabled to use direct requests first with automatic JP Residential escalation.",
            "default": {
              "useApifyProxy": 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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}