{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan Sold Comps by Photo: Mercari & Yahoo Auctions",
    "description": "Upload a photo and get what that item actually sold for in Japan. Searches Mercari Japan sold items and Yahoo! Auctions closed auctions, ranks listings by CLIP visual similarity, and returns JPY + USD prices with a median and price range. No Japanese keywords needed.",
    "version": "0.1",
    "x-build-id": "Fnlt7juifpuERSlM6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapelabmax~japan-sold-comps-by-photo/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapelabmax-japan-sold-comps-by-photo",
        "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/scrapelabmax~japan-sold-comps-by-photo/runs": {
      "post": {
        "operationId": "runs-sync-scrapelabmax-japan-sold-comps-by-photo",
        "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/scrapelabmax~japan-sold-comps-by-photo/run-sync": {
      "post": {
        "operationId": "run-sync-scrapelabmax-japan-sold-comps-by-photo",
        "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": {
          "imageUrls": {
            "title": "Photo URLs",
            "maxItems": 20,
            "type": "array",
            "description": "One or more direct links to photos of the item, one item per photo. Up to 20 photos per run (including an uploaded file). JPEG, PNG, WebP, GIF, AVIF, TIFF or HEIC, up to 10 MB each.",
            "items": {
              "type": "string"
            }
          },
          "imageFile": {
            "title": "Upload a photo",
            "type": "string",
            "description": "Upload one photo from your device instead of (or in addition to) pasting a URL."
          },
          "keyword": {
            "title": "Keyword (optional)",
            "type": "string",
            "description": "English or Japanese. With a photo, this is a hint that replaces the automatically generated keywords (use it when the photo alone is ambiguous). Without a photo, the actor runs in keyword-only mode and returns comps without similarity scores."
          },
          "translateKeywords": {
            "title": "Also search in Japanese",
            "type": "boolean",
            "description": "When your keyword is not Japanese, also search with generated Japanese keywords (the names Japanese sellers actually use) and merge the results. Listings titled only in Japanese are otherwise missed.",
            "default": true
          },
          "marketplaces": {
            "title": "Marketplaces",
            "minItems": 1,
            "uniqueItems": true,
            "type": "array",
            "description": "Which sites to search. If one fails, results from the other are still returned.",
            "items": {
              "type": "string",
              "enum": [
                "mercari_jp",
                "yahoo_auctions_jp"
              ],
              "enumTitles": [
                "Mercari Japan",
                "Yahoo! Auctions Japan (closed auctions)"
              ]
            },
            "default": [
              "mercari_jp",
              "yahoo_auctions_jp"
            ]
          },
          "status": {
            "title": "Listing status",
            "enum": [
              "sold",
              "on_sale",
              "trading"
            ],
            "type": "string",
            "description": "Sold is the default and the only status used for the price summary. On sale and Trading apply to Mercari Japan only; Yahoo! Auctions is skipped for them.",
            "default": "sold"
          },
          "sort": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "newest",
              "price"
            ],
            "type": "string",
            "description": "Order in which the marketplaces return candidates. Yahoo! Auctions closed search has no relevance order and uses most recently ended instead.",
            "default": "relevance"
          },
          "order": {
            "title": "Sort order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Applies to Newest and Price.",
            "default": "desc"
          },
          "priceMin": {
            "title": "Minimum price (JPY)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings at or above this price in yen. Applied by the marketplace before anything is downloaded."
          },
          "priceMax": {
            "title": "Maximum price (JPY)",
            "minimum": 0,
            "type": "integer",
            "description": "Only listings at or below this price in yen."
          },
          "minSimilarity": {
            "title": "Minimum similarity",
            "minimum": 0,
            "maximum": 1,
            "type": "number",
            "description": "CLIP image similarity (0 to 1) a listing's main photo must reach to count as a match. Raise it to exclude near matches such as a different colorway; lower it if too few comps come back.",
            "default": 0.75
          },
          "maxResults": {
            "title": "Max comps per photo",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of comps returned (and charged) for each photo or keyword query.",
            "default": 50
          },
          "maxCandidatesPerMarketplace": {
            "title": "Max candidates per marketplace",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "How many listings to fetch from each marketplace and compare against the photo. The cap applies to all keywords combined. Higher finds more comps but takes longer.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Fallback proxy",
            "type": "object",
            "description": "Fallback proxy for marketplace searches and for downloading your photo. Requests are sent directly first, and this proxy is used only if a marketplace or the photo's host blocks or fails the direct request. Listing thumbnails are always fetched directly. Defaults to Japan residential exits.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ],
              "apifyProxyCountry": "JP"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}