---
title: "Track Grok answers"
method: POST
path: "/v1/monitor/grok"
---

# Track Grok answers

`POST /v1/monitor/grok`

## Request

- Base URL: `https://api.answerline.dev`
- URL: `https://api.answerline.dev/v1/monitor/grok`
- Auth: HTTP bearer

Get structured output from Grok for any prompt in supported regions: the answer and the sources it cites, X/Twitter posts included

## Request body

- GrokMonitorRequest
  - `prompt` string, required: Prompt submitted to Grok
  - `country` string, required: Code of the country or region used to localize the response
  - `include` object: Flags that add extra output formats to the response (optional)
    - `markdown` boolean: Add a markdown version of the response to the result
    - `html` boolean: Add an HTML version of the response to the result
    - `rawResponse` boolean: Return the answer as normalized stream events. For the engine's answer as received, use `include.rawWire`.
    - `rawWire` boolean: Return the engine's upstream answer as received in result.rawWire: the answer stream, or the provider's answer record, without the provider's billing data and account traces. Free. See https://answerline.dev/docs/output-formats#raw-wire
  - `state` string: State code for targeting below the country level (e.g., "CA"; "DC" included). Allowed only when country is "US". Served for Gemini; on a model that cannot place a state yet, a request that includes it is rejected as a validation error and is not charged.

## Response `200`

Grok monitoring result (success)

- GrokMonitorResponse
  - `success` boolean, required
  - `result` object, required: Response data from Grok
    - `text` string: Text of the answer from Grok
    - `html` string, uri: Link to the response's complete HTML.
    - `sources` object[]: Sources the response cites, with extra metadata
      - `position` number: Where the source sits in the response, as an index
      - `url` string: Link to the source
      - `label` string: Label shown for this source
      - `description` string: Text describing what the source contains
      - `preview` string: Short excerpt previewing the source
      - `searchEngineText` string: Display text shown by the search engine
      - `siteName` string: Website name
      - `metadataTitle` string: Title from the source's metadata
      - `creator` string: Content creator/author
      - `image` string, uri: URL of the source's image
      - `favicon` string, uri: URL of the site's favicon
    - `searchQueries` string[]: Searches Grok ran to collect material for the response
    - `model` string, nullable: Identifier of the model that produced the response
    - `markdown` string: Grok's answer rendered as Markdown (returned if include.markdown is set to true)
    - `rawResponse` unknown[]: Unprocessed stream from the upstream provider, recorded while the request ran. Every item is a single chunk of the engine's raw response. The format varies by engine, is not documented and can change at any time without warning; use it to debug or to read data not yet exposed by the structured fields above.
      - unknown

## Other responses

- `400`: Bad Request - the request failed validation
- `401`: Unauthorized - authentication failed
- `403`: Forbidden - missing permissions or not enough balance
- `404`: Not Found - No such route
- `409`: Conflict - the resource is in a conflicting state
- `429`: Too Many Requests - the request went over a rate limit or concurrency limit, or the service dropped the request because it was overloaded (`SERVICE_OVERLOADED`); that case returns `Retry-After` without any limit headers
- `499`: Client Closed Request - the client cancelled the request
- `500`: Internal Server Error
- `502`: Bad Gateway - an upstream service failed

---

[API](https://skmtc.dev/answerline/apis/answerline-api.md) · [All operations](https://skmtc.dev/answerline/apis/answerline-api/llms.txt) · [OpenAPI document](https://skmtc.dev/answerline/apis/answerline-api/revisions/a9dc35794662?raw)
