Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Post History

60%
+1 −0
Q&A How can I export a full Scryfall search to a CSV compatible with Moxfield collections?

I’m trying to export cards from a Scryfall search so I can import them into a Moxfield collection. I’ve tried a simple script that dumps card names: Query Scryfall + dump card names for Moxfield ...

2 answers  ·  posted 11mo ago by ShadowsRanger‭  ·  last activity 11mo ago by Alexei‭

Question python
#1: Initial revision by user avatar ShadowsRanger‭ · 2025-10-20T13:28:12Z (11 months ago)
How can I export a full Scryfall search to a CSV compatible with Moxfield collections?
I’m trying to export cards from a Scryfall search so I can import them into a Moxfield collection.

I’ve tried a simple script that dumps card names:
[Query Scryfall + dump card names for Moxfield import](https://gist.github.com/s1113950/4775caa90089ebcb01d134732235d765)
…but it only outputs card names, and Moxfield gives an error when I try to import it.

According to Moxfield’s help page, the CSV must have a header row with these columns:

```
Count,Tradelist Count,Name,Edition,Condition,Language,Foil,Tags,Last Modified,Collector Number,Alter,Proxy,Purchase Price
```

I then tried fetching Scryfall’s CSV output directly with this Python script:

```python
import requests

# Your Scryfall search query
QUERY = "f:standard f:penny usd<=1"
URL = f"https://api.scryfall.com/cards/search?q={QUERY}&format=csv"

# Fetch the CSV from Scryfall
response = requests.get(URL)
response.raise_for_status()  # raise error if request fails

# Save to a file
with open("scryfall_output.csv", "w", encoding="utf-8") as f:
    f.write(response.text)

print("Saved Scryfall CSV to scryfall_output.csv")
```

This seems to get cards by name but only includes cards starting with letters A, B, or C. The blog post about this feature: [Scryfall API CSV format](https://scryfall.com/blog/api-csv-format-now-available-for-cards-search-131) suggests it should export the full search.

My questions:

1. Do I need to handle pagination manually to get the full Scryfall search before converting it to the Moxfield CSV format?
2. Are there simpler tools, scripts, or methods for exporting a complete Scryfall search into a CSV that matches Moxfield’s required header format?

I’m looking for a reliable workflow to go from a Scryfall search query to a fully importable Moxfield collection CSV.