{
  "openapi": "3.0.1",
  "info": {
    "title": "Japan Scrap Metal Prices – Steel & Non-Ferrous",
    "description": "Daily Japanese scrap metal buying prices in one normalised table: Tokyo Steel ferrous scrap price sheets plus copper, wire, brass, aluminium and stainless prices from Japanese scrap dealers, with change tracking.",
    "version": "0.0",
    "x-build-id": "t3pYEgBpHaZH9FzPi"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datalab-jp~japan-scrap-metal-prices/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datalab-jp-japan-scrap-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-scrap-metal-prices/runs": {
      "post": {
        "operationId": "runs-sync-datalab-jp-japan-scrap-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-scrap-metal-prices/run-sync": {
      "post": {
        "operationId": "run-sync-datalab-jp-japan-scrap-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": "Price sources (dealers)",
            "uniqueItems": true,
            "type": "array",
            "description": "Which Japanese price boards to read, e.g. ['tokyo-steel'] for ferrous scrap only or ['ohata', 'hiranoya'] for copper and non-ferrous. Pick any of: tokyo-steel (Tokyo Steel ferrous price sheets, JPY/t per plant), ohata, hiranoya, kimura, yagi, kouchi, kousyo (scrap dealers, mostly JPY/kg). Defaults to all seven when omitted. Each dealer publishes on its own schedule (daily to monthly); the priceDate field shows the date each price applies to.",
            "items": {
              "type": "string",
              "enum": [
                "tokyo-steel",
                "ohata",
                "hiranoya",
                "kimura",
                "yagi",
                "kouchi",
                "kousyo"
              ],
              "enumTitles": [
                "Tokyo Steel (ferrous, PDF sheets)",
                "Ohata Shoji (Osaka/Chiba/Gunma)",
                "Hiranoya (Sakai, Osaka)",
                "Kimura Metal (Osaka)",
                "Yagi (Osaka)",
                "Kouchi Kinzoku (Kochi)",
                "Kousyo Boueki (Izumi, Osaka)"
              ]
            },
            "default": [
              "tokyo-steel",
              "ohata",
              "hiranoya",
              "kimura",
              "yagi",
              "kouchi",
              "kousyo"
            ]
          },
          "metalGroups": {
            "title": "Metal groups",
            "uniqueItems": true,
            "type": "array",
            "description": "Keep only rows in these normalised groups, e.g. ['copper', 'wire'] for copper scrap and insulated copper wire, or ['ferrous'] for steel scrap. Groups: copper, wire, brass_bronze, aluminium, stainless, lead_zinc, other_metals, mixed (radiators, water heaters, motors), ferrous. Leave empty (default) to keep every group. Filtering by group drops rows whose item name has no normalised itemCode yet, because only mapped items have a group.",
            "items": {
              "type": "string",
              "enum": [
                "copper",
                "wire",
                "brass_bronze",
                "aluminium",
                "stainless",
                "lead_zinc",
                "other_metals",
                "mixed",
                "ferrous"
              ],
              "enumTitles": [
                "Copper",
                "Insulated copper wire",
                "Brass & bronze",
                "Aluminium",
                "Stainless steel",
                "Lead, zinc & tin",
                "Other metals (nickel, carbide…)",
                "Mixed items (radiators, water heaters…)",
                "Ferrous (steel scrap)"
              ]
            },
            "default": []
          },
          "itemCodes": {
            "title": "Item codes",
            "type": "array",
            "description": "Keep only these normalised items, e.g. ['copper_bare_bright_wire'] (No.1 bare bright copper wire, Pika-sen) or ['copper_komido', 'brass_mixed', 'ferrous_heavy_1']. Codes are listed in the README table 'Normalised item codes'; unknown codes are rejected. Leave empty (default) to keep all items. Combined with metalGroups, a row must match both filters.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeUnmapped": {
            "title": "Include items without a normalised code",
            "type": "boolean",
            "description": "Whether to return rows whose Japanese item name is not yet in the normalisation table, e.g. dealer-specific items like 'ギロチン材A' or circuit boards; those rows keep the Japanese name and have itemCode null. Set to false for a clean cross-dealer comparison table (only items mapped to an itemCode such as copper_namido). Defaults to true. Has no effect on rows already removed by metalGroups or itemCodes.",
            "default": true
          },
          "mode": {
            "title": "Output mode",
            "enum": [
              "all",
              "changes"
            ],
            "type": "string",
            "description": "What to return: 'all' (full price table every run, each row annotated with previousPrice and change vs the previous run) or 'changes' (only rows that are new or whose price moved since the previous run, for daily monitoring and alerts). Defaults to 'all'. In 'changes' mode the very first run returns everything as a baseline. History is stored 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-scrap-metal-prices-state' or 'copper-watch-osaka'. Use letters, digits and '-' only (max 63). Defaults to 'japan-scrap-metal-prices-state'. Use a separate name per scheduled task with different filters, otherwise items entering or leaving the filter show up as new.",
            "default": "japan-scrap-metal-prices-state"
          },
          "tokyoSteelSheets": {
            "title": "Tokyo Steel price sheets (history)",
            "minimum": 1,
            "maximum": 80,
            "type": "integer",
            "description": "How many of Tokyo Steel's published price sheets to read, newest first, e.g. 1 for the current prices or 20 for about six months of revisions (the page lists roughly 75 sheets back to early 2025). Each sheet gives about 84 rows (grade × plant). Defaults to 1. Ignored in mode='changes', which always compares against the previous run.",
            "default": 1
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum number of rows returned in this run, e.g. 500 for a quick look or 3000 for every dealer and item (a full run is about 480 rows). Each row is one billable result, so this is your cost cap. Defaults to 3000 (one full run of all dealers is about 480 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 the Tokyo Steel, Ohata and Kimura pages answered HTTP 200 from the Apify platform both directly and via the datacenter proxy; the other dealers 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). Residential traffic is 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}