Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

scryfall-api

MarioMH8567MIT4.0.3TypeScript support: included

A Javascript library for https://scryfall.com/docs/api written in Typescript.

magic, magic the gathering, magic-the-gathering, gathering, api, mtgsdk, typescript, card, cards, scryfall, scry

readme

banner.png

scryfall-api

A Javascript library for scryfall.com written in Typescript.

npm GitHub issues

Table of Contents

Installation

npm install --save scryfall-api

Using bun

bun add scryfall-api

Documentation

In the documentation below, requiring the package is assumed.

import scryfall from 'scryfall-api';

scryfall.Cards.byName('Black Lotus').then(console.log);

With CommonJS

const scryfall = require('scryfall-api');

scryfall.Cards.byName('Black Lotus').then(console.log);

If you only need Cards

import { Cards } from 'scryfall-api';

Cards.byName('Black Lotus').then(console.log);

Link to full documentation.

Contributing

This project uses Bun as a runtime, test runner and bundler.

Thanks for wanting to help out! Here's the setup you'll have to do:

Clone the project

git clone git@github.com:MarioMH8/scryfall-api.git

Go to the project directory

cd scryfall-api

Install dependencies

bun install

Compile the project

bun run build

MIT License

Copyright 2021-2024 MarioMH

changelog

scryfall-api

4.0.3

Patch Changes

  • 4d20732: Fix canRetry in retryFetcher

4.0.2

Patch Changes

  • Export Card types

4.0.1

Patch Changes

  • 5e10aad: Fix package.json exports field

4.0.0

Major Changes

  • 7fe3118: Remove axios dependency in favor of fetch

Minor Changes

  • e42e562: Update Card schema

Patch Changes

  • bcdcadd: Fix Cards.random() return type
  • e049bb4: Fix build
  • 55a1249: Include main field to the package.json so scryfall-api can be used without ESModules

4.0.0-beta.2

Patch Changes

  • 3d05a64: Fix Cards.random() return type

4.0.0-beta.1

Patch Changes

  • e049bb4: Fix build

4.0.0-beta.0

Major Changes

  • 7fe3118: Remove axios dependency in favor of fetch

Minor Changes

  • e42e562: Update Card schema

3.2.5

Patch Changes

  • 03b96ea: Fix cjs export file

3.2.4

Patch Changes

  • 6ef3fa9: Added alchemy and arsenal SetType

3.2.3

Patch Changes

  • 14f391a: Fix TypeScript definitions

3.2.1

Patch Changes

  • 78fd3d5: Add support for axios v1

3.2.0

Minor Changes

  • 2a4d89a: Update Layouts to match the latest Scryfall API version

3.1.0

Minor Changes

  • a8a8a42: Removed Misc

3.0.3

Patch Changes

  • df334fd: Updated dependencies

3.0.2

Patch Changes

  • 01f4705: Fixed typescript definitions

3.0.1

Patch Changes

  • 30beaf5: Fixed readme in npm.js

3.0.0

Major Changes

  • 91baaf8: Migrated repository to GitHub.