{
  "openapi": "3.0.1",
  "info": {
    "title": "OSRS Grand Exchange Prices & Flipping - Wiki API",
    "description": "Old School RuneScape Grand Exchange prices from the OSRS Wiki real-time API: buy and sell prices, margin after tax, ROI, volume, buy limits, high alchemy profit and price history for every item. No proxy. Export to Excel, CSV or API.",
    "version": "0.1",
    "x-build-id": "COLIvSh4EcjsGS8fo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pshivam~osrs-grand-exchange-prices-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pshivam-osrs-grand-exchange-prices-scraper",
        "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/pshivam~osrs-grand-exchange-prices-scraper/runs": {
      "post": {
        "operationId": "runs-sync-pshivam-osrs-grand-exchange-prices-scraper",
        "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/pshivam~osrs-grand-exchange-prices-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-pshivam-osrs-grand-exchange-prices-scraper",
        "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": {
          "dataTypes": {
            "title": "What to get",
            "type": "array",
            "description": "Prices: one row per item with the latest buy and sell price, margin after the Grand Exchange tax, ROI, volume and alchemy profit. History: the price history of the items you name. Leave empty for prices.",
            "items": {
              "type": "string",
              "enum": [
                "prices",
                "history"
              ],
              "enumTitles": [
                "Prices (one row per item with margin, ROI and volume)",
                "Price history (named items)"
              ]
            }
          },
          "search": {
            "title": "Search names",
            "type": "array",
            "description": "Only items whose name contains one of these words, for example dragon or rune. Leave empty for all items.",
            "items": {
              "type": "string"
            }
          },
          "membership": {
            "title": "Members items",
            "enum": [
              "any",
              "members",
              "free"
            ],
            "type": "string",
            "description": "Only members items, only free-to-play items, or both.",
            "default": "any"
          },
          "minVolume": {
            "title": "Minimum 24-hour volume",
            "minimum": 0,
            "type": "integer",
            "description": "Only items traded at least this many times in the last 24 hours. Skips illiquid items whose prices are unreliable. 500 is a good start for flipping."
          },
          "maxAgeMinutes": {
            "title": "Maximum price age (minutes)",
            "minimum": 0,
            "type": "number",
            "description": "Only items whose latest buy and sell trades are both at most this old. Rarely traded items show old prices that look like big margins; 30 removes them."
          },
          "minMargin": {
            "title": "Minimum margin (gp)",
            "type": "integer",
            "description": "Only items with at least this margin after tax, in gold pieces, for example 1000."
          },
          "minRoi": {
            "title": "Minimum return on investment (%)",
            "type": "number",
            "description": "Only items with at least this margin as a percent of the buy price, for example 2."
          },
          "minPrice": {
            "title": "Minimum price (gp)",
            "minimum": 0,
            "type": "integer",
            "description": "Only items whose buy price is at least this many gold pieces."
          },
          "maxPrice": {
            "title": "Maximum price (gp)",
            "minimum": 0,
            "type": "integer",
            "description": "Only items whose buy price is at most this many gold pieces: your cash stack."
          },
          "minBuyLimit": {
            "title": "Minimum buy limit",
            "minimum": 0,
            "type": "integer",
            "description": "Only items you can buy at least this many of every four hours."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "id",
              "margin",
              "roi",
              "potentialProfit",
              "highAlchProfit",
              "volume24h",
              "highPrice",
              "lowPrice",
              "name"
            ],
            "type": "string",
            "description": "The order of the rows. With a maximum number of records you get the top ones: sort by margin or potential profit and set 50 records for the best flips. Everything but id and name sorts from high to low.",
            "default": "id"
          },
          "historyItems": {
            "title": "Items for price history",
            "type": "array",
            "description": "For the history data type: item names (Abyssal whip) or item ids (4151).",
            "items": {
              "type": "string"
            }
          },
          "timesteps": {
            "title": "History time steps",
            "type": "array",
            "description": "For the history data type: the spacing of the price points. 5m, 1h, 6h and 24h give up to 365 points each. Leave empty for 24h.",
            "items": {
              "type": "string",
              "enum": [
                "5m",
                "1h",
                "6h",
                "24h"
              ],
              "enumTitles": [
                "5 minutes",
                "1 hour",
                "6 hours",
                "24 hours"
              ]
            }
          },
          "onlyNew": {
            "title": "Only new items",
            "type": "boolean",
            "description": "Skip items that earlier runs of this same search already returned, so you pay only for items that appeared since. Prices change every run, so leave this off to track prices. The first run works as usual and remembers what it returned, in your key-value store 'osrs-grand-exchange-prices-scraper-only-new'.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum records",
            "minimum": 1,
            "maximum": 500000,
            "type": "integer",
            "description": "Stop after this many records. You are charged per record. With a sort order, you get the top ones.",
            "default": 5000
          },
          "secondsBetweenRequests": {
            "title": "Seconds between requests",
            "minimum": 0.5,
            "maximum": 60,
            "type": "number",
            "description": "Pause between requests to the OSRS Wiki. After a refusal the Actor doubles the pause, and it stops when the refusals go on.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}