> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindcase.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Lemon8 Posts API

> Lemon8 posts with title, caption, type, posted date and likes. Search by keyword or hashtag.

`POST /v1/data/lemon8/posts/run`

**Pricing:** $0.0045 per post ($4.50 per 1,000).

## Ways to call it

* **Search Keywords**: set `queries` (optional: `country`, `maxResults`)
* **Hashtags**: set `hashtags` (optional: `country`, `maxResults`)

## Request

Send the inputs under `params`. Only the keys below are accepted; any other key returns `422 invalid_params`.

**queries** `string[]`

One or more search keywords. One request reads them all.

**hashtags** `string[]`

One or more hashtags. One request reads them all.

**country** `string` (default: us)

Country to use. United States by default.

Allowed values: `us` (United States), `uk` (United Kingdom), `ca` (Canada), `au` (Australia), `nz` (New Zealand), `jp` (Japan), `th` (Thailand), `id` (Indonesia), `vn` (Vietnam), `my` (Malaysia), `sg` (Singapore), `ph` (Philippines).

**maxResults** `integer` (default: 100)

How many posts to return in total. Defaults to 100; use 0 for all.

## Example

```bash cURL theme={null}
curl -X POST "https://api.mindcase.co/v1/data/lemon8/posts/run?wait=true" \
  -H "Authorization: Bearer $MINDCASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "params": {
    "queries": [
      "skincare routine"
    ],
    "country": "us",
    "maxResults": 10
  }
}'
```

```python Python theme={null}
import os, requests

r = requests.post(
    "https://api.mindcase.co/v1/data/lemon8/posts/run",
    params={"wait": "true"},
    headers={"Authorization": f"Bearer {os.environ['MINDCASE_API_KEY']}"},
    json={"params": {
    "queries": [
        "skincare routine"
    ],
    "country": "us",
    "maxResults": 10
}},
)
job = r.json()
rows = job.get("data", [])  # if job["status"] == "running", poll /v1/jobs/{job_id}/results
```

```javascript Node.js theme={null}
const r = await fetch("https://api.mindcase.co/v1/data/lemon8/posts/run?wait=true", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MINDCASE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ params: {
  "queries": [
    "skincare routine"
  ],
  "country": "us",
  "maxResults": 10
} }),
});
const job = await r.json();
const rows = job.data ?? []; // if job.status === "running", poll /v1/jobs/{job_id}/results
```

## Response fields

Each row in `data` is one post, keyed by these fields.

| Field | Name | Type |
| - | - | - |
| `postUrl` | Post URL | url |
| `postId` | Post ID | text |
| `title` | Title | text |
| `caption` | Caption | text |
| `type` | Type | text |
| `posted` | Posted | text |
| `likes` | Likes | number |
| `comments` | Comments | number |
| `saves` | Saves | number |
| `views` | Views | number |
| `hashtags` | Hashtags | array |
| `images` | Images | array |
| `thumbnail` | Thumbnail | image |
| `videoUrl` | Video URL | url |
| `authorUsername` | Author Username | text |
| `authorName` | Author Name | text |
| `authorProfileUrl` | Author Profile URL | url |
| `authorVerified` | Author Verified | boolean |
| `authorId` | Author ID | text |
| `authorFollowers` | Author Followers | number |
| `region` | Region | text |
| `sourceQuery` | Source Query | text |

## Example response

Abridged: long text and lists are shortened.

```json theme={null}
{
  "job_id": "7f3a1c2e-0b9d-4c55-9a51-3f2e8d1b6a40",
  "agent": "lemon8/posts",
  "status": "completed",
  "row_count": 1,
  "truncated": false,
  "data": [
    {
      "authorUsername": "avacerniglia",
      "videoUrl": null,
      "images": [
        "https://p16-lemon8-cross-sign.tiktokcdn-us.com/tos-useast5-v-3931-tx/ocHHAf3wKnQQeEUA7BGMdIl4kcwbIPLAATCrof~tplv-tej9nj120t-wap-logo:QGF2YWNlcm5pZ2xpYQ==:108...",
        "https://p16-lemon8-cross-sign.tiktokcdn-us.com/tos-useast5-v-3931-tx/oIffwHdiMkAICIQQBcLeHEA33wrAPqInbAG7rl~tplv-tej9nj120t-wap-logo:QGF2YWNlcm5pZ2xpYQ==:108..."
      ],
      "authorId": "118134275572408320",
      "saves": 12551,
      "posted": "2025-05-29T13:32:37Z",
      "authorName": "Ava cerniglia",
      "authorVerified": false,
      "authorProfileUrl": "https://www.lemon8-app.com/@avacerniglia",
      "postUrl": "https://www.lemon8-app.com/@avacerniglia/7509859619695755819",
      "authorFollowers": 632,
      "likes": 11875,
      "views": 518416,
      "region": "us",
      "comments": 68,
      "sourceQuery": "search:skincare routine",
      "title": "skincare routine",
      "thumbnail": "https://p16-lemon8-cross-sign.tiktokcdn-us.com/tos-useast5-v-3931-tx/ocHHAf3wKnQQeEUA7BGMdIl4kcwbIPLAATCrof~tplv-pyavlv3z7u-shrink:0:640:q50.webp?lk3s=66c605...",
      "postId": "7509859619695755819",
      "hashtags": [
        "SkincareForBeginners",
        "GlowingSkin101"
      ],
      "caption": "✨ New to skincare? Here’s your simple step-by-step routine to glow without the guesswork 💧💫\n1️⃣ Cleanser – always start fresh\n2️⃣ Toner – optional but helpfu...",
      "type": "Gallery"
    }
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.