API Docslemon8SearchSearch API
Search API
What this API is for
- Search API
GET
/openapi/api/v1/lemon8/app/fetch_searchPrice:Price unavailable · Actual charges depend on free quota and account discounts
Authentication
All API requests require a Bearer project token in the Authorization header
Authorization header
Authorization: Bearer YOUR_API_TOKENRequest parameters
- query: Search keyword
- max_cursor: Pagination parameter, can be obtained from the return result of the last request. It is empty for the first request, and the max_cursor returned by the last request is used for subsequent requests. You can judge whether there is more data by the has_more field in the return result.
- filter_type: Search filter type, default is an empty string, optional values are as follows:
- Empty string: All (default using this parameter to search)
- video: Search only video
- posts: Search only posts
- order_by: Search sort type, default is an empty string, optional values are as follows:
- Empty string: Relevance (default using this parameter to sort)
- popular: Sort by popularity
- recent: Sort from new to old
- search_tab: Search type, default is main, optional values are as follows:
- main: Display as Top in the APP (comprehensive search, default using this parameter to search)
- user: Display as Accounts in the APP (search user accounts)
- hashtag: Display as Hashtags in the APP (search hashtags)
- article: Display as Posts in the APP (search articles)
| Name | Location / type | Required | Notes | Example |
|---|---|---|---|---|
| query | query / string | Yes |
| lemon8 |
| max_cursor | query / string | No |
| |
| filter_type | query / string | No |
| |
| order_by | query / string | No |
| |
| search_tab | query / string | No |
| main |
Request examples
curl -X GET "https://api.trmesh.com/openapi/api/v1/lemon8/app/fetch_search" \ -H "Authorization: Bearer sdc_your_project_token" \ -H "Accept: application/json"
Response fields
- Search results
Common response envelope
Common fields for response status, request identifiers and data
| Field | Type | Notes | Example |
|---|---|---|---|
| code | integer |
| |
| request_id | string | null |
| |
| message | string |
| |
| message_zh | string |
| |
| support | string |
| |
| time | string |
| |
| time_stamp | integer |
| |
| time_zone | string |
| |
| docs | string | null |
| |
| cache_message | string | null |
| |
| cache_message_zh | string | null |
| |
| cache_url | string | null |
| |
| router | string |
| |
| params | unknown |
| |
| data | unknown | null |
|
Errors and limits
The docs cover not only success responses, but also auth failures, rate limits, and data-service errors
| Code | Meaning | Notes |
|---|---|---|
| 200 | Success | The request completed and returned the standard response envelope. |
| 401 | Unauthorized | The token is missing, invalid, or no longer active. |
| 429 | Rate limited | The request exceeded token, user, or plan-level throughput limits. |
| 502 | Service unavailable | The gateway could not obtain a healthy result. Retry in a moment. |
Next steps
New to the API? Read the guide or explore examples