# Rednote Xiaohongshu Search | Keywords, Country & Dates (`lofomachines/rednote-keyword-post-search`) Actor

Discover public Rednote (Xiaohongshu / 小红书) notes and videos by bulk keywords, country and dates. Export text, authors, dates, images and available likes, comments, saves and shares to Excel, CSV or JSON.

- **URL**: https://apify.com/lofomachines/rednote-keyword-post-search.md
- **Developed by:** [Lofomachines](https://apify.com/lofomachines) (community)
- **Categories:** Social media
- **Features:** Limited permissions, Multi-tenant, Server interface
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.39 / 1,000 post saveds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Rednote Xiaohongshu Search Scraper

Discover what people share on **Rednote / Xiaohongshu (小红书)** and turn public notes and videos into a spreadsheet. Research Chinese consumer trends, product mentions, travel ideas, beauty routines and creator conversations with bulk keyword search.

Enter up to **100 keywords**, choose a **search country**, select **dates within the last 12 months**, and set a **maximum for each keyword**. Export post links, Chinese text, authors, dates, images and available likes, comments, saves and shares to Excel, CSV or JSON.

### Start in a few clicks

1. Enter one topic, brand or phrase per line. Try `咖啡` (coffee), `护肤` (skincare) or `旅行攻略` (travel tips).
2. Select your search country, or Worldwide for a broader search.
3. Optionally choose the first and last dates in the calendars.
4. Choose **Maximum posts per keyword**. Start with 10 to preview your topics.
5. Click **Start**, then open **Output → Rednote posts** to review and download the results.

No Rednote account or cookies are required. Chinese and other languages are supported; Chinese phrases are a useful starting point for Chinese content. The country prioritizes the search market and relevance. It does not establish where an author lives or where a post was created.

### Keep your results focused

Each saved result must match your keyword in the note’s own title, text or hashtags. For entries with spaces, every word must appear; Chinese phrases are matched as entered. Mentions found only in comments or related posts do not qualify. This helps remove unrelated results, but synonyms and mentions visible only inside images may be missed.

The Actor makes bounded recovery attempts for unavailable post details and reuses data when the same note matches several keywords. Missing exact counts remain empty.

### Turn public conversations into useful research

| Use case | What to search |
| --- | --- |
| Product and brand research | Brand names, product names and Chinese product categories. |
| Beauty and skincare trends | Ingredients, routines, cosmetics and skincare phrases. |
| Travel inspiration | Destinations, city guides, hotels and travel tips. |
| Food and lifestyle research | Coffee, restaurants, recipes and everyday interests. |
| Creator discovery | Niche topics, then review the author links and original notes. |
| Campaign and event research | Campaign phrases or event names within a date range. |
| Market comparison | Repeat the same phrases with different search countries. |

### Fast searches and broader coverage

**Fast** is the default. It prioritizes productive searches, skips exhausted pages and stops expanding queries that add few new results. When dates are selected, broad searches and daily searches run together. Fast samples the period rather than checking every day. Its search budget is about four minutes, allowing an initial opportunity for every keyword and time for requests already running to finish. Large inputs and temporary service delays can take longer.

**Exhaustive** provides broader, adaptive coverage. It checks date windows distributed across the selected period, opens more pages, and explores productive windows in greater detail. Empty pages stop immediately; repeated pages stop when they no longer add new posts. Unproductive windows do not trigger a day-by-day sweep. It stops at your per-keyword limit or when the remaining searches stop producing new matches.

Exhaustive does not check every day individually. Skipping a window means the checks did not add new posts, not that no posts exist there. Short date ranges receive daily checks; longer ranges combine wider windows with selected days. This keeps searches economical while allowing posts from older parts of the period to be found.

Posts are processed concurrently, repeated links are merged, and saved progress supports continuation after an interruption. Results depend on publicly discoverable content. Neither mode guarantees every Rednote post or that your maximum will be reached.

### Input options

| Option | What it means |
| --- | --- |
| Keywords or phrases | 1–100 phrases, one per line. Duplicate phrases are merged. |
| Search country | Select a market or Worldwide. |
| Published on or after | First UTC day to include; leave empty to start 12 months ago. |
| Published on or before | Last UTC day to include; leave empty to include today. |
| Maximum posts per keyword | 1–3,000; the default is 50. |
| Search mode | Fast for an economical sample; Exhaustive for broader coverage. |

Both selected days are included. Choose the same date in both calendars to search one day. The eligible window runs from the same calendar date 12 months ago through today. The native calendar may display earlier or future dates; the Actor checks the rolling limit before collection and rejects invalid selections.

With both calendars empty, results still belong to the last 12 months, but separate daily searches are not scheduled.

#### Example input

```json
{
  "keywords": ["咖啡", "护肤", "旅行攻略"],
  "country": "CN",
  "maxPostsPerQuery": 25,
  "searchMode": "fast"
}
```

For a date range, use the calendars or add `newerThan` and `olderThan` as `YYYY-MM-DD` values within the last 12 months.

### What you receive

| Field | Meaning |
| --- | --- |
| `keyword`, `country` | Search phrase and market. |
| `url`, `postId` | Public post link and unique note ID. |
| `postType` | `photo`, `video`, or `note` when the format is unavailable. |
| `title`, `text` | Available title and note text, preserving the original language. |
| `authorName`, `authorUrl` | Available creator display name and profile link. |
| `publishedAt`, `dateSource` | UTC timestamp and its origin. |
| `imageUrl` | Available cover or preview image link. |
| `likeCount`, `commentCount`, `saveCount`, `shareCount` | Exact public engagement totals when exposed. |
| `hashtags`, `scrapedAt` | Available hashtags and the UTC collection time. |

**Dates:** `dateSource: post` means the timestamp came from the note itself. `dateSource: noteId` means the creation time was derived from its ID; it may differ from the publication time. The available timestamp is used for date filtering, and every exported row must fall within the eligible period.

**Missing values:** a blank count means unavailable. A visible exact zero is saved as `0`. Abbreviated totals are left empty rather than presented as exact counts. Some pages expose only a public preview, so the text may be shortened and author or engagement fields may be empty. Image links can expire.

#### Example output

This is an illustrative row, not a verified real post.

```json
{
  "keyword": "咖啡",
  "country": "CN",
  "url": "https://www.rednote.com/discovery/item/6a254b630000000013020400",
  "postId": "6a254b630000000013020400",
  "postType": "photo",
  "title": "今天的咖啡日记",
  "text": "周末咖啡探店 #咖啡 #探店",
  "authorName": "示例作者",
  "authorUrl": "https://www.rednote.com/user/profile/605e5cf7000000000101f064",
  "publishedAt": "2026-06-07T10:43:47.000Z",
  "dateSource": "post",
  "imageUrl": "https://example.org/preview.jpg",
  "likeCount": 185,
  "commentCount": 24,
  "saveCount": 32,
  "shareCount": 11,
  "hashtags": ["#咖啡", "#探店"],
  "scrapedAt": "2026-11-14T10:00:00.000Z"
}
```

A post matching two phrases appears once for each keyword. Use `postId` to count distinct posts across the dataset. The **Posts**, **Engagement** and **All fields** views make results easy to review before exporting.

### Frequently asked questions

#### Is Rednote the same platform as Xiaohongshu?

This Actor finds public notes on Rednote / Xiaohongshu, also known as 小红书. It recognizes desktop and mobile links on both domains and merges links to the same note.

#### Can I search in Chinese?

Yes. Enter simplified Chinese, traditional Chinese or another language. The Actor preserves available original text and does not translate your keywords or posts.

#### Does it download videos or collect individual comments?

It exports post metadata, available engagement totals and links. Open the original post to view the media or discussion. Comment text and media files are outside this Actor's output.

#### Why are some results or fields missing?

Availability varies by post and region. Posts may require login, disappear or expose limited public data. Try a different phrase or Exhaustive mode for broader discovery. Keyword matching is checked again after the post is opened. Your limit is a maximum, not a promised number of results.

#### Where can I see search coverage?

Open **Run summary** for per-keyword totals, searches completed, days checked, date and keyword-relevance exclusions and stopping reasons. Adaptive Exhaustive also reports date windows checked and days not checked individually. `diminishingReturns` means additional checks stopped finding new posts; it does not mean every day was searched. `limitReached` means the requested cap was met. `partial` means unresolved work remains; saved rows are still available.

#### How do I keep runs economical?

Start with Fast and 10 posts per keyword. Inspect your sample before increasing the limit. Use Exhaustive when broader coverage justifies more requests. Apify shows actual usage for each run; execution costs depend on your input and public availability.

[Discover more LofoMachines Actors for social research and data collection](https://apify.com/lofomachines)

### 简体中文

**按关键词、国家和日期批量搜索小红书 / Rednote 公开笔记与视频。** 每行输入一个关键词，最多100个；选择搜索市场，并设置每个关键词的结果上限。可查询最近12个月的内容，导出为 Excel、CSV 或 JSON。

默认 **Fast** 模式优先快速、节省资源地收集样本；**Exhaustive** 模式扩大搜索范围，可能需要更多时间和费用。结果包含链接、标题、正文、作者、日期、图片以及可获取的点赞、评论、收藏和分享总数。无需输入账号或 Cookie。

每条结果的标题、正文或话题标签必须包含搜索词。仅在评论或相关推荐中出现的词不算匹配；图片内文字和同义词可能被遗漏。

国家选项影响搜索市场，不代表作者所在地。空值表示数据不可获取；`dateSource: noteId` 表示日期来自笔记标识中的创建时间，可能与发布时间不同。公开内容的覆盖率和数据完整度因笔记而异。

[探索更多 LofoMachines Actors](https://apify.com/lofomachines)

Exhaustive 会在所选时间段内检查多个日期窗口，重点探索仍能找到新笔记的窗口；空页面会立即停止，不再增加新笔记的分页也会停止。长时间段不会逐日全部检查。

### Italiano

**Cerca note e video pubblici di Rednote / Xiaohongshu per keyword, paese e data.** Inserisci fino a 100 frasi, anche in cinese, scegli il mercato e il massimo di risultati per ogni query. Puoi cercare negli ultimi 12 mesi ed esportare in Excel, CSV o JSON.

**Fast** privilegia rapidità e consumi contenuti; **Exhaustive** amplia la copertura e può richiedere più tempo. Ottieni testi, autori, date, immagini e contatori disponibili di like, commenti, salvataggi e condivisioni. I dati mancanti restano vuoti. `dateSource: noteId` indica il momento di creazione ricavato dall'ID, che può differire dalla pubblicazione. Il paese influenza il mercato di ricerca e non certifica la posizione dell'autore.

Ogni risultato deve contenere la keyword nel titolo, nel testo o negli hashtag del post. Le citazioni presenti solo nei commenti o nei contenuti correlati vengono escluse; sinonimi e testo nelle immagini possono sfuggire.

[Scopri gli altri Actor LofoMachines](https://apify.com/lofomachines)

Exhaustive distribuisce i controlli sull’intero periodo e approfondisce le finestre produttive. Salta le pagine vuote e interrompe quelle che non aggiungono post nuovi, senza controllare singolarmente ogni giorno degli intervalli lunghi.

### Español

**Busca notas y vídeos públicos de Rednote / Xiaohongshu por palabra clave, país y fecha.** Introduce hasta 100 frases, elige el mercado y fija un máximo por consulta. Explora los últimos 12 meses y exporta a Excel, CSV o JSON.

**Fast** prioriza rapidez y ahorro; **Exhaustive** amplía la cobertura. Recibe enlaces, textos, autores y contadores públicos disponibles. Los valores vacíos indican datos no disponibles. `dateSource: noteId` identifica una fecha de creación derivada del ID, que puede diferir de la publicación.

La palabra clave debe aparecer en el título, texto o hashtags de la publicación. Las menciones solo en comentarios o contenidos relacionados se excluyen; los sinónimos y el texto en imágenes pueden no detectarse.

[Descubre más Actors de LofoMachines](https://apify.com/lofomachines)

Exhaustive distribuye las comprobaciones por todo el período y profundiza en las ventanas productivas. Omite páginas vacías y detiene las que ya no añaden publicaciones nuevas; no revisa individualmente cada día de los períodos largos.

### Français

**Recherchez des notes et vidéos Rednote / Xiaohongshu publiques par mot-clé, pays et date.** Saisissez jusqu'à 100 expressions, choisissez le marché et le maximum par recherche. Explorez les 12 derniers mois et exportez vers Excel, CSV ou JSON.

**Fast** privilégie la rapidité et l'économie; **Exhaustive** élargit la couverture. Les textes, auteurs et compteurs dépendent de leur disponibilité publique. `dateSource: noteId` indique une date de création déduite de l'identifiant, pouvant différer de la publication.

Le mot-clé doit apparaître dans le titre, le texte ou les hashtags de la publication. Les mentions limitées aux commentaires ou contenus associés sont exclues; les synonymes et le texte dans les images peuvent être manqués.

[Découvrez les autres Actors LofoMachines](https://apify.com/lofomachines)

Exhaustive répartit les vérifications sur toute la période et approfondit les fenêtres productives. Les pages vides ou sans nouvelles publications sont arrêtées; chaque jour des longues périodes n’est pas vérifié individuellement.

### Deutsch

**Öffentliche Rednote / Xiaohongshu-Notizen und Videos nach Suchbegriff, Land und Datum finden.** Bis zu 100 Begriffe eingeben, Suchmarkt wählen und Ergebnisse pro Begriff begrenzen. Der Zeitraum umfasst die letzten 12 Monate.

Exportieren Sie Texte, Autoren und verfügbare Interaktionen nach Excel, CSV oder JSON. **Fast** liefert eine schnelle, sparsame Stichprobe; **Exhaustive** erweitert die Suche. `dateSource: noteId` kennzeichnet einen aus der ID abgeleiteten Erstellungszeitpunkt, der vom Veröffentlichungszeitpunkt abweichen kann.

Der Suchbegriff muss im Titel, Text oder in den Hashtags des Beitrags vorkommen. Erwähnungen nur in Kommentaren oder verwandten Beiträgen werden ausgeschlossen; Synonyme und Text in Bildern können fehlen.

[Weitere LofoMachines Actors entdecken](https://apify.com/lofomachines)

Exhaustive verteilt Prüfungen über den gesamten Zeitraum und vertieft ergiebige Zeitfenster. Leere Seiten und Seiten ohne neue Beiträge werden nicht weiterverfolgt; bei langen Zeiträumen wird nicht jeder Tag einzeln geprüft.

### Português

**Encontre notas e vídeos públicos do Rednote / Xiaohongshu por palavra-chave, país e data.** Insira até 100 expressões, escolha o mercado e defina o máximo por consulta. Pesquise os últimos 12 meses e exporte para Excel, CSV ou JSON.

Use **Fast** para uma amostra rápida e econômica ou **Exhaustive** para ampliar a cobertura. Os resultados incluem textos, autores e contadores disponíveis. Campos vazios indicam dados indisponíveis. `dateSource: noteId` indica uma data de criação derivada do identificador, que pode diferir da publicação.

A palavra-chave deve aparecer no título, texto ou hashtags da publicação. Menções apenas em comentários ou conteúdos relacionados são excluídas; sinônimos e texto em imagens podem não ser detectados.

[Conheça outros Actors LofoMachines](https://apify.com/lofomachines)

Exhaustive distribui as verificações por todo o período e aprofunda as janelas produtivas. Páginas vazias ou sem novas publicações deixam de ser exploradas; períodos longos não são verificados dia a dia.

### Search API: connect your workflow

Use **Input** for a saved, exportable dataset, or **Server → POST /search → Try it out** for an immediate JSON response in your app or automation. Both interfaces accept the same keywords, country, dates and maximum of **3,000 posts per keyword**. Batch remains the best choice for large collections and longer Exhaustive searches.

The server supports both **single-tenant** and **multi-tenant** operation. Apify activates one tenancy at a time in **Settings → Server**. Each request is isolated: its results are returned only in its response and are not written to a shared dataset. See the Pricing tab for current charges before starting a search.

**Example request — POST /search**

```json
{"keywords":["咖啡"],"country":"CN","maxPostsPerQuery":3,"searchMode":"fast"}
```

Copy the server URL from the **Server** tab. Authenticate with `Authorization: Bearer <APIFY_TOKEN>` in your HTTP client. The interactive Server form handles authentication for you. `GET /health` checks readiness; `GET /openapi.json` describes the API.

**Example response — illustrative excerpt**

```json
{"requestId":"example","status":"completed","partialReason":null,"items":[{"keyword":"咖啡","country":"CN","postType":"image","title":"咖啡日常"}],"summary":{"totalPosts":1,"maxPostsPerQuery":3},"nextStep":null}
```

Each HTTP request collects for up to **220 seconds**, allows up to 100 keywords and accepts the full 1–3,000 per-keyword cap. The cap is a maximum, not a promised result count. Responses are limited to 16 MiB; the request body limit is 256 KiB. A time or size cutoff returns the collected items with `status: "partial"`, a reason and per-keyword counts. Missing public metadata stays empty. For a complete longer attempt, use the same input in the **Input** tab; server responses are not resumable batch checkpoints.

An empty successful search returns HTTP 200 with no items. Invalid input returns 400; missing server authentication returns 401; excessive body size returns 413; unsupported content type returns 415. A busy server returns 429 with `Retry-After`. A failed search with no results returns 503; available partial results remain explicit in the response. Disconnecting cancels the request's work.

#### API: Italiano

Apri **Server → POST /search → Try it out** per ricevere i post direttamente in JSON, con le stesse keyword, paese, date e massimo di 3.000 post per keyword. Le richieste sono isolate e non salvano i risultati in un dataset condiviso. Sono supportati single-tenant e multi-tenant, con una tenancy attiva alla volta. Dopo 220 secondi o al limite della risposta, `partial` segnala i risultati parziali; per raccolte lunghe usa **Input** e il dataset esportabile.

#### API: Español

Abre **Server → POST /search** para recibir JSON con las mismas palabras clave, país, fechas y hasta 3.000 publicaciones por palabra clave. Las solicitudes están aisladas, sin dataset compartido. Admite single-tenant y multi-tenant, uno activo a la vez. Cada solicitud tiene 220 segundos; `partial` indica una colección incompleta. Usa **Input** para trabajos largos.

#### API: Français

Ouvrez **Server → POST /search** pour recevoir du JSON avec les mêmes mots-clés, pays, dates et une limite de 3 000 publications par mot-clé. Les requêtes sont isolées, sans dataset partagé. Les modes single-tenant et multi-tenant sont pris en charge, un seul étant actif à la fois. Après 220 secondes, `partial` signale une collecte incomplète. Utilisez **Input** pour les collectes longues.

#### API: Deutsch

Über **Server → POST /search** erhalten Sie JSON mit denselben Suchbegriffen, Ländern, Datumsfiltern und bis zu 3.000 Beiträgen pro Suchbegriff. Anfragen sind voneinander getrennt; Ergebnisse werden nicht in einem gemeinsamen Dataset gespeichert. Single-Tenant und Multi-Tenant werden unterstützt, jeweils einer aktiv. Das Zeitbudget beträgt 220 Sekunden; `partial` kennzeichnet unvollständige Ergebnisse. Für längere Suchen verwenden Sie **Input**.

#### API: Português

Use **Server → POST /search** para receber JSON com as mesmas palavras-chave, país, datas e até 3.000 publicações por palavra-chave. As solicitações são isoladas, sem dataset compartilhado. Há suporte a single-tenant e multi-tenant, com um ativo por vez. O limite é de 220 segundos; `partial` indica resultados incompletos. Use **Input** para coletas longas.

[Discover more LofoMachines Actors](https://apify.com/lofomachines)

#### API：简体中文

打开 **Server → POST /search**，使用与批量模式相同的关键词、国家、日期和每个关键词最多 3,000 条笔记的设置，直接获取 JSON。每个请求独立处理，不会将结果写入共享数据集。支持单租户和多租户，每次仅启用一种。采集时间最多 220 秒；未完成的结果会标记为 `partial`。较大的采集任务请使用 **Input** 批量模式。价格以 **Pricing** 页面为准。

### Clear pricing for bulk searches and API workflows

Post rows have the same plan-based rate in batch and server responses. Higher Apify plans receive automatic discounts; Platinum and Diamond use the Gold rates. The result cap is not a prepaid package: post charges apply only to rows actually delivered. A post matching two keywords can appear and be charged once under each keyword.

| Charge | Free | Starter / Bronze | Scale / Silver | Business / Gold |
|---|---:|---:|---:|---:|
| 1,000 post rows | $2.19 | $1.79 | $1.59 | $1.39 |
| Each accepted keyword | $0.001 | $0.001 | $0.0009 | $0.0008 |
| Each processing block | $0.003 | $0.003 | $0.0026 | $0.0023 |
| Each API search request (server only) | $0.004 | $0.004 | $0.0035 | $0.003 |

A **processing block** is up to 60 seconds of active collection at 512 MB, 30 seconds at 1 GB, 15 seconds at 2 GB or 7.5 seconds at 4 GB. Each started block is charged in advance, including the first block. Longer searches use more blocks. Each server request has its own processing blocks; idle server time does not create processing events.

Batch runs and single-tenant server runs also have the standard **Actor start** charge of $0.00005 per GB of allocated memory, minimum one event. Multi-tenant API users pay the API request charge instead of an Actor start charge for a shared run. Keyword and processing charges apply even when no matching posts are found. Invalid server input, readiness checks and the API schema do not trigger custom event charges.

**Example at the Starter rate:** a batch delivering 1,000 post rows from 10 accepted keywords and using 2 processing blocks costs the post price above + $0.01 for keywords + $0.006 for processing, plus Actor start. The equivalent API request adds $0.004 for the request. This example counts work units, not a promise about the time or result count of your search.

Platform usage is included for batch and multi-tenant API searches. Apify always adds infrastructure usage separately for **single-tenant servers**. Use the **maximum cost** setting for batch runs. For API requests, optionally set the `X-Search-Max-Charge-Usd` header (default $10). The API conservatively checks that budget using the highest plan rate; discounts can make the actual charge lower. A budget stop returns available paid rows with `partialReason: "spendingLimit"`; a starting budget that cannot cover setup and one potential post returns HTTP 402. The remaining post budget also limits collection work before pages are opened.

Partial searches charge only delivered rows plus the accepted keywords and started processing blocks. A disconnected API request stops collecting; accepted-work charges may already apply. Post charges are recorded immediately before the response is sent. If disconnection is detected before that step, no post charge is added; a connection failure during delivery may leave an already recorded charge. Batch checkpoint continuation does not charge its submitted keywords again. See the live **Pricing** tab for the active prices.

**Italiano:** prezzi per post con sconti automatici in base al piano; si aggiungono keyword accettate e blocchi di elaborazione, anche per ricerche vuote. Le chiamate server hanno una piccola tariffa per richiesta. Il prezzo totale dipende dai risultati e dal lavoro svolto: consulta la tabella e imposta un budget.

**Español:** descuentos automáticos por plan. Además de las publicaciones entregadas, se cobran las palabras clave aceptadas y los bloques de procesamiento, incluso sin resultados; la API añade una tarifa por solicitud. Consulta la tabla y define un presupuesto.

**Français:** remises automatiques selon le forfait. Les mots-clés acceptés et les blocs de traitement sont facturés même sans résultat, en plus des publications livrées; l’API ajoute des frais par requête. Consultez le tableau et fixez un budget.

**Deutsch:** automatische Rabatte je Tarif. Zusätzlich zu gelieferten Beiträgen werden angenommene Suchbegriffe und Verarbeitungsblöcke auch bei leeren Suchen berechnet; die API berechnet eine Gebühr pro Anfrage. Preise und Budget vor dem Start prüfen.

**Português:** descontos automáticos por plano. Além das publicações entregues, há cobranças por palavras-chave aceitas e blocos de processamento, mesmo sem resultados; a API inclui uma tarifa por solicitação. Consulte a tabela e defina um orçamento.

**简体中文：** 不同套餐自动享受折扣。除实际返回的笔记外，已接受的关键词和开始的处理时间块也会收费，即使没有搜索结果。API 每次有效请求另有少量费用。请查看价格表并设置预算。

[Discover more LofoMachines Actors](https://apify.com/lofomachines)

# Actor input Schema

## `keywords` (type: `array`):

Enter one Chinese or other-language topic, brand, product or phrase per line. Each phrase is searched separately. Up to 100 phrases. Try 咖啡 (coffee), 护肤 (skincare) or 旅行攻略 (travel tips). Matches are checked against the post’s own title, text or hashtags. Chinese phrases are matched as entered; all words in a multiword entry must appear.

## `country` (type: `string`):

Choose a market to prioritize results relevant to that country. Leave Worldwide for a broader search. The author’s location may differ.

## `newerThan` (type: `string`):

Choose a UTC date from the last 12 months, including today. Leave empty to allow posts back to the same date last year. Earlier and future dates are rejected.

## `olderThan` (type: `string`):

Choose a UTC date from the last 12 months, up to and including today. Leave empty to include today. Use the same date in both calendars for one day.

## `maxPostsPerQuery` (type: `integer`):

Return up to this many posts for each keyword (1–3,000). Fewer posts may be available. Start with 10 to preview a topic.

## `searchMode` (type: `string`):

Fast finds an economical sample. Exhaustive checks more pages and date windows across your selected period, explores productive windows, and stops searches that no longer add new posts. It skips unproductive days instead of checking every day separately. Neither mode guarantees every available post. Both respect your per-keyword limit.

## Actor input object example

```json
{
  "keywords": [
    "咖啡",
    "护肤",
    "旅行攻略"
  ],
  "country": "CN",
  "maxPostsPerQuery": 50,
  "searchMode": "fast"
}
```

# Actor output Schema

## `posts` (type: `string`):

One row per public post for each matching keyword.

## `summary` (type: `string`):

Coverage and counts for this run.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "keywords": [
        "咖啡",
        "护肤",
        "旅行攻略"
    ],
    "country": "CN"
};

// Run the Actor and wait for it to finish
const run = await client.actor("lofomachines/rednote-keyword-post-search").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "keywords": [
        "咖啡",
        "护肤",
        "旅行攻略",
    ],
    "country": "CN",
}

# Run the Actor and wait for it to finish
run = client.actor("lofomachines/rednote-keyword-post-search").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keywords": [
    "咖啡",
    "护肤",
    "旅行攻略"
  ],
  "country": "CN"
}' |
apify call lofomachines/rednote-keyword-post-search --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lofomachines/rednote-keyword-post-search"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/afu6LerfUBFKwSEdf/builds/mSl4CZVug6uOuN82K/openapi.json
