{"id":22193035,"url":"https://github.com/nyan-left/trade-volume-scraper","last_synced_at":"2025-07-07T19:41:33.607Z","repository":{"id":36986016,"uuid":"240777913","full_name":"nyan-left/trade-volume-scraper","owner":"nyan-left","description":"Simple, typed API wrapper which returns old school runescape trade volume data of the grand exchange","archived":false,"fork":false,"pushed_at":"2023-01-25T01:03:15.000Z","size":917,"stargazers_count":3,"open_issues_count":29,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-29T13:23:37.702Z","etag":null,"topics":["api","node","old-school-runescape","runescape","trade-data","trade-volume"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nyan-left.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.MD","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null},"funding":{"github":["nyan-left"]}},"created_at":"2020-02-15T19:45:14.000Z","updated_at":"2024-07-11T17:32:52.000Z","dependencies_parsed_at":"2023-02-13T07:25:25.589Z","dependency_job_id":null,"html_url":"https://github.com/nyan-left/trade-volume-scraper","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/nyan-left/trade-volume-scraper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyan-left%2Ftrade-volume-scraper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyan-left%2Ftrade-volume-scraper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyan-left%2Ftrade-volume-scraper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyan-left%2Ftrade-volume-scraper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nyan-left","download_url":"https://codeload.github.com/nyan-left/trade-volume-scraper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nyan-left%2Ftrade-volume-scraper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264139575,"owners_count":23563251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","node","old-school-runescape","runescape","trade-data","trade-volume"],"created_at":"2024-12-02T12:46:17.741Z","updated_at":"2025-07-07T19:41:33.587Z","avatar_url":"https://github.com/nyan-left.png","language":"TypeScript","funding_links":["https://github.com/sponsors/nyan-left"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eOld School RuneScape Trade Stats\u003c/h1\u003e\n\n\u003e Node library which scrapes trade volume from the official grand exchange page, alongside wrapping around common APIs.\n\n# Importing the library\n\n## Using NPM\n\n```ts\nimport * as OSRS from 'osrs-trade-stats';\n```\n\n## Table Of Contents\n\n\u003c!--ts--\u003e\n\n- [Old School RuneScape Trade Stats](#old-school-runescape-trade-stats)\n- [Importing the library](#importing-the-library)\n  - [Using NPM](#using-npm)\n  - [Table Of Contents](#table-of-contents)\n- [Usage](#usage)\n  - [Getting item IDs used for queries](#getting-item-ids-used-for-queries)\n  - [Getting Data](#getting-data)\n    - [Trade Volume Data (OSRS's grand exchange graphs)](#trade-volume-data-osrss-grand-exchange-graphs)\n    - [Official OSRS API](#official-osrs-api)\n    - [2007HQ API](#2007hq-api)\n    - [OSRS Wiki API](#osrs-wiki-api)\n\n\u003c!-- Added by: deim, at: Sun Dec 20 05:30:20 GMT 2020 --\u003e\n\n\u003c!--te--\u003e\n\n# Usage\n\n## Getting item IDs used for queries\n\nThis package comes with an item list which can be used to quickly access item IDs.\n\n```ts\nconsole.log(OSRS.ITEMS_LIST.Abyssal_whip);\n```\n\noutput:\n\n```\n4151\n```\n\n## Getting Data\n\n\u003e :warning: **Do not spam requests to the APIs**: The services may time you out!\n\n### Trade Volume Data (OSRS's grand exchange graphs)\n\n(Not available on the official OSRS API)\nThis will return trade volume data from the official website.\n\n```ts\nconst data = await OSRS.getTradeVolume(4151);\nconsole.log(data);\n```\n\nOutput:\n\n```ts\n  // ...\n  {\n    tradeVolume: 1616,\n    date: 2020-09-19T23:00:00.000Z,\n    dateString: '9/20/2020',\n    priceAverage: 2670124,\n    priceDaily: 2659245\n  },\n  {\n    tradeVolume: 3072,\n    date: 2020-09-20T23:00:00.000Z,\n    dateString: '9/21/2020',\n    priceAverage: 2669895,\n    priceDaily: 2687489\n  },\n  {\n    tradeVolume: 6565,\n    date: 2020-09-21T23:00:00.000Z,\n    dateString: '9/22/2020',\n    priceAverage: 2669650,\n    priceDaily: 2678354\n  },\n  //... 80 more items\n```\n\n### Official OSRS API\n\nBare bones OSRS API that is publicly available.\n\n```ts\nconst itemData = await OSRS.getFromOfficialAPI(OSRS.ITEMS_LIST.Abyssal_whip);\nconsole.log(itemData);\n```\n\nOutput:\n\n```ts\n{\n  icon: 'https://secure.runescape.com/m=itemdb_oldschool/1607602554160_obj_sprite.gif?id=4151',\n  icon_large: 'https://secure.runescape.com/m=itemdb_oldschool/1607602554160_obj_big.gif?id=4151',\n  id: 4151,\n  type: 'Default',\n  typeIcon: 'https://www.runescape.com/img/categories/Default',\n  name: 'Abyssal whip',\n  description: 'A weapon from the abyss.',\n  current: { trend: 'neutral', price: '2.9m' },\n  today: { trend: 'negative', price: '- 10.9k' },\n  members: 'true',\n  day30: { trend: 'positive', change: '+4.0%' },\n  day90: { trend: 'positive', change: '+9.0%' },\n  day180: { trend: 'positive', change: '+1.0%' }\n}\n```\n\n### OSRS Wiki API\n\nGet long term trading data from the wiki.\n\n```ts\nconst tradeData = await OSRS.getFromWiki(4151);\nconsole.log(tradeData); // tradeVolume undefined as tracking began in 2018\nconsole.log(tradeData[tradeData.length - 10]); // this should have some tradeVolume data\n```\n\nOutput:\n\n```ts\n// ...\n  { // Old data\n    date: 1430006400000,\n    dateString: '04/26/2015',\n    priceDaily: 2488963,\n    tradeVolume: undefined\n  },\n  {\n    date: 1430092800000,\n    dateString: '04/27/2015',\n    priceDaily: 2571803,\n    tradeVolume: undefined\n  }, // ... 1980 more times\n\n\n{ // More recent data\n  date: 1607644800000,\n  dateString: '12/11/2020',\n  priceDaily: 2908135,\n  tradeVolume: 8743\n}\n```\n\n### osrsbox API\n\n```ts\nconst tradeData = await OSRS.getFromOsrsBox(4151);\nconsole.log(tradeData);\n```\n\nOutput:\n\n```ts\n{\n  id: 4151,\n  name: 'Abyssal whip',\n  incomplete: false,\n  members: true,\n  tradeable: true,\n  tradeable_on_ge: true,\n  stackable: false,\n  stacked: null,\n  noted: false,\n  noteable: true,\n  linked_id_item: null,\n  linked_id_noted: 4152,\n  linked_id_placeholder: 14032,\n  placeholder: false,\n  equipable: true,\n  equipable_by_player: true,\n  equipable_weapon: true,\n  cost: 120001,\n  lowalch: 48000,\n  highalch: 72000,\n  weight: 0.453,\n  buy_limit: 70,\n  quest_item: false,\n  release_date: '2005-01-26',\n  duplicate: false,\n  examine: 'A weapon from the abyss.',\n  icon: 'iVBORw0KGgoAAAANSUhEUg', // ...\n  wiki_name: 'Abyssal whip',\n  wiki_url: 'https://oldschool.runescape.wiki/w/Abyssal_whip',\n  wiki_exchange: 'https://oldschool.runescape.wiki/w/Exchange:Abyssal_whip',\n  equipment: {\n    attack_stab: 0,\n    attack_slash: 82,\n    attack_crush: 0,\n    attack_magic: 0,\n    attack_ranged: 0,\n    defence_stab: 0,\n    defence_slash: 0,\n    defence_crush: 0,\n    defence_magic: 0,\n    defence_ranged: 0,\n    melee_strength: 82,\n    ranged_strength: 0,\n    magic_damage: 0,\n    prayer: 0,\n    slot: 'weapon',\n    requirements: { attack: 70 }\n  },\n  weapon: {\n    attack_speed: 4,\n    weapon_type: 'whips',\n    stances: [ [Object], [Object], [Object] ]\n  }\n}\n```\n\n## CORS\n\nSome of the endpoints may require a cors proxy, such as [cors anywhere](https://github.com/Rob--W/cors-anywhere). To supply this to, simply pass it in as a parameter.\n\n```ts\nconst tradeData = await API.getTradeVolume(\n  4151,\n  'https://cors-anywhere.herokuapp.com/',\n);\n```\n\nThis should now work in the browser.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyan-left%2Ftrade-volume-scraper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnyan-left%2Ftrade-volume-scraper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnyan-left%2Ftrade-volume-scraper/lists"}