> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bonai.io/llms.txt
> Use this file to discover all available pages before exploring further.

# News topics



## OpenAPI

````yaml /openapi/google-news-api-2022-01-01.json get /topics
openapi: 3.0.3
info:
  title: Google News API
  version: '2022-01-01'
  description: >-
    API for fetching news from Google News with clustering, topics, and
    frontpage support. This is version `2022-01-01` which uses a simplified
    response envelope with `success`, `total`, and `data` fields.
servers:
  - url: https://api.bonai.io/google-news
    description: Production
security: []
paths:
  /topics:
    get:
      summary: News topics
      parameters:
        - $ref: '#/components/parameters/ApiVersionHeader'
        - name: topic_id
          in: query
          required: true
          schema:
            type: string
          description: Topic ID (e.g., TECHNOLOGY, BUSINESS or CAAq...)
        - name: subtopic_id
          in: query
          schema:
            type: string
          description: Subtopic ID (CAAq...)
        - name: country
          in: query
          schema:
            type: string
            default: US
        - name: language
          in: query
          schema:
            type: string
            default: en
      responses:
        '200':
          description: Successful topic headlines
          content:
            application/json:
              schema:
                $ref: 53f3113a-3803-409d-8fab-26680c937c16
        '400':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  parameters:
    ApiVersionHeader:
      name: api-version
      in: header
      required: false
      schema:
        type: string
        enum:
          - '2026-05-25'
          - '2024-01-01'
          - '2022-01-01'
      description: API version to consume. Defaults to the latest version (2026-05-25).
  schemas:
    ErrorResponse:
      type: object
      required:
        - metadata
        - errors
      properties:
        metadata:
          type: object
          required:
            - id
            - took_ms
            - timestamp
          properties:
            id:
              type: string
            took_ms:
              type: number
              description: Request execution time in milliseconds
            timestamp:
              type: string
              format: date-time
        errors:
          type: array
          items:
            type: object
            required:
              - code
              - message
            properties:
              code:
                type: string
                description: Machine-readable error code
                example: INVALID_PARAMETER
              message:
                type: string
              details:
                type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your Bonai API key, sent as `Authorization: Bearer <key>`. The `api-key`
        and `x-api-key` headers are also accepted.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.