# VIVA API

> Returns the latest, sectioned, searched and individual articles of VIVA.co.id with text, byline and times.

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

Latest articles of VIVA, newest first.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `limit` | integer | no | Number of articles, from 1 to 100. (default 20) |
| `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), `category` (string), `id` (string), `imageUrl` (string), `publishedAt` (string), `source` (string), `summary` (string), `title` (string), `url` (string)

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

## GET /v1/viva/category

Latest articles of one section of VIVA.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `category` | string | yes | Section of the site, such as nasional or bola. (one of bisnis, bola, dunia, gaya-hidup, nasional, otomotif, religi, showbiz, sport; e.g. nasional) |
| `limit` | integer | no | Number of articles, from 1 to 100. (default 20) |
| `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), `category` (string), `id` (string), `imageUrl` (string), `publishedAt` (string), `source` (string), `summary` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/viva/category?category=nasional" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/viva/article

One article of VIVA.co.id with its text, byline and times.

Scope: `social:read` · Units: 1 · Cached: 60 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `url` | string | yes | Full address of an article of VIVA.co.id. (e.g. https://www.viva.co.id/gaya-hidup/showbiz/1941539-sindiran-pedas-sahabat-ruben-onsu-ke-massa-aksi-boikot-mahasewa-orator-nasi-bungkus) |
| `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), `content` (string), `id` (string), `imageUrl` (string), `publishedAt` (string), `section` (string), `source` (string), `summary` (string), `title` (string), `updatedAt` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/viva/article?url=https%3A%2F%2Fwww.viva.co.id%2Fgaya-hidup%2Fshowbiz%2F1941539-sindiran-pedas-sahabat-ruben-onsu-ke-massa-aksi-boikot-mahasewa-orator-nasi-bungkus" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/viva/search

Articles of VIVA.co.id that match a keyword.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `query` | string | yes | Keyword to search for. (e.g. ekonomi) |
| `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), `source` (string), `summary` (string), `title` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/viva/search?query=ekonomi" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
