{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan Gold & Silver Prices – Dealer Buy & Retail",
    "description": "Japanese gold, platinum, palladium and silver prices per gram from several Japanese bullion dealers in one table: retail (sell) and buy-back prices, spread, the dealer's day-on-day change and change since your last run. Optional Tanaka bullion coins and karat grades (K18, Pt900).",
    "version": "0.0",
    "x-build-id": "9vIweCmo2TfXOBDhv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datalab-jp~japan-precious-metal-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datalab-jp-japan-precious-metal-prices",
        "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/datalab-jp~japan-precious-metal-prices/runs": {
      "post": {
        "operationId": "runs-sync-datalab-jp-japan-precious-metal-prices",
        "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/datalab-jp~japan-precious-metal-prices/run-sync": {
      "post": {
        "operationId": "run-sync-datalab-jp-japan-precious-metal-prices",
        "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": {
          "dealers": {
            "title": "Dealers",
            "uniqueItems": true,
            "type": "array",
            "description": "Which Japanese dealers' published price pages to read, e.g. ['tanaka'] for Tanaka Kikinzoku only or ['tanaka', 'nihon-material'] for the two bullion dealers. Pick any of: tanaka (gold, platinum, silver; bars and coins), nihon-material (gold, platinum, palladium, silver bars), goldplaza (buyer: ingot and karat-grade buy prices only). Defaults to all three when omitted. Each dealer publishes on business days on its own schedule; publishedAt shows when each price was published.",
            "items": {
              "type": "string",
              "enum": [
                "tanaka",
                "nihon-material",
                "goldplaza"
              ],
              "enumTitles": [
                "Tanaka Kikinzoku (田中貴金属)",
                "Nihon Material (日本マテリアル)",
                "Gold Plaza (ゴールドプラザ, buy prices only)"
              ]
            },
            "default": [
              "tanaka",
              "nihon-material",
              "goldplaza"
            ]
          },
          "metals": {
            "title": "Metals",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only these metals, e.g. ['gold'] or ['platinum', 'palladium']. Allowed: gold, platinum, palladium, silver. Leave empty (default) to keep all four. Palladium is published only by nihon-material, so ['palladium'] with dealers=['tanaka'] returns nothing (the run log explains why).",
            "items": {
              "type": "string",
              "enum": [
                "gold",
                "platinum",
                "palladium",
                "silver"
              ],
              "enumTitles": [
                "Gold",
                "Platinum",
                "Palladium",
                "Silver"
              ]
            },
            "default": []
          },
          "productTypes": {
            "title": "Product types",
            "uniqueItems": true,
            "type": "array",
            "description": "Which products to return, e.g. ['bullion'] for bar prices per gram or ['bullion', 'coin', 'purity_grade'] for everything. Values: bullion (bar price per gram, all dealers), coin (Tanaka's bullion-coin prices per coin: Vienna Philharmonic / Maple Leaf / Eagle, 1 to 1/10 oz), purity_grade (Gold Plaza's buy prices per gram for K24…K5, Pt1000…Pt850, SV1000/SV925). Defaults to ['bullion'] (about 10 rows). Combined with metals, a row must match both.",
            "items": {
              "type": "string",
              "enum": [
                "bullion",
                "coin",
                "purity_grade"
              ],
              "enumTitles": [
                "Bullion bars (JPY per gram)",
                "Bullion coins (JPY per coin, Tanaka)",
                "Karat / purity grades (JPY per gram, Gold Plaza)"
              ]
            },
            "default": [
              "bullion"
            ]
          },
          "mode": {
            "title": "Output mode",
            "enum": [
              "all",
              "changes"
            ],
            "type": "string",
            "description": "What to return: 'all' (the full table every run, each row annotated with the change vs the previous run) or 'changes' (only rows that are new or whose retail or buy price moved since the previous run, for alerts). Defaults to 'all'. In 'changes' mode the very first run returns everything as a baseline. Previous prices are kept in the named key-value store given in stateStoreName.",
            "default": "all"
          },
          "stateStoreName": {
            "title": "Change-tracking store name",
            "type": "string",
            "description": "Name of the key-value store in your Apify account that remembers the previous prices, e.g. 'japan-precious-metal-prices-state' or 'gold-watch'. Use letters, digits and '-' only (max 63). Defaults to 'japan-precious-metal-prices-state'. Use a separate name per scheduled task with different filters, otherwise products entering or leaving the filter show up as new.",
            "default": "japan-precious-metal-prices-state"
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum number of rows returned in this run, e.g. 20 for bullion only or 100 for every product. Each row is one billable result, so this is your cost cap. Defaults to 100; a run with every dealer and every product type is about 37 rows. If the cap cuts the output, change tracking is not advanced, so the next run still reports the changes.",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Apify Proxy settings. By default the Actor connects directly (no proxy). On 2026-10-10 Tanaka's price page answered HTTP 200 from the Apify platform both directly and via the datacenter proxy; the Nihon Material and Gold Plaza pages answered 200 from a Japanese connection. If a site ever blocks direct access, enable Apify Proxy here; with no group chosen the Actor uses Japan-based residential IPs (RESIDENTIAL, JP), billed per GB.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}