# Grid.id API

> Returns Grid.id articles: the latest list, full article text with byline and times, and keyword search results.

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

Latest articles of Grid.id, newest first.

Scope: `social:read` · Units: 1 · Cached: 10 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: `category` (string), `image` (string), `publishedAt` (string), `summary` (string), `title` (string), `url` (string)

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

## GET /v1/grid/article

One article of Grid.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 Grid.id. (e.g. https://www.grid.id/read/044428495/kronologi-wanita-tewas-bersimbah-darah-di-kos-cimahi-berawal-dari-suara-piring-pecah-hingga-korban-tergeletak-di-wc) |
| `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` (string), `content` (string), `image` (string), `publishedAt` (string), `section` (string), `summary` (string), `title` (string), `updatedAt` (string), `url` (string)

```bash
curl "https://api.hoshime.com/v1/grid/article?url=https%3A%2F%2Fwww.grid.id%2Fread%2F044428495%2Fkronologi-wanita-tewas-bersimbah-darah-di-kos-cimahi-berawal-dari-suara-piring-pecah-hingga-korban-tergeletak-di-wc" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/grid/search

Articles of Grid.id that match a keyword, one page at a time.

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

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

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

## GET /v1/grid/tag

Articles of Grid.id under one tag, such as ekonomi, as the tag's page lists them. The site gives no further pages, so one call returns that page only.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `tag` | string | yes | Tag as it appears in the tag's address, such as ekonomi. (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: `image` (string), `title` (string), `url` (string)

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