# Lemon8 Search API

> Search Lemon8 posts and users by keyword: post titles, content, authors, images and engagement, with Top and other tabs, sorting and filters.

Source: https://www.sandbase.ai/model/lemon8/app/search
API reference: https://www.sandbase.ai/model/lemon8/app/search/docs

## Facts

- Provider: Lemon8
- Type: Data API
- Endpoint: `POST https://api.sandbase.ai/v1/api/lemon8/app/search`
- Price: $0.0015 per call
- Free allowance: 100 calls per organization per UTC day, shared across eligible APIs
- Capabilities: api, lemon8
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

`POST https://api.sandbase.ai/v1/api/lemon8/app/search` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body.

| Parameter | Type | Required | Allowed values |
| --- | --- | --- | --- |
| `query` | string | yes |  |
| `filter_type` | string | no |  |
| `max_cursor` | string | no |  |
| `order_by` | string | no |  |
| `search_tab` | string | no |  |

## FAQ

### How do I use the Lemon8 Search API?

Send a POST request to https://api.sandbase.ai/v1/api/lemon8/app/search with your SandBase API key in the Authorization header (Bearer) and the parameters as a JSON body. You can also try it in the Playground on this page without writing code.

### How much does the Lemon8 Search API cost?

$0.0015 per call. Every organization gets 100 free calls per UTC day, shared across eligible SandBase APIs including this one; after that each call is billed at this price from your SandBase balance. There is no subscription.

### What parameters does the Lemon8 Search API accept?

Required: query (string). Optional: filter_type (string), max_cursor (string), order_by (string) and search_tab (string). The Parameters table and the Playground on this page list every field.

### What does the Lemon8 Search API return?

A JSON response returned in the same HTTP request (synchronous). The README on this page includes a sample response.

### Do I need a Lemon8 developer account or API key?

No. Lemon8 Search runs through SandBase, so one SandBase API key covers this endpoint and every other API and model in the catalog. You do not need to apply for Lemon8 API access separately.

## README

### Lemon8 Search API

Search Lemon8 for a keyword and get matching posts and users. Choose the tab with `search_tab` and paginate with `max_cursor`.

#### Use cases

- Research lifestyle and product trends on Lemon8.
- Find creators in a niche.
- Monitor brand mentions.

#### Request

```bash
curl -X POST "https://api.sandbase.ai/v1/api/lemon8/app/search" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "OpenAI"}'
```

#### Parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `query` | string | Yes | Search keyword |
| `order_by` | string | No | Search sort type, default is an empty string, optional values are as follows: Empty string: Relevance (default using th… |
| `max_cursor` | string | No | Pagination parameter, can be obtained from the return result of the last request. |
| `search_tab` | string | No | Search type, default is `main`, optional values are as follows: main: Display as `Top` in the APP (comprehensive search… |
| `filter_type` | string | No | Search filter type, default is an empty string, optional values are as follows: Empty string: All (default using this p… |

#### Example response

Real response for the request above, trimmed to the main fields. User names and long IDs are masked.

```json
{
  "data": {
    "has_more": true,
    "items": [
      {
        "articles": [
          {
            "group_id": "7661250232746885645",
            "article_class": "Gallery",
            "language": "en",
            "publish_time": 1783774883,
            "read_count": 16,
            "title": "ChatGPT just clocked in. 👀    OpenAI launched Cha…",
            "article_url": "https://www.lemon8-app.com/@itsdebbiedarlin/76612…",
            "author": {
              "name": "<user>"
            }
          }
        ]
      }
    ]
  }
}
```

#### Related APIs

- [Get banners of discover page](/model/lemon8/app/discover-banners): Get banners of discover page.
- [Get main content of discover page](/model/lemon8/app/discover-tab): Get main content of discover page.
- [Get Editor's Picks of discover page](/model/lemon8/app/discover-tab-information-tabs): Get Editor's Picks of discover page.
