Files
ca-marketplace-scraper/cookies/.ruler/AGENTS.md
2026-04-21 22:05:49 -04:00

1.2 KiB

Marketplace Cookies Setup

Both Facebook Marketplace and eBay require valid session cookies to bypass bot detection and access listings.

Authenticated scrapers now read cookies only from environment variables:

  1. FACEBOOK_COOKIE
  2. EBAY_COOKIE

Facebook Marketplace

Required Cookies

  • c_user: Your Facebook user ID
  • xs: Facebook session token
  • fr: Facebook request token
  • datr: Data attribution token
  • sb: Session browser token

Setup

export FACEBOOK_COOKIE='c_user=123; xs=token; fr=request'

Use the raw Cookie header string copied from an authenticated browser session.


eBay

eBay has aggressive bot detection that blocks requests without valid session cookies.

Setup

export EBAY_COOKIE='s=VALUE; ds2=VALUE; ebay=VALUE'

Use the raw Cookie header string copied from an authenticated browser session.


Important Notes

  • Cookies must be from active browser sessions
  • Cookies expire and need periodic refresh
  • NEVER commit real cookies to version control
  • Platforms may still block automated scraping despite valid cookies

Security

Do not commit real cookie values or store them in tracked files.