openai_cat.RdFetches category of content hosted by a domain using OpenAI's chat completion API. The function uses GPT models to classify domains into specified categories.
openai_cat(
domains = NULL,
api_key = NULL,
categories = NULL,
model = "gpt-4o-mini",
rate_limit = 0.5
)vector of domain names
OpenAI API key. If not provided, looks for OPENAI_API_KEY environment variable
vector of categories to classify into. If NULL, uses default web categories
OpenAI model to use (default: "gpt-4o-mini" for cost efficiency)
delay in seconds between API calls (default: 0.5)
data.frame with original list and content category of the domain