Back to Home

API Reference

This comprehensive API reference provides detailed information about the RUE API endpoint, request parameters, and response format.

Base URL

All API requests should be made to: http://127.0.0.1:5003/api

Authentication

All API requests require two authentication headers:

  • X-API-Key: Your API key
  • X-Secret-Key: Your secret key

Endpoint: Scrape Metadata

POST /scrape_metadata

Request Parameters

The request body should be in JSON format with the following fields:

  • input_string (required): The domain or URL to analyze
  • custom_categories (optional): Array of custom categories for content categorization
  • include_whois (optional): Boolean to include WHOIS data in the response
  • include_adverse_media (optional): Boolean to include adverse media check in the response

Example Request

curl -X POST http://127.0.0.1:5003/api/scrape_metadata \
  -H "Content-Type: application/json" \
  -H "X-API-Key: staging_api_key_12345abcde67890xyz" \
  -H "X-Secret-Key: staging_secret_key_abcd1234xyz7890qwe" \
  -d '{
    "input_string": "example.com",
    "custom_categories": ["Technology", "Finance"],
    "include_whois": true,
    "include_adverse_media": false
  }'

Example Response

{
  "ai_response": {
    "category": "Technology",
    "category_confidence_score": 0.9,
    "high_risk_similarity_score": 1.0,
    "summary": "Example Domain is a technology company that provides domain registration services and web hosting solutions. They aim to help individuals and businesses establish their online presence effectively."
  },
  "domain": "example.com",
  "metadata": {
    "description": "",
    "emails": [],
    "keywords": "",
    "phoneNumbers": [],
    "socialMediaLinks": [],
    "title": "Example Domain"
  },
  "type": "domain",
  "whois_data": {
    "creation_date": "1995-08-14 04:00:00",
    "expiration_date": "2025-08-13 04:00:00",
    "last_updated": "2024-08-14 07:01:34",
    "name_servers": [
      "A.IANA-SERVERS.NET",
      "B.IANA-SERVERS.NET"
    ],
    "registrar": "RESERVED-Internet Assigned Numbers Authority"
  }
}

Response Format

The API response is returned in JSON format. It includes the following main sections:

  • ai_response: AI-generated analysis including category, confidence scores, and summary
  • domain: The analyzed domain
  • metadata: Extracted metadata from the domain
  • type: The type of input (e.g., "domain")
  • whois_data: WHOIS information (if requested)

For more information on how to use this API effectively, please refer to our Examples page. If you encounter any issues, check our Error Handling guide.