Back to Home

API Endpoints

This page provides detailed information about each endpoint available in the RUE API, including request parameters, response formats, and example usage.

Scrape Metadata

Extracts metadata from a given URL.

Endpoint

POST /scrape_metadata

Request Parameters

  • url (required): The URL to scrape
  • fields (optional): Array of specific metadata fields to extract

Example Request

fetch('https://api.rue.ai/v1/scrape_metadata', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    url: 'https://example.com',
    fields: ['title', 'description', 'og:image']
  })
})

Example Response

{
  "success": true,
  "data": {
    "title": "Example Domain",
    "description": "This domain is for use in illustrative examples in documents.",
    "og:image": "https://example.com/image.jpg"
  }
}

Categorize Content

Analyzes and categorizes the content of a given URL.

Endpoint

POST /categorize_content

Request Parameters

  • url (required): The URL to categorize
  • custom_categories (optional): Array of custom categories to use

Example Request

fetch('https://api.rue.ai/v1/categorize_content', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    url: 'https://example.com/article',
    custom_categories: ['Technology', 'Finance', 'Health']
  })
})

Example Response

{
  "success": true,
  "data": {
    "categories": [
      {
        "name": "Technology",
        "confidence": 0.85
      },
      {
        "name": "Finance",
        "confidence": 0.32
      }
    ],
    "dominant_category": "Technology"
  }
}

Similarity Score

Calculates the similarity score between two URLs or text contents.

Endpoint

POST /similarity_score

Request Parameters

  • source (required): Source URL or text content
  • target (required): Target URL or text content to compare
  • type (optional): 'url' or 'text', defaults to 'url'

Example Request

fetch('https://api.rue.ai/v1/similarity_score', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    source: 'https://example.com/article1',
    target: 'https://example.com/article2',
    type: 'url'
  })
})

Example Response

{
  "success": true,
  "data": {
    "similarity_score": 0.78,
    "common_topics": ["AI", "Machine Learning", "Data Science"]
  }
}

WHOIS Lookup

Retrieves WHOIS information for a given domain.

Endpoint

GET /whois_lookup

Request Parameters

  • domain (required): The domain to lookup

Example Request

fetch('https://api.rue.ai/v1/whois_lookup?domain=example.com', {
  method: 'GET',
  headers: {
    'X-API-Key': 'YOUR_API_KEY'
  }
})

Example Response

{
  "success": true,
  "data": {
    "domain_name": "EXAMPLE.COM",
    "registrar": "IANA",
    "creation_date": "1995-08-14T04:00:00Z",
    "expiration_date": "2023-08-13T04:00:00Z",
    "name_servers": ["A.IANA-SERVERS.NET", "B.IANA-SERVERS.NET"]
  }
}

Adverse Media Check

Performs an adverse media check on a given entity or URL.

Endpoint

POST /adverse_media_check

Request Parameters

  • query (required): Entity name or URL to check
  • type (optional): 'entity' or 'url', defaults to 'entity'

Example Request

fetch('https://api.rue.ai/v1/adverse_media_check', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    query: 'Example Corporation',
    type: 'entity'
  })
})

Example Response

{
  "success": true,
  "data": {
    "adverse_media_found": true,
    "risk_score": 0.65,
    "sources": [
      {
        "url": "https://example-news.com/article123",
        "title": "Example Corporation Involved in Financial Scandal",
        "date": "2023-03-15",
        "summary": "Example Corporation has been implicated in a major financial scandal..."
      }
    ]
  }
}

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