
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@devmugi/scryfall-api
Advanced tools
Scryfall API client for JavaScript and TypeScript. Access the Scryfall Magic: The Gathering card database with full TypeScript support.
npm install @devmugi/scryfall-api
import { CardsApiJs } from '@devmugi/scryfall-api';
const api = new CardsApiJs();
// Get a random card
const card = await api.random(null);
console.log(`${card.name} - ${card.typeLine}`);
// Search for cards
const results = await api.search({ q: 'lightning bolt' });
console.log(`Found ${results.totalCards} cards`);
// Get card by exact name
const bolt = await api.namedExact({ name: 'Lightning Bolt' });
console.log(bolt.oracleText);
| API | Class | Description |
|---|---|---|
| Cards | CardsApiJs | Search, random, named lookup, collection |
| Sets | SetsApiJs | Magic set information |
| Rulings | RulingsApiJs | Official card rulings |
| Catalogs | CatalogsApiJs | Reference data (card names, types, keywords) |
| Symbology | CardSymbolApiJs | Mana symbols and cost parsing |
| Bulk Data | BulkDataApiJs | Bulk data export metadata |
import { CardsApiJs } from '@devmugi/scryfall-api';
const cards = new CardsApiJs();
// Search with Scryfall syntax
const creatures = await cards.search({ q: 't:creature c:red pow>=4' });
// Get card by exact name
const lotus = await cards.namedExact({ name: 'Black Lotus' });
// Get card by fuzzy name
const card = await cards.namedFuzzy({ name: 'jace mind sculptor' });
// Get random card (pass null for no filter)
const random = await cards.random(null);
// Get random card with filter
const randomCreature = await cards.random({ q: 't:creature' });
// Autocomplete card names
const suggestions = await cards.autocomplete({ q: 'lig' });
import { SetsApiJs } from '@devmugi/scryfall-api';
const sets = new SetsApiJs();
// Get all sets
const allSets = await sets.all();
// Get set by code
const khm = await sets.byCode({ code: 'khm' });
console.log(`${khm.name} - ${khm.cardCount} cards`);
This package includes TypeScript declarations (.d.mts). All card properties and API responses are fully typed.
import { CardsApiJs } from '@devmugi/scryfall-api';
const api = new CardsApiJs();
async function main(): Promise<void> {
const card = await api.random(null);
console.log(`${card.name}: ${card.oracleText ?? 'No text'}`);
}
MIT
FAQs
Kotlin Multiplatform library for Scryfall MTG API
We found that @devmugi/scryfall-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.