Claude Tag brings custom XML markup to Anthropic API
Anthropic released Claude Tag, a new feature that lets developers extract structured data from Claude's responses using custom XML-style markers.
Anthropic released Claude Tag this week, a feature that allows developers to wrap Claude's outputs in custom XML-style tags for easier parsing and integration. The system lets users define their own tag names and attributes, then retrieve specific sections of a response without regex or brittle string matching. Claude Tag works across all Claude models in the Anthropic API, including Claude 3.5 Sonnet and Claude 3 Opus, and is available now at no additional cost.
Developers can nest tags, combine them with tool use, and chain multiple tagged outputs in a single conversation. Anthropic positions the feature as a way to build more reliable agent workflows where downstream systems need predictable data structures. The move addresses a longstanding pain point in production AI systems: extracting clean data from natural-language responses. While OpenAI added JSON mode and function calling over the past two years, Anthropic's tag system offers a different approach that preserves conversational flow while marking up specific segments.
For practitioners running local models, the contrast is sharp. Open-weight ecosystems have long used custom stopping strings, grammar constraints, and post-processing scripts to force structure. Claude Tag brings that capability to a closed API, but without the fine-tuning control or cost transparency that local deployments offer. Developers who need both structured output and full model access will still reach for fine-tuned open weights. Anthropic has not disclosed whether tag parsing incurs additional latency or token overhead compared to standard completions.




