{"id":18465825,"url":"https://github.com/tcgdex/javascript-sdk","last_synced_at":"2025-07-18T19:34:08.841Z","repository":{"id":36965236,"uuid":"246284120","full_name":"tcgdex/javascript-sdk","owner":"tcgdex","description":"Communicate with the Open Source TCGdex API in Javascript/Typescript using the SDK","archived":false,"fork":false,"pushed_at":"2025-05-26T12:19:19.000Z","size":1318,"stargazers_count":18,"open_issues_count":12,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-28T03:39:09.158Z","etag":null,"topics":["api","card","javascript","pokemon","sdk","tcg","tcgdex","trading","typescript","typing"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/@tcgdex/sdk","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/tcgdex.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["tcgdex"]}},"created_at":"2020-03-10T11:34:45.000Z","updated_at":"2025-06-07T20:44:40.000Z","dependencies_parsed_at":"2023-12-28T03:10:16.145Z","dependency_job_id":"e3f372c0-079c-4c64-9e48-84010067e347","html_url":"https://github.com/tcgdex/javascript-sdk","commit_stats":null,"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"purl":"pkg:github/tcgdex/javascript-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcgdex%2Fjavascript-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcgdex%2Fjavascript-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcgdex%2Fjavascript-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcgdex%2Fjavascript-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tcgdex","download_url":"https://codeload.github.com/tcgdex/javascript-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcgdex%2Fjavascript-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265820261,"owners_count":23833563,"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","card","javascript","pokemon","sdk","tcg","tcgdex","trading","typescript","typing"],"created_at":"2024-11-06T09:14:15.518Z","updated_at":"2025-07-18T19:34:08.809Z","avatar_url":"https://github.com/tcgdex.png","language":"TypeScript","funding_links":["https://github.com/sponsors/tcgdex"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://www.tcgdex.net\"\u003e\n\t\t\u003cimg src=\"https://www.tcgdex.net/assets/og.png\" width=\"90%\" alt=\"TCGdex Main Image\"\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"http://npmjs.com/@tcgdex/sdk\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/npm/v/@tcgdex/sdk?style=flat-square\" alt=\"NOM Version\"\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"http://npmjs.com/@tcgdex/sdk\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/npm/dm/@tcgdex/sdk?style=flat-square\" alt=\"NPM Downloads\"\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://app.codecov.io/gh/tcgdex/javascript-sdk/\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/codecov/c/github/tcgdex/javascript-sdk?style=flat-square\u0026token=FR4BI94N4Q\" alt=\"npm version\"\u003e\n\t\u003c/a\u003e\n\t\t\u003ca href=\"https://github.com/tcgdex/javascript-sdk/stargazers\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/github/stars/tcgdex/javascript-sdk?style=flat-square\" alt=\"Github stars\"\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://github.com/tcgdex/javascript-sdk/actions/workflows/build.yml\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/tcgdex/javascript-sdk/build.yml?style=flat-square\" alt=\"the TCGdex JAvascript SDK is released under the MIT license.\" /\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://discord.gg/NehYTAhsZE\"\u003e\n\t\t\u003cimg src=\"https://img.shields.io/discord/857231041261076491?color=%235865F2\u0026label=Discord\u0026style=flat-square\" alt=\"Discord Link\"\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\n# TCGdex JavaScript/TypeScript SDK\n\nThe Javascript/Typescript SDK provides a convenient access with the Open Source TCGdex API.\n\nThe SDK is available in ESM and CommonJS and should be automaticly chosen.\n\n## Documentation\n\n_The full API/SDK documentation in progress at [API Documentation - TCGdex](https://www.tcgdex.dev)_\n\n### Getting Started\n\n#### How To install\n\n**In the browser**\n\nTo use the SDK in the browser, simply add the following script tag to your\nHTML pages:\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/@tcgdex/sdk@2/dist/tcgdex.browser.js\"\u003e\u003c/script\u003e\n```\n\nYou cna also download the script from [JSDelivr](https://cdn.jsdelivr.net/npm/@tcgdex/sdk@2/dist/tcgdex.browser.js) by right clicking the link and selecting save link as.\n\n**In Node.js**\n\nSimply type the following into a terminal window:\n\n```bash\nnpm install @tcgdex/sdk\n```\n\n#### Usage\n\n_Note: a complete documentation is available at [TCGdex.dev](https://www.tcgdex.dev)_\n\n**Example: Fetch a Card**\n\n_in Browser_\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/@tcgdex/sdk@2.4.9/dist/tcgdex.browser.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n\t// Instantiate the SDK\n\tconst tcgdex = new TCGdex('en');\n\n\t// go into an async context\n\t;(async () =\u003e {\n\t\t// Card will be Furret from the Darkness Ablaze Set\n\t\tconst card = await tcgdex.fetch('cards', 'swsh3-136');\n\t})();\n\u003c/script\u003e\n```\n\n_in NodeJS (in an async context)_\n\n```typescript\n// Import the SDK in Typescript or moduleJS\nimport TCGdex from '@tcgdex/sdk'\n\n// import the SDK in commonJS\nconst TCGdex = require('@tcgdex/sdk').default\n\n// Instantiate the SDK\nconst tcgdex = new TCGdex('en');\n\n// go into an async context\n(async () =\u003e {\n\t// Card will be Furret from the Darkness Ablaze Set\n\tconst card = await tcgdex.fetch('cards', 'swsh3-136');\n\n\t// You can also get the same result using\n\tconst card = await tcgdex.fetch('sets', 'Darkness Ablaze', 136);\n})();\n\n```\n\n**Other Examples**\n\n```javascript\n// fetch a Set's informations using the set's name or ID\nawait tcgdex.fetch('sets', 'Darkness Ablaze')\n\n// Fetch a serie using the serie's name or ID\nawait tcgdex.fetch('series', 'Sword \u0026 Shield')\n\n// Fetch cards possible pokemon cards HP\nawait tcgdex.fetch('hp');\n\n// Fetch Cards with the specific number of HP\nawait tcgdex.fetch('hp', 110);\n\n// Fetch cards possible illustrators\nawait tcgdex.fetch('illustrators');\n\n// Fetch Cards with the specific illustrator\nawait tcgdex.fetch('illustrators', 'tetsuya koizumi');\n```\n\n**Other Endpoints**\n\n_They work like the two (`hp` and `illustrators`) abose_\n\n- categories: the the different cards categories\n- energy-types: Fetch different types of energies\n- hp: fetch the different cards possible HPs\n- illustrators: fetch all the cards illustrators\n- rarities: fetch the cards rarities\n- retreats: fetch the cards using the retreat count\n- stages: fetch differents cards stages\n- suffixes: fetch differents cards suffixes\n- trainer-types: fetch trainer cards types\n- dex-ids: fetch pokemon Global Pokédex IDS\n- types: fetch the cards using the Pokémon type(s)\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/tcgdex/javascript-sdk/blob/master/CONTRIBUTING.md)\n\nTL::DR\n\n- Fork\n\n- Commit your changes\n\n- Pull Request on this Repository\n\n## License\n\nThis project is licensed under the IT License. A copy of the license is available at [LICENSE.md](https://github.com/tcgdex/javascript-sdk/blob/master/LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftcgdex%2Fjavascript-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftcgdex%2Fjavascript-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftcgdex%2Fjavascript-sdk/lists"}