Skip to main content
POST
Ask Google AI Mode a question and get its answer with the sources it cites
  • Endpoint: google.aiMode
  • Returns: data has prompt, answer, sources.
  • Cost: 2 credits per call. Failed calls cost nothing.
  • Paging: No.
Returns Google’s AI Mode answer as text, with the pages it cites in sources.

Example

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
prompt
string
required

The question to ask, worded the way a person would ask it.

Required string length: 1 - 2000
country
string

ISO 3166-1 alpha-2 country code, e.g. us. Any case is accepted.

Pattern: ^[A-Za-z]{2}$
language
string

Two-letter language code like en or pt. Any case is accepted.

Pattern: ^[A-Za-z]{2}$

Response

The data, and the credits this call used.

success
any
required
data
object
required
creditsUsed
integer
required
requestId
string
required