Web research6 min readBy Purrkey team

How to collect Baidu web results for a keyword

Collect Baidu organic results, related searches, trending searches, and an AI overview for one query, then shape 25 Chinese-language queries into a comparison table

On this page

You have 25 Chinese-language queries and need the Baidu organic results for each one, one page deep, so you can compare which pages rank and which related searches appear. serpapi.baidu.search takes one query per call and returns organic links, related searches, trending searches and an AI overview

No run has been executed for this guide. The tables below are a design, and the values in them are placeholders showing the shape

The query list and the deliverable table

Example queries, invented for this guide. Three of the 25, so you can see the row shape; swap in your own list

query_labelq
ev-batteryelectric vehicle battery recycling
home-solar-subsidy家庭光伏补贴政策
battery-swap-cn换电模式 前景

The sheet has one row per organic result, not one row per query, because position and link live inside organic_results. With 25 queries at rn 10 you plan for up to 250 rows, and organic_results caps at 50 items per response

ColumnFilled from
query_labelyour query list
positionorganic_results[].position
titleorganic_results[].title
linkorganic_results[].link
snippetorganic_results[].snippet
displayed_brandorganic_results[].displayed_brand
related_searchesrelated_searches[].query
top_searchestop_searches[].text
ai_overviewai_overview.text_blocks
noticenotice

The query-level values (related_searches, top_searches, ai_overview, notice) arrive once per response, so repeat them on each result row for that query and the sheet filters cleanly

What the tool takes

q is the search query and can carry Baidu search operators. It must be 1 to 500 characters, and control characters are rejected

ct, pn and rn are optional. ct is the string 1, 2 or 3: 1 leaves the language unrestricted, 2 restricts results to Simplified Chinese and 3 to Traditional Chinese. pn skips a number of results for pagination, from 0 to 500. rn sets the result count per response, from 1 to 50

The contract lists these four properties. It does not say they are the only fields the endpoint accepts, so confirm the current schema in the catalog before you fix a request shape

For the 25-query job send q from the list, ct as 2, pn as 0 for the first page and rn as 10

Reading the output fields that drive the topic decision

  • organic_results[].position is the rank Baidu gave the page. Sort on it to compare page one across the 25 queries
  • organic_results[].link and .title identify the page. One link turning up under several queries is a single page answering several of them
  • .snippet and displayed_brand show how the result presents itself. The contract types displayed_brand as a string and gives it no description, so use it as a label rather than as proof of who owns the site
  • related_searches[].query, up to 10 per response, is the adjacent demand Baidu lists for that query. top_searches[].text, up to 10, also carries position and tag
  • ai_overview.text_blocks holds the text blocks of the AI-generated overview when Baidu returns one
  • notice is set when the engine returned no results. It is the field that tells you a row has no result data behind it
  • people_also_search_for[].text is a second related list, up to 10 items. It is not in the column set above, which keeps the sheet narrow; add it when you want both lists

One page per query, and the no-result charge

Set pn to 0 and rn to 10 for the first page. A second page is pn 10 with the same rn, and pn cannot go above 500

The limit that changes the plan sits here: a search that returns no results still counts as one call, so 25 queries means 25 calls even when some queries come back empty. notice is how you spot those rows. Failed searches are not charged. Sending the same query again is another call, so fix the query rather than repeating it

The agent prompt

Agent prompt
Set up https://purrkey.app/SKILL.md, then use Purrkey to collect Baidu web
results for the queries in queries.csv. Check the current inputs and price
of serpapi.baidu.search in the Purrkey catalog before running anything.
Send q from the query column, ct as "2", pn as 0 and rn as 10, for one page
per query. Read notice on each response. Return one table with columns
query_label, position, title, link, snippet, displayed_brand,
related_searches.query, top_searches.text, ai_overview.text_blocks, notice.
Repeat the query-level values on each result row, and write one row with the
result columns empty and the notice text filled when notice is set. Do not
invent results and do not pull a second page.

Replace the query file with your own list and keep the first run to five queries, so the column shape is settled before 25 calls are spent

Estimated tool cost

serpapi.baidu.search is listed at $0.015 per call (unitPriceMicros 15000), price revision serpapi-developer-retail-2026-11-18, read through the Purrkey catalog on November 23, 2026. Calls go to POST /v1/runs with toolId serpapi.baidu.search

The listing unit is max_call, which the catalog defines as "Maximum per call. Successful runs settle at the actual AnyAPI charge." The totals below are ceilings

StepFormulaUnit pricePlanned quantityTotal
25 queries, one page eachcalls x max price$0.015 per call25$0.375
25 queries, two pages eachcalls x max price$0.015 per call50$0.75
Pilot, five queriescalls x max price$0.015 per call5$0.075

Agent model fees are not counted

Start with five queries

Run the five-query pilot, check that notice and related_searches land in the sheet the way you expect, then extend the same prompt to 25 queries. The tool page is Baidu search. For a comparison with other search endpoints, read SerpApi alternatives for agent search

Get started by giving this to your agent

  • Claude Code
  • Codex
  • Gemini CLI
  • Cursor
  • GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with Baidu.
Explore Baidu tools and pricing

FAQ

How do I collect Baidu web results for 25 queries?

Call serpapi.baidu.search once per query with q from your list, ct set to 2 for Simplified Chinese, pn set to 0 and rn set to 10. That is 25 calls for one page per query, and each response carries organic results, related searches, trending searches and an AI overview.

What inputs does serpapi.baidu.search take?

q is required, and ct, pn and rn are optional. The contract lists those four properties but does not say they are the only fields the endpoint accepts, so confirm the current schema in the catalog.

What do the ct values 1, 2 and 3 mean?

1 leaves the language unrestricted, 2 restricts results to Simplified Chinese and 3 to Traditional Chinese. For a Chinese-language query list, send 2.

Does a Baidu search with no results still cost a call?

Yes. A search that returns no results still counts as one call, and notice is set on that response. Failed searches are not charged.

How much does it cost to collect Baidu results for 25 queries?

At $0.015 per call, 25 calls come to $0.375, and two pages per query comes to $0.75 for 50 calls. Those totals are ceilings at the maximum per call price, and agent model fees are not counted.

What do pn and rn do in serpapi.baidu.search?

pn skips a number of results for pagination, from 0 to 500, and rn sets the page size from 1 to 50. A second page of ten results is pn 10 with the same rn.

Which fields should I read from a Baidu response?

organic_results gives position, title, link, snippet and displayed_brand. related_searches[].query and top_searches[].text give the surrounding search demand, ai_overview.text_blocks holds the overview text and notice flags a no-result response.

Next step

Try this with Baidu

The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.

See Baidu tools

Share this article