content_extract
Extract structured data from text content using JSON Schema. Guarantees structured output by leveraging Gemini's response schema for reliable data extraction.
Instructions
Extract structured data from content using a JSON Schema.
Uses Gemini's response_json_schema for guaranteed structured output.
Args: content: Source text to extract data from. schema: JSON Schema describing the desired output structure.
Returns: Dict matching the provided schema, or error dict on parse failure.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Text content to extract from | |
| schema | Yes | JSON Schema defining the extraction structure |