Extract Google Gemini
Query Google Gemini and receive its answer as clean, structured data — plain text, Markdown, or HTML — together with any web sources Gemini chose to cite.
Overview
This endpoint sends a prompt to Google's Gemini assistant and returns the generated answer in a machine-readable envelope. Alongside the response text, cloro surfaces the citations Gemini attached to its reply, so you can track which sources influenced the output. You can request the same answer in several representations at once, which is handy when you need raw text for analysis and rendered Markdown or HTML for display.
Gemini runs through its standard consumer interface. That means it decides on its own whether a prompt calls for fresh information, and it may run a web search and attach source citations when it judges the query benefits from up-to-date facts.
Request parameters
This endpoint accepts the shared monitoring parameters common to all AI Mode endpoints, plus the endpoint-specific fields listed below.
| Field | Type | Description |
|---|---|---|
| prompt | string | Required. The text prompt submitted to Gemini. Length must be between 1 and 10000 characters. |
| country | string | Required. A country or region code (for example US) used to localize the response. |
| include | object | Optional flags that control which additional output formats are returned. See the fields below. |
| include.markdown | boolean | When true, adds a Markdown-formatted copy of the answer to the result. |
| include.html | boolean | When true, adds an HTML-formatted copy of the answer to the result. |
| include.rawResponse | boolean | When true, includes Gemini's raw streamed response events. Defaults to false. |
Response schema
Responses carry the common envelope fields plus the Gemini-specific data under result.
| Field | Type | Description |
|---|---|---|
| success | boolean | Indicates whether the request completed successfully. |
| result | object | Container for the Gemini answer and its associated data. |
| result.text | string | The primary answer text returned by Gemini. |
| result.markdown | string | The answer rendered as Markdown. Present only when include.markdown is true. |
| result.html | string | The answer rendered as HTML. Present only when include.html is true. |
| result.sources | array | The list of sources Gemini cited, each with a position, label, URL, and short description. |
| result.citationPills | array | Compact citation references shown inline with the answer, including label, URL, domain, and position. |
| result.rawResponse | array | Gemini's raw streamed response events. Present only when include.rawResponse is true. |
Response example
{
"success": true,
"result": {
"text": "Quantum entanglement is a phenomenon where two particles remain correlated...",
"markdown": "**Quantum entanglement** is a phenomenon where two particles remain correlated...",
"html": "Quantum entanglement is a phenomenon where two particles remain correlated...
",
"sources": [
{
"position": 1,
"label": "Quantum entanglement - Wikipedia",
"url": "https://en.wikipedia.org/wiki/Quantum_entanglement",
"description": "Quantum entanglement is a physical phenomenon..."
}
],
"citationPills": [
{
"label": "Quantum entanglement — Wikipedia",
"citationPillId": 1,
"url": "https://en.wikipedia.org/wiki/Quantum_entanglement",
"domain": "en.wikipedia.org",
"description": "Quantum entanglement is a physical phenomenon...",
"position": 1
}
]
}
}
Notes
Authentication uses a bearer token supplied in the Authorization header, in the form Bearer <token>. Because Gemini may or may not perform a web search for any given prompt, the sources and citationPills arrays can be empty even on a successful request. For help, contact [email protected].