cd ../projects

PSA-to-eBay Inventory Sync

"Scaling eBay listing volume by synchronizing PSA Vault inventory via Python and REST APIs — thousands of listings, replacing days of manual work per inventory cycle."

PSA graded card vault interface with eBay marketplace connection

1. The Problem

Strictly Sealed — the same client behind the TCG Data Platform and the Discord bot — came back with a new challenge. Due to his volume, he maintains a massive inventory in the PSA Vault: a high-security remote storage system for graded card slabs. Vaulted cards can technically be listed directly on eBay through the official PSA account, but that introduces significant friction and additional fees.

The solution was clear: move inventory to his own eBay presence. But manually creating thousands of listings from vault data is a logistical nightmare — the kind of job that takes days per inventory cycle. I was tasked with automating the entire pipeline.

2. Scraping the Vault

The first step was retrieving card metadata from the PSA Vault: certification numbers, grades, set information, and high-resolution front/back scan URLs. I built a Selenium-based scraper to handle authentication — a flow I had already refined on previous automation projects.

The PSA Vault inventory interface
The PSA Vault dashboard after a successful login.

By navigating the "card details" view, the script extracts URLs for both the front and back scans. A key sustainability feature: a local JSON state manager tracks every processed certification number. Before hitting PSA for a card, the script checks the local cache first — preventing redundant requests, keeping the pipeline efficient, and avoiding PSA's anti-bot countermeasures.

Individual PSA card detail view with front and back scans
Individual card details. The back scan URL is already present in the DOM before clicking — no extra request needed.

3. Handling PSA's Naming Inconsistencies

Automation quickly reveals the "human" messiness in data. PSA's slab labeling isn't uniform — many sets are missing or inconsistently naming the identifiers that matter for eBay SEO. A listing titled "PSA 10 Yu-Gi-Oh! Blue-Eyes White Dragon" without the correct set code is essentially invisible to buyers searching for it.

I built a fallback methodology: a dictionary of known naming quirks that the script references before generating a title. When PSA's label for a set doesn't match the expected format, the corrected code is substituted automatically — ensuring titles like "PSA 10 Yu-Gi-Oh! Blue-Eyes White Dragon PCK-001" are generated accurately every time.


{
    "2012 YU-GI-OH! CHAMPIONSHIP SERIES": "YSCW",
    "POWER OF CHAOS: KAIBA THE REVENGE": "PCK",
    "POWER OF CHAOS: JOEY THE PASSION": "PCJ",
    "JAPANESE LABYRINTH OF NIGHTMARE": "JAPANESE ULTIMATE RARE",
    "Duel Terminal Preview | Wave 2": "DTP2",
    "STORE QUALIFIER PRIZE-REPLICA": "2012",
    "2006 YU-GI-OH! COLLECTORS TIN": "CT03",
    "GX ULTIMATE BEGINNER'S PACK": "UBP1",
    "MASTER COLLECTION VOLUME 2": "MC2",
    "MASTER COLLECTION VOLUME 1": "MC1",
    "STAIRWAY TO DESTINED DUEL": "SDD",
    "TURBO PACK: BOOSTER THREE": "TU03",
    "TURBO PACK: BOOSTER SEVEN": "TU07"
}

4. eBay API Integration

With data cleaned and images ready, the final leg is the eBay Trading API. Using OAuth for secure access, the script packages each card's metadata into a listing request via a Python wrapper — title, description, category, images, price, condition — and submits it as a draft listing ready for review.

Robust try/except blocks handle the inevitable API hiccups: expired tokens, category-specific requirements, transient timeouts. A single failed card doesn't stop the batch — it logs the error and moves on, so a 500-card run doesn't grind to a halt over one bad response.

5. Result

What used to take days of manual data entry per inventory cycle now runs in minutes. The pipeline scrapes the vault, cleans the data, corrects naming quirks, and submits thousands of draft listings to eBay — all without human intervention. The client reviews the drafts, adjusts pricing where needed, and publishes.

The modularity of the system means it stays maintainable: when PSA updates their vault UI or eBay changes an API requirement, the relevant module is updated in isolation without touching the rest of the pipeline.

Need to automate a manual workflow?

Let's Talk