{"id":15893460,"url":"https://github.com/multimeric/pkmncardsscraper","last_synced_at":"2025-07-15T04:36:47.894Z","repository":{"id":85377294,"uuid":"36796656","full_name":"multimeric/PkmnCardsScraper","owner":"multimeric","description":"Scrapes pkmncards.com for pokemon card data","archived":false,"fork":false,"pushed_at":"2015-12-28T16:44:35.000Z","size":159,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T13:21:33.760Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/multimeric.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-03T10:26:58.000Z","updated_at":"2025-03-14T12:22:40.000Z","dependencies_parsed_at":"2023-03-17T13:01:12.909Z","dependency_job_id":null,"html_url":"https://github.com/multimeric/PkmnCardsScraper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/multimeric/PkmnCardsScraper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multimeric%2FPkmnCardsScraper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multimeric%2FPkmnCardsScraper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multimeric%2FPkmnCardsScraper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multimeric%2FPkmnCardsScraper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/multimeric","download_url":"https://codeload.github.com/multimeric/PkmnCardsScraper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multimeric%2FPkmnCardsScraper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265402833,"owners_count":23759237,"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":[],"created_at":"2024-10-06T08:10:45.392Z","updated_at":"2025-07-15T04:36:47.875Z","avatar_url":"https://github.com/multimeric.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pokemon TCG Scraper\n\n## Introduction\n\nPkmnCardsScraper is a module for scraping pkmncards.com, a database of cards used in the Pokemon trading card game.\nThe resulting data can be used to populate databases, make calculations, or any other purpose.\n\n## Usage\n\nFirst, to install the module, simply run `npm install pkmncards-scraper`, and in your code add\n`var scraper = require('pkmncards-scraper')`\n\nYou can then run queries using the promise interface (note: there is no callback interface, but you can treat the then()\nargument as the callback). The main way to use the module is with the `scrapeAll` function. For example, if you wanted\ndata on all 7000 cards in the pkmncards database, you would use:\n\n```javascript\nscraper.scrapeAll().then(function(cards){\n    //Do something with data\n});\n```\n\nThis will print an array of cards like this:\n\n```json\n[\n   {\n      \"smallImg\":\"http://pkmncards.com/wp-content/uploads/altaria-xy-promos-xy46-312x432.jpg\",\n      \"largeImg\":\"http://pkmncards.com/wp-content/uploads/altaria-xy-promos-xy46.jpg\",\n      \"name\":\"Altaria\",\n      \"set\":\"XY Promos\",\n      \"specificType\":\"Stage 1\",\n      \"basicType\":\"Pokemon\",\n      \"evolvesFrom\":\"Swablu\",\n      \"color\":\"Colorless\",\n      \"hp\":90,\n      \"traits\":[\n         {\n            \"name\":\"Δ Evolution\",\n            \"text\":\"You may play this card from your hand to evolve a Pokémon during your first turn or the turn you play that Pokémon.\"\n         }\n      ],\n      \"abilities\":[\n         {\n            \"name\":\"Clear Humming\",\n            \"text\":\"Each of your [C] Pokémon has no Weakness.\"\n         }\n      ],\n      \"attacks\":[\n         {\n            \"cost\":[\n               \"[C]\",\n               \"[C]\"\n            ],\n            \"damage\":\"30\",\n            \"text\":\"30 damage.\",\n            \"name\":\"Wing Attack\"\n         }\n      ],\n      \"weakness\":{\n         \"type\":\"Lightning\",\n         \"value\":\"x2\"\n      },\n      \"resistance\":{\n         \"type\":\"Lightning\",\n         \"value\":\"x2\"\n      },\n      \"retreatCost\":\"1\",\n      \"setId\":\"XY46\",\n      \"rarity\":\"Promo\"\n   }\n]\n```\n\n## API\n\nThe TCG scraper exposes only one main function: `scrapeAll(query)`\n\n`scrapeAll` Queries the pkmncards.com using the first parameter, which is an object consisting of key/value\npairs to be used in the query string. The specification of this is described in the node querystring module. The function\nreturns an array of cards, each with a `url` and `image` property. If scrapeDetails is true, which it is by default, then\nthe scraper will also run scrapeCard on each card, and augment it with all the fields listed in the output section.\n## Output\n\n### Pokemon\n\nIf the scraper encounters a pokemon card, it outputs objects with the following fields\n\n * `smallImg`: The URL of the 312x432 pixel version of the card image, e.g. \"http://pkmncards.com/wp-content/uploads/altaria-xy-promos-xy46-312x432.jpg\"\n * `largeImg`: The URL of the full scan of the card, e.g. \"http://pkmncards.com/wp-content/uploads/altaria-xy-promos-xy46.jpg\"\n * `name`: The pokemon's name, e.g. \"Altaria\",\n * `set`: The set the card is from, e.g. \"XY Promos\"\n * `basicType`: The overall type of the card. Can be either \"Trainer\", \"Energy\", or \"Pokemon\"\n * `specificType`: The specific of card, e.g. \"Stage 1\",\n * `evolvesFrom`: The previous evolution, e.g. \"Swablu\",\n * `hp`: The card's hit points, e.g. 90,\n * `color`: The card's colour, e.g. \"Colorless\",\n * `abilities`:  The card's passive abilities (Ability, Pokemon Power, Poke Body etc.)\n Each contains a `name` and `text` field.\n e.g.\n```json\n[\n    {\n        \"name\":\"Clear Humming\",\n        \"text\":\"Each of your [C] Pokémon has no Weakness.\"\n    }\n]\n```\n * `traits`:  The card's ancient traits. Each contains a `name` and `text` field.\n e.g.\n```json\n[\n    {\n        \"name\":\"Δ Evolution\",\n        \"text\":\"You may play this card from your hand to evolve a Pokémon during your first turn or the turn you play that Pokémon.\"\n    }\n],\n```\n * `attacks` An array of attacks, consisting of `cost`, `name`, `damage`, and `text`. E.g.\n```json\n[\n    {\n        \"cost\":[\n           \"[C]\",\n           \"[C]\"\n        ],\n        \"damage\":\"30\",\n        \"text\":\"30 damage.\",\n        \"name\":\"Wing Attack\"\n    }\n]\n```\n * `weaknesses` An object with `type` and `value` fields indicating the Pokemon's weakness. E.g.\n ```json\n{\n    \"type\":\"Lightning\",\n    \"value\":\"x2\"\n},\n```\n * `resistances` An object with `type` and `value` fields. E.g.\n```json\n{\n    \"type\":\"Lightning\",\n    \"value\":\"x2\"\n}\n```\n * `retreatCost` The cost (as an integer, the number of colourless energies) to retreat the Pokemon. E.g. 2\n\n### Other\n\nAll other cards (energies and trainers) simply have the fields `name` and `text`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultimeric%2Fpkmncardsscraper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmultimeric%2Fpkmncardsscraper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultimeric%2Fpkmncardsscraper/lists"}