{
  "openapi": "3.0.1",
  "info": {
    "title": "Yahoo, Mercari & PayPay Japan — Same Item, 3 Prices",
    "description": "Price one keyword on Yahoo! Auctions (sold), Mercari (sold and asking) and PayPay Flea Market (asking). Returns each site's median price, the cheapest and priciest site and the gap (cross-market), labelled sold or asking. $0.02 per keyword, charged only when two sites return data. Unofficial.",
    "version": "0.1",
    "x-build-id": "6eV25lrc20JARWrai"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jpmarketdata~japan-resale-cross-market-checker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jpmarketdata-japan-resale-cross-market-checker",
        "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/jpmarketdata~japan-resale-cross-market-checker/runs": {
      "post": {
        "operationId": "runs-sync-jpmarketdata-japan-resale-cross-market-checker",
        "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/jpmarketdata~japan-resale-cross-market-checker/run-sync": {
      "post": {
        "operationId": "run-sync-jpmarketdata-japan-resale-cross-market-checker",
        "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": "One or more things to look up; each keyword is priced on every site you pick. Japanese matches far more listings than English (`ポケモンカード`, `ロレックス`). Each keyword is charged $0.02, and a keyword that comes back with nothing to compare is not charged. About 40 keywords fill a run's default limits (300-second time limit, $3.00 Maximum cost per run); raise both in the run options or split the list.",
            "default": [
              "nintendo switch"
            ],
            "items": {
              "type": "string"
            }
          },
          "markets": {
            "title": "Sites to compare",
            "type": "array",
            "description": "Which Japanese sites to price. Yahoo! Auctions returns sold prices (ended auctions with at least one bid), Mercari can return either, and PayPay Flea Market can only return asking prices because it does not publish sold listings. Pick two or more sites and the $0.02 is charged only when at least two of them come back with prices; pick one site and that one is enough.",
            "items": {
              "type": "string",
              "enum": [
                "yahoo_auction",
                "mercari",
                "paypay_flea"
              ],
              "enumTitles": [
                "Yahoo! Auctions Japan — sold prices (ヤフオク落札)",
                "Mercari Japan (メルカリ)",
                "PayPay Flea Market — asking prices (PayPayフリマ)"
              ]
            },
            "default": [
              "yahoo_auction",
              "mercari",
              "paypay_flea"
            ]
          },
          "mercariStatus": {
            "title": "Which Mercari listings to use",
            "enum": [
              "both",
              "sold_out",
              "on_sale"
            ],
            "type": "string",
            "description": "`sold_out` gives what items actually sold for (comparable with Yahoo! Auctions), `on_sale` gives asking prices (comparable with PayPay Flea Market), `both` returns them as two separate blocks so each block keeps one honest basis. A keyword is $0.02 whichever you pick, but with 'Include individual listings' on, `both` roughly doubles the Mercari rows charged at $0.002.",
            "default": "both"
          },
          "maxItemsPerMarket": {
            "title": "Listings sampled per site",
            "minimum": 30,
            "maximum": 300,
            "type": "integer",
            "description": "How many listings each site's median is measured on. Bigger samples are steadier but slower — Yahoo returns 50 per request, Mercari 120, PayPay 100, and requests are spaced 1.5 seconds apart. It changes your bill only when 'Include individual listings' is on, because each listing returned is $0.002.",
            "default": 100
          },
          "priceMinJpy": {
            "title": "Lowest price to include (JPY)",
            "minimum": 0,
            "type": "integer",
            "description": "Listings under this yen amount are dropped before each median is worked out. The same cut is applied to every site, so the medians can still be set side by side. Useful for keeping accessories and junk listings out of a keyword."
          },
          "priceMaxJpy": {
            "title": "Highest price to include (JPY)",
            "minimum": 0,
            "type": "integer",
            "description": "Listings over this yen amount are dropped before each median is worked out. The same cut is applied to every site. Useful for keeping bundles and lot sales out of a keyword."
          },
          "includeIndividualItems": {
            "title": "Include individual listings",
            "type": "boolean",
            "description": "Off by default: a run costs a flat $0.02 per keyword, however many sites you pick. Turn it on to also get every sampled listing from every site (title, price, sold or asking, condition, link) at $0.002 per listing — at the default 100 per block — four blocks, because Mercari comes back as both sold and on sale — a run reaches the $3.00 Maximum cost per run during the 4th keyword.",
            "default": false
          },
          "convertToUsd": {
            "title": "Also show prices in US dollars",
            "type": "boolean",
            "description": "Adds a US dollar figure next to every yen figure, using today's rate from open.er-api.com (looked up once per run). Nothing else about the result changes.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}