ERUMESU / README.md
leave-everything's picture
Migrated from another account
643d1b5 verified
metadata
title: ERUMESU Scraper API
emoji: πŸ›οΈ
colorFrom: purple
colorTo: pink
sdk: docker
app_port: 7860
pinned: false

ERUMESU Scraper API

A FastAPI-based web scraping service for Hermes products, powered by BrightData Browser API and deployed on Hugging Face Spaces.

πŸš€ Features

  • REST API for scraping Hermes products
  • 99% success rate for product extraction (bags category)
  • BrightData Browser API integration for reliable scraping
  • API Key authentication for secure access
  • Automatic documentation with Swagger UI
  • Async processing for high performance

πŸ“‹ API Documentation

Once deployed, you can access:

  • Swagger UI: https://[your-space].hf.space/docs
  • ReDoc: https://[your-space].hf.space/redoc

πŸ”‘ Authentication

All API endpoints require an API key. Include it in your request headers:

X-API-Key: your-api-key-here

πŸ“ Endpoints

POST /api/v1/scrape

Scrape Hermes products based on search term.

Request Body:

{
  "search_term": "バッグ",
  "max_products": 200
}

Response:

{
  "success": true,
  "search_term": "バッグ",
  "total_expected": 200,
  "total_extracted": 198,
  "extraction_rate": 99.0,
  "products": [
    {
      "id": "product_001",
      "name": "Product Name",
      "price": "Β₯XXX,XXX",
      "url": "https://...",
      "image_url": "https://..."
    }
  ],
  "execution_time": 35.2,
  "timestamp": "2025-01-24T10:00:00"
}

GET /health

Health check endpoint.

πŸ”§ Environment Variables

Configure these in your Hugging Face Space settings:

  • API_KEY: Your API key for authentication
  • BRIGHTDATA_CUSTOMER_ID: BrightData customer ID
  • BRIGHTDATA_ZONE: BrightData zone name
  • BRIGHTDATA_PASSWORD: BrightData password
  • LOG_LEVEL: Logging level (default: INFO)

πŸ“Š Performance

  • Response time: ~30-40 seconds for 200 products
  • Success rate: 99% for bags category
  • Concurrent requests: Up to 3

πŸ› οΈ Technical Stack

  • FastAPI: Modern web framework
  • Playwright: Browser automation
  • BrightData: Browser API for scraping
  • Pydantic: Data validation
  • Docker: Containerization

πŸ“ License

Private project - All rights reserved

πŸ‘€ Author

Created by tomo2chin2 for ERUMESU project# Build trigger