> ## 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.

# Geolocation news

> Get news for a specific location.



## OpenAPI

````yaml /openapi/google-news-api-2024-01-01.json get /geolocation
openapi: 3.0.3
info:
  title: Google News API
  version: '2024-01-01'
  description: >-
    API for fetching news from Google News with clustering, topics, and
    frontpage support. This is version `2024-01-01` which uses a camelCase
    response envelope with `success`, `totalHits`, `size`, `pageSize`, `page`,
    `totalPages`, and `articles` fields.
servers:
  - url: https://api.bonai.io/google-news
    description: Production
security: []
paths:
  /geolocation:
    get:
      summary: Geolocation news
      description: Get news for a specific location.
      operationId: getGeolocation
      parameters:
        - $ref: '#/components/parameters/ApiVersionHeader'
        - name: location
          in: query
          required: true
          schema:
            type: string
          description: Location
        - name: country
          in: query
          schema:
            type: string
            default: US
          description: Country code
        - name: language
          in: query
          schema:
            type: string
            default: en
          description: Language code
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacySearchResponse'
        '400':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorResponse'
        '401':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorResponse'
      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:
    LegacySearchResponse:
      type: object
      required:
        - success
        - totalHits
        - size
        - pageSize
        - page
        - totalPages
        - articles
      properties:
        success:
          type: boolean
          example: true
        totalHits:
          type: integer
          description: Total number of matching items
        size:
          type: integer
          description: Number of results in this page
        pageSize:
          type: integer
          description: Maximum items per page
        page:
          type: integer
          description: Current page number
        totalPages:
          type: integer
          description: Total number of pages
        articles:
          type: array
          items:
            $ref: '#/components/schemas/LegacyArticle'
    LegacyErrorResponse:
      type: object
      required:
        - success
        - code
        - message
      properties:
        success:
          type: boolean
          example: false
        code:
          type: number
          description: HTTP status code
        message:
          type: string
        fields:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              type:
                type: string
              description:
                type: string
    LegacyArticle:
      type: object
      properties:
        title:
          type: string
        url:
          type: string
        date:
          type: string
          format: date-time
        thumbnail:
          type: string
          nullable: true
        description:
          type: string
        authors:
          type: array
          items:
            type: string
        source:
          type: object
          properties:
            name:
              type: string
            url:
              type: string
            favicon:
              type: string
            publication_id:
              type: string
              nullable: true
        keywords:
          type: array
          items:
            type: string
  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.