{
  "openapi": "3.0.1",
  "info": {
    "title": "Anime Figure & Gunpla Price — Japan Resale Value vs Retail",
    "description": "What is an anime figure or Gunpla kit worth in Japan vs its retail price? One call returns HobbyLink Japan retail, Mandarake/BookOff shop-used and Yahoo Auctions/Mercari sold medians, plus the resale premium. Every number tagged retail/shop_used/c2c. From $0.02, no subscription. 定価比プレミアムを1コールで。",
    "version": "0.1",
    "x-build-id": "Yz5t2hHjWcBYSAJ2o"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jpmarketdata~japan-figure-gunpla-resale-value/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jpmarketdata-japan-figure-gunpla-resale-value",
        "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-figure-gunpla-resale-value/runs": {
      "post": {
        "operationId": "runs-sync-jpmarketdata-japan-figure-gunpla-resale-value",
        "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-figure-gunpla-resale-value/run-sync": {
      "post": {
        "operationId": "run-sync-jpmarketdata-japan-figure-gunpla-resale-value",
        "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": "Product keywords",
            "type": "array",
            "description": "One or more product searches. The keyword is the join key across every source, so it works best when it names ONE product: \"RG Nu Gundam\" or \"MG Sazabi Ver.Ka\", not \"gundam\". Japanese matches more second-hand listings than English (ねんどろいど 初音ミク). Each keyword costs $0.02.",
            "default": [
              "RG Nu Gundam"
            ],
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "Sources to price",
            "type": "array",
            "description": "Which Japanese shops and marketplaces to price. The default four cover all three channels — retail (HobbyLink Japan), shop-used (Mandarake) and private resale (Yahoo! Auctions sold + Mercari) — and keep a run short. BookOff and PayPay Flea Market are extra depth: adding them roughly doubles the run time. The price of a keyword is the same whichever sources you pick.",
            "items": {
              "type": "string",
              "enum": [
                "hlj",
                "mandarake",
                "bookoff",
                "yahoo_auction",
                "mercari",
                "paypay_flea"
              ],
              "enumTitles": [
                "HobbyLink Japan — RETAIL anchor, new stock (必須級)",
                "Mandarake — shop-used, in stock + sold out (まんだらけ)",
                "BookOff — shop-used, +5 requests (ブックオフ)",
                "Yahoo! Auctions — C2C SOLD prices (ヤフオク落札)",
                "Mercari Japan — C2C (メルカリ)",
                "PayPay Flea Market — C2C asking (PayPayフリマ)"
              ]
            },
            "default": [
              "hlj",
              "mandarake",
              "yahoo_auction",
              "mercari"
            ]
          },
          "retailAnchor": {
            "title": "Retail anchor (what the premium divides by)",
            "enum": [
              "best_match",
              "catalog_median"
            ],
            "type": "string",
            "description": "HobbyLink Japan's catalogue mixes ¥500 decals, magazines and art books in with the kits, so a median over its search results is not the price of any one product (measured: \"RG Nu Gundam\" has a catalogue median of ¥500 against a rank-1 kit price of ¥4,500). 'Best match' uses the price of HLJ's top relevance-ranked hit — one product, one price. Choose 'Catalog median' when your keyword names a category rather than a product. Both are always reported in premium.byAnchor.",
            "default": "best_match"
          },
          "mercariStatus": {
            "title": "Mercari listing status",
            "enum": [
              "sold_out",
              "on_sale",
              "both"
            ],
            "type": "string",
            "description": "Which Mercari listings to price. 'Sold out' gives realized resale prices (the ones the premium is built on) and is the default. 'On sale' gives asking prices. 'Both' returns them as two separate blocks so each keeps a single, honest price kind — and costs one extra request.",
            "default": "sold_out"
          },
          "maxItemsPerSource": {
            "title": "Max listings sampled per source",
            "minimum": 20,
            "maximum": 240,
            "type": "integer",
            "description": "How many listings to sample per source (and per Mercari status) before computing the statistics. Larger samples are steadier but slower: HobbyLink Japan returns 24 per page, Yahoo! Auctions 50, PayPay 100, Mercari and Mandarake 120, and requests to one host are throttled to one per 1.5 s.",
            "default": 60
          },
          "priceMinJpy": {
            "title": "Minimum price (JPY, optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop listings priced below this before computing the statistics. Applied identically to every source so the retail and resale medians stay comparable. Useful to cut parts, stickers and empty boxes out of a keyword. Note: it forces every source back onto sample statistics (`statisticsBasis`)."
          },
          "priceMaxJpy": {
            "title": "Maximum price (JPY, optional)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop listings priced above this before computing the statistics. Applied identically to every source. Useful to cut bulk lots and 'set of 12' listings out of a keyword."
          },
          "includeIndividualItems": {
            "title": "Include individual listings",
            "type": "boolean",
            "description": "Off by default: a run costs a flat $0.02 per keyword, whatever the number of sources. Enable to also get every sampled listing from every source (title, price, stock status, condition, URL, priceBasis, priceKind) at +$0.002 per listing.",
            "default": false
          },
          "convertToUsd": {
            "title": "Convert prices to USD",
            "type": "boolean",
            "description": "Adds USD statistics next to JPY using the current exchange rate (open.er-api.com, looked up once per run).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}