claude_cat.RdFetches category of content hosted by a domain using Anthropic's Claude API. The function uses Claude models to classify domains into specified categories.
claude_cat(
domains = NULL,
api_key = NULL,
categories = NULL,
model = "claude-3-haiku-20240307",
rate_limit = 0.5
)vector of domain names
Anthropic API key. If not provided, looks for the ANTHROPIC_API_KEY or CLAUDE_API_KEY environment variable
vector of categories to classify into. If NULL, uses default web categories
Claude model to use (default: "claude-3-haiku-20240307" for cost efficiency)
delay in seconds between API calls (default: 0.5)
data.frame with original list and content category of the domain