Scrape business contact details from eBay Kleinanzeigen ads in Germany. Extract phone numbers, emails, websites, and addresses from all categories. DSGVO-compliant data collection for B2B prospecting, sales outreach and lead generation. Export to Excel, CSV, JSON. Perfect for German market research.
Doubled crawler concurrency from 2 → 4 to keep two detail pages running in parallel while still staying within Playwright’s safe limits (src/main.js).
Expanded the keyword filter with stemming + synonym dictionaries (webdesigner/webdesign/homepage/website/etc.) so relevant listings are no longer discarded as “mismatch” (src/search.js).
Documentation now mentions the synonym-aware filter for transparency (README.md).
Result
Runs that previously spent minutes visiting and discarding every detail page now complete significantly faster, while still skipping obviously irrelevant ads.
Added dedicated location resolver that calls Kleinanzeigen’s /s-ort-empfehlungen.json endpoint, builds canonical URLs (k0cXXlXXXXrXX) and shares keyword tokens with the router (src/search.js, src/main.js).
Keyword-based filtering now runs before saving dataset items to discard irrelevant ads (src/routes.js).
Unified logging without emojis, ensuring the “Scanning ad grid” message and the rest of the telemetry render in green where expected (src/main.js, src/routes.js).
Added resilient description extraction with multiple selectors, a structured attribute fallback, and a stored definition field so the Apify Output table always shows long-form copy (src/routes.js).
Documentation synced with the new inputs/features and stripped of decorative icons (README.md, CHANGELOG.md).
Fixes
Ensured GDPR banner handling logs stay readable and security check errors no longer crash runs with confusing emoji output.
Added fallback text sources so the description column in Apify’s Output tab is filled even when Kleinanzeigen renders “Definition” sections instead of a classic description.
Better Phone Detection: Supports all German formats (+49, 0049, 0, with various separators)
Page-wide Search: Now searches entire page, not just description
Validation & Deduplication: Automatic cleaning and validation of contacts
Multiple Contacts: New fields allEmails and allPhones for multiple contacts
Better Logging: Shows tick marks for email/phone detection
File modified:src/routes.js:124-205
3. Testing Infrastructure
New test file:test-local.js - comprehensive testing for search logic and contact extraction
Test configuration:.apify/input.json for local testing
Run tests with: node test-local.js
Test Results
7/7 search URL building scenarios
7/7 contact extraction scenarios
100% backwards compatible with existing inputs
Technical Changes
Modified Files:
src/main.js - Complete rewrite of buildSearchUrl() function
src/routes.js - Enhanced contact extraction with validation
README.md - Updated documentation with new features
New Files:
test-local.js - Test suite for search and extraction logic
.apify/input.json - Local testing configuration
Benefits
More flexible: Users can write natural queries in any word order
Better contact detection: Finds more emails and phones across entire page
Cleaner data: Automatic validation and deduplication
Easier testing: Local test script for rapid debugging
v3.8.X – Final Optimizations & Advanced Evasion
Adaptive Navigation Strategy: Replaced static waits with a dynamic, two-step process (domcontentloaded + waitForSelector) to robustly handle JS-rendered content and prevent timeouts.
Aggressive Session Rotation: Session pool now retires sessions after a single network failure (maxErrorScore: 1), improving resilience against faulty proxies.
Persistent Cookie Management: GDPR consent cookies saved after first interaction and reloaded on subsequent runs, bypassing the banner.
Human Behavior Simulation: Realistic chunk-based scrolling + randomized mouse movements for anti-bot evasion.
State Reset Functionality: New resetState input option clears saved state for clean runs.
Diagnostic Saves: Automated saving of screenshots + HTML for failed pages, enabling debugging.
Refined Logging: Professional logging format for better monitoring.