# CNA API

> Headlines and images from the CNA home and section pages.

Category: News & Media. Region: Singapore. 2 endpoints at `https://api.hoshime.com/v1/channelnewsasia/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/channelnewsasia
## GET /v1/channelnewsasia/latest

Headlines on the home page of CNA: title, link, time, author, section and image, never the story text.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `limit` | integer | no | Items per page, 1 to 50. (default 20) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (Author), `author.avatarUrl` (string), `author.id` (string), `author.name` (string), `author.url` (string), `author.username` (string), `id` (string), `imageUrl` (string), `publishedAt` (string), `section` (string), `source` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/channelnewsasia/latest" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/channelnewsasia/section

Headlines on one section page of CNA: title, link, time, author and image, never the story text.

Scope: `social:read` · Units: 1 · Cached: 10 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `section` | string | yes | Section of the site: asia, business, singapore, world. (one of asia, business, singapore, world; e.g. asia) |
| `limit` | integer | no | Items per page, 1 to 50. (default 20) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `author` (Author), `author.avatarUrl` (string), `author.id` (string), `author.name` (string), `author.url` (string), `author.username` (string), `id` (string), `imageUrl` (string), `publishedAt` (string), `section` (string), `source` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/channelnewsasia/section?section=asia" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
