# Lemon8 API

> Returns public Lemon8 profiles, posts with their pictures or video, post comments and the For You feed of a region.

Category: Social & Video. Region: global. 5 endpoints at `https://api.hoshime.com/v1/lemon8/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/lemon8
## GET /v1/lemon8/profile

Profile of one Lemon8 account: bio, follower, following and post counts, and its links.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `username` | string | yes | Link name, with or without @, or profile URL (https://www.lemon8-app.com/@name). (e.g. lemon8_us) |
| `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: `avatarUrl` (string), `bio` (string), `createdAt` (string), `followerCount` (integer (int64)), `followingCount` (integer (int64)), `id` (string), `links` (string[]), `name` (string), `postCount` (integer (int64)), `url` (string), `username` (string), `verified` (boolean)

```bash
curl "https://api.hoshime.com/v1/lemon8/profile?username=lemon8_us" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/lemon8/userPosts

Posts of one Lemon8 account, most recent first, 20 per page: title, text, pictures and like count.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `username` | string | yes | Link name, with or without @, or profile URL. (e.g. lemon8_us) |
| `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), `commentCount` (integer (int64)), `createdAt` (string), `id` (string), `likeCount` (integer (int64)), `media` (Media[]), `media[].durationSeconds` (integer (int64)), `media[].height` (any), `media[].thumbnailUrl` (string), `media[].type` (string), `media[].url` (string), `media[].width` (any), `shareCount` (integer (int64)), `text` (string), `title` (string), `url` (string), `viewCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/lemon8/userPosts?username=lemon8_us" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/lemon8/post

One Lemon8 post: title, full text, author, pictures or video, and like, comment and view counts.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Post URL (https://www.lemon8-app.com/@user/<groupId>) or its bare group id. (e.g. https://www.lemon8-app.com/@lemon8_us/7618125167721710094) |
| `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), `commentCount` (integer (int64)), `createdAt` (string), `id` (string), `likeCount` (integer (int64)), `media` (Media[]), `media[].durationSeconds` (integer (int64)), `media[].height` (any), `media[].thumbnailUrl` (string), `media[].type` (string), `media[].url` (string), `media[].width` (any), `shareCount` (integer (int64)), `text` (string), `title` (string), `url` (string), `viewCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/lemon8/post?id=https%3A%2F%2Fwww.lemon8-app.com%2F%40lemon8_us%2F7618125167721710094" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/lemon8/postComments

Comments on one Lemon8 post, ten per call, oldest first, with the author, text and like count of each.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | Post URL (https://www.lemon8-app.com/@user/<groupId>) or its bare group id. (e.g. https://www.lemon8-app.com/@lemon8_us/7618125167721710094) |
| `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), `createdAt` (string), `id` (string), `likeCount` (integer (int64)), `replyCount` (integer (int64)), `text` (string)

```bash
curl "https://api.hoshime.com/v1/lemon8/postComments?id=https%3A%2F%2Fwww.lemon8-app.com%2F%40lemon8_us%2F7618125167721710094" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/lemon8/feed

Posts of the Lemon8 For You feed for one region: the first page of recommendations, with title, text and pictures.

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

| Parameter | Type | Required | Description |
|---|---|---|---|
| `region` | string | no | Region of the feed: sg, us, my, id, th, jp, ph, vn, ca, gb or au. Default sg. (one of sg, us, my, id, th, jp, ph, vn, ca, gb, au; default sg; e.g. us) |
| `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), `commentCount` (integer (int64)), `createdAt` (string), `id` (string), `likeCount` (integer (int64)), `media` (Media[]), `media[].durationSeconds` (integer (int64)), `media[].height` (any), `media[].thumbnailUrl` (string), `media[].type` (string), `media[].url` (string), `media[].width` (any), `shareCount` (integer (int64)), `text` (string), `title` (string), `url` (string), `viewCount` (integer (int64))

```bash
curl "https://api.hoshime.com/v1/lemon8/feed?region=us" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
