Back to Home
API Usage Examples
This page provides practical examples of how to use the RUE API in various scenarios. These examples will help you understand how to integrate our API into your applications effectively.
1. Basic Metadata Scraping
This example demonstrates how to scrape basic metadata from a website.
curl -X POST http://127.0.0.1:5003/api/scrape_metadata \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key_here" \
-H "X-Secret-Key: your_secret_key_here" \
-d '{
"input_string": "example.com"
}'
2. Content Categorization with Custom Categories
This example shows how to categorize content using custom categories.
curl -X POST http://127.0.0.1:5003/api/scrape_metadata \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key_here" \
-H "X-Secret-Key: your_secret_key_here" \
-d '{
"input_string": "example.com",
"custom_categories": ["Technology", "Finance", "Health"]
}'
3. Including WHOIS Data
This example demonstrates how to include WHOIS data in the API response.
curl -X POST http://127.0.0.1:5003/api/scrape_metadata \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key_here" \
-H "X-Secret-Key: your_secret_key_here" \
-d '{
"input_string": "example.com",
"include_whois": true
}'
4. Full Feature Request
This example shows how to use all available features in a single request.
curl -X POST http://127.0.0.1:5003/api/scrape_metadata \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key_here" \
-H "X-Secret-Key: your_secret_key_here" \
-d '{
"input_string": "example.com",
"custom_categories": ["Technology", "Finance"],
"include_whois": true,
"include_adverse_media": true
}'
These examples should help you get started with the RUE API. For more detailed information about the API endpoint and response format, please refer to our API Reference. If you encounter any issues, check our Error Handling guide.