# Google



Google's own surfaces — news search, the autocomplete board, and any public Sheets spreadsheet, readable as data.



## Google News

The stories Google News ranks for a query — headline, publisher, and publication time — from Google's public RSS edition.

- Method: `GET`
- Path: `/v1/google/news/search`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `q` | string | required | The query to search Google News for. |
| `hl` | string | optional | Language, an ISO code. Defaults to Indonesian. |
| `gl` | string | optional | Edition country, two letters. Defaults to Indonesia. |
| `max_age` | integer (seconds) | optional | Ask for data no older than this. Clamped to the product's own floor, so it can narrow the window but never force a refresh on every call. |

**Example request**

```bash
curl https://api.diraz.ae/v1/google/news/search \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "query": "kupi",
    "language": "id",
    "region": "ID",
    "items": [
      {
        "title": "Beut NU Warong Kupi Edisi HUT Ke-81 Kemerdekaan, PCNU Aceh Barat Bahas Penguatan Nasionalisme",
        "url": "https://news.google.com/rss/articles/CBMizAFBVV95cUxOLXlIZ1REWElxZlI4RGhwQXVSZlNGd3V6WENyeDhtUGlXYTNoU3JMLUJRVTNhOXVtMTRhTmdWTS1feENrMkU5VXEtX2VKNVZDWUZ2QzI4ckRucVF6NU4tdGxaNzZYV1I3cENmVlpNaF9Xbk9ZMEg5NWp4aFdFU3JYNWpHSGhkY1B3UWtpd0IzcGgyWXlfQURVLXhJQ0pYVFJqa2t5LU5NdHVyZlJ3MVpfem5zUXYxSUotTmZabVpabFl0S0hwOWhjZHhOSTbSAcwBQVVfeXFMTi15SGdURFhJcWZSOERocEF1UmZTRnd1elhDcng4bVBpV2EzaFNyTC1CUVUzYTl1bTE0YU5nVk0tX3hDazJFOVVxLV9lSjVWQ1lGdkMyOHJEbnFRejVOLXRsWjc2WFdSN3BDZlZaTWhfV25PWTBIOTVqeGhXRVNyWDVqR0hoZGNQd1FraXdCM3BoMll5X0FEVS14SUNKWFRSamtreS1OTXR1cmZSdzFaX3puc1F2MUlKLU5mWm1aWmxZdEtIcDloY2R4Tkk2?oc=5",
        "publisher": "NU Online",
        "publisher_url": "https://islam.nu.or.id",
        "published_at": "2026-08-18T01:00:10Z"
      }
    ]
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-20T04:05:00.000Z",
    "age_seconds": 12,
    "next_update_at": "2026-08-20T04:10:00.000Z"
  }
}
```

## Google Autocomplete

The completions Google suggests under its own search box, from the public suggest endpoint — search-as-you-type without the search.

- Method: `GET`
- Path: `/v1/google/autocomplete`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `q` | string | required | The partial query to complete. |
| `hl` | string | optional | Language, an ISO code. Defaults to Indonesian. |
| `max_age` | integer (seconds) | optional | Ask for data no older than this. Clamped to the product's own floor, so it can narrow the window but never force a refresh on every call. |

**Example request**

```bash
curl https://api.diraz.ae/v1/google/autocomplete \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "query": "kupi",
    "language": "id",
    "suggestions": [
      "kuping berdenging sebelah kiri",
      "kuping berdenging sebelah kanan",
      "kupinami",
      "kuping berdenging"
    ]
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-20T04:05:00.000Z",
    "age_seconds": 12,
    "next_update_at": "2026-08-20T04:35:00.000Z"
  }
}
```

## Google Sheets

Any Google Sheet shared "anyone with the link", turned into headers plus rows from Google's own CSV export — no account or key needed.

- Method: `GET`
- Path: `/v1/google/sheets`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `id` | string | required | The spreadsheet ID from its URL — `docs.google.com/spreadsheets/d/<id>/…`. |
| `gid` | integer | optional | The sheet tab to read. `0` is the first tab. |
| `limit` | integer | optional | Rows to return, 1 to 10000. |
| `max_age` | integer (seconds) | optional | Ask for data no older than this. Clamped to the product's own floor, so it can narrow the window but never force a refresh on every call. |

**Example request**

```bash
curl https://api.diraz.ae/v1/google/sheets \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
    "sheet_id": 0,
    "headers": ["Student Name", "Gender", "Class Level", "Home State", "Major", "Extracurricular Activity"],
    "rows": [
      ["Alexandra", "Female", "4. Senior", "CA", "English", "Drama Club"],
      ["Andrew", "Male", "1. Freshman", "SD", "Math", "Lacrosse"]
    ],
    "total_rows": 30
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-20T04:05:00.000Z",
    "age_seconds": 3,
    "next_update_at": "2026-08-20T04:05:45.000Z"
  }
}
```