DEV Community

Cover image for How We Built a Headless Scraper to Sync eBay Inventory to TikTok Shop with Zero Manual Entry
Abdul Moeez
Abdul Moeez

Posted on

How We Built a Headless Scraper to Sync eBay Inventory to TikTok Shop with Zero Manual Entry

A client came to us with a simple problem that turned out to be an engineering headache. They sold hundreds of SKUs on eBay and wanted the same inventory live on TikTok Shop. No overselling, no stale listings, no one on the team copying numbers between two dashboards every morning.

The obvious fix is an API integration. Pull from eBay's API, push to TikTok Shop's API, done in a day. That's not what happened.

The problem: TikTok Shop's API wasn't built for this
TikTok Shop's public API covers order management and basic catalog operations, but it doesn't expose the level of control you need for bulk inventory sync at the SKU level, especially for sellers onboarded through certain regional flows. Rate limits and partner-access restrictions made a clean API-to-API pipeline a dead end for this specific setup.

Most agencies stop here and tell the client "it's not possible with your current setup." We didn't.

Why we went headless instead
When the official API can't do what you need, you have two choices: wait for the platform to add the feature, or interact with the platform the way a real user would; through the browser, automated. That's headless scraping.

A headless browser (we used a Playwright-driven Chromium instance) logs into the TikTok Shop seller dashboard, navigates to inventory, and updates listings the exact same way a human would, just without the human. It's slower than a direct API call, but it's reliable, and it works with the access the client actually has.

The tradeoff people worry about is fragility. UI-based automation breaks when the platform changes its layout. We handled that with a few deliberate design choices:

Selector strategy built for resilience. We targeted stable data attributes over CSS classes wherever TikTok Shop exposed them, so minor style updates don't break the flow.
A queue, not a loop. Instead of hammering through hundreds of SKUs in one pass, updates go through a job queue with retry logic. If one listing fails, it doesn't take the batch down with it.
Change detection before every sync. The scraper diffs current eBay stock against the last known TikTok Shop state and only touches listings that actually changed. Hundreds of SKUs, but usually a handful of real updates per run.
Monitoring on the scraper itself. If TikTok Shop changes something structural, we get an alert before the client notices a stale listing, not after.

Everything runs on a schedule, with manual trigger available for urgent restocks. No one on the client's team touches either dashboard anymore.

The result
Zero manual entry across hundreds of SKUs, fully automated sync, and no more overselling from stale listings. What used to eat hours every week now runs in the background.

When headless beats API-first
This isn't a "scrape everything" argument. If a clean, well-documented API exists, use it; it's faster and more stable. But when the platform you're integrating with doesn't give you the access level you need, headless automation is often the only real option between "manual forever" and "wait for the platform to fix it."

The skill isn't knowing how to drive a headless browser. It's building it so it doesn't fall over the first time the platform changes something, which is exactly where most DIY scraper attempts fail.

If you're stuck syncing data between platforms that don't play nice with each other, this is the kind of problem we solve regularly. Book a free strategy call and we'll tell you honestly whether it needs a scraper, an API, or something else entirely.

Read the full case study on this project here.

Top comments (0)