# Stack Overflow Search

Search Stack Overflow's questions — the answers half of the internet's code is copy-pasted from.

- Method: `GET`
- Path: `/v1/dev/stackoverflow/search`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `q` | string | required | Words from the question's title. |
| `tag` | string | optional | Filter to a tag, like `typescript`. |
| `limit` | integer | optional | 1 to 50 questions. |
| `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/dev/stackoverflow/search \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "query": "zod",
    "total": 421,
    "has_more": true,
    "questions": [
      {
        "id": 75800000,
        "title": "How to validate a discriminated union with zod",
        "link": "https://stackoverflow.com/questions/75800000",
        "score": 12,
        "answer_count": 2,
        "is_answered": true,
        "lastActivity": "2026-08-20T09:14:00.000Z",
        "tags": ["typescript", "zod"],
        "owner": "someone"
      }
    ]
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-21T14:05:00.000Z",
    "age_seconds": 42,
    "next_update_at": "2026-08-21T15:05:00.000Z"
  }
}
```