ナビゲーションにスキップ

How do I compare answers to a Zhihu question while preserving conditions and sources?

To compare answers to one Zhihu question, save a first batch of answers with zhihu.web.fetch_question_answers, put one answer per row in a comparison sheet, and compare the conditions each author states before comparing conclusions. Keep each answer’s original excerpt and author source. For example, for a question about using a home projector during the day, compare lighting, equipment and purpose to see why the answers differ.

Start from a known question. An answer link already contains the ID of the answer’s parent question; see identifiers. If you already have complete saved material, read that material before requesting it again.

1. Make the research question specific

Write down the conditions to compare: room shading, content viewed, screen and time of use. Vote counts and answer counts help you decide what to read first; whether an answer is relevant depends on the answer’s actual content.

Read one page first. Then fill specific gaps with another page, selected answer details or comments. Budget each request at the action’s current price on the pricing page.

2. Save an answer page

Call zhihu.web.fetch_question_answers with your question_id. The example requests five answers ordered by time (updated):

curl --fail-with-body -sS https://api.beatapi.io/v1/social-data/call \
-H "Authorization: Bearer $BEATAPI_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"action":"zhihu.web.fetch_question_answers","params":{"question_id":"<question_id>","limit":5,"offset":0,"order":"updated","cursor":"","session_id":""}}' \
-o zhihu-answers-page-1.json

Keep the actual inputs, the start and retrieval times, the HTTP status and the original response. After the request, read the returned Zhihu content; record an empty page, a failed request and incomplete content as three separate states.

3. Preserve a handoff record with Python

Save the script as archive_answers.py. archive_answers.py reads a saved response, checks the outer action and status and the presence of data, then writes a new record containing action, request_id and data. Keep the original response next to the archive record; the archive record does not replace the original.

import json, pathlib, sys
source, target = map(pathlib.Path, sys.argv[1:3])
r = json.loads(source.read_text(encoding="utf-8"))
if r.get("status") != "succeeded" or r.get("action") != "zhihu.web.fetch_question_answers":
raise ValueError("Expected successful Zhihu answer listing")
if "data" not in r or r["data"] is None:
raise ValueError("Missing response data")
record = {"action": r["action"], "request_id": r.get("request_id"), "data": r["data"]}
with target.open("x", encoding="utf-8") as f:
json.dump(record, f, ensure_ascii=False, indent=2)
print(str(target))

Run the script locally:

python3 archive_answers.py zhihu-answers-page-1.json zhihu-answers-archive-1.json

Record the question ID, the ordering, the page scope and the actual times in the collection manifest. archive_answers.py only reorganizes existing files and sends no request.

4. Select relevant answers and compare conditions

  1. Identify the answers. In the saved result, confirm each answer object and keep the answer ID, the author, the source and the readable text.
  2. Fetch details where needed. If an excerpt lacks context, fetch the selected answer’s details with zhihu.web.fetch_answer_detail and the answer’s answer_id.
  3. Fill the comparison sheet. Put one selected answer per row, and record the conditions the author describes before writing your summary.
ColumnWhat to record
Question and answerSeparate IDs and original sources
ConditionsLight, equipment/screen and purpose, leaving unmentioned conditions empty
Viewpoint and excerptActual claim and the passage supporting its summary
Difference from another answerDifferent conditions, objects or opinions under comparable conditions
Open items and next stepDetails, comment correction, documentation or a separate experience

For example, an account of daytime viewing with open windows and an account from a shaded room describe different situations. Compare the two sets of conditions before summarizing agreement, rather than only counting answers for and against. Leave conditions the author did not state empty instead of filling them in for the author.

5. How do you add viewpoints?

  1. Keep the question and the ordering unchanged.
  2. Request the next batch with the cursor, session_id and continuation values the response actually returned, and save each batch under a new file name. The response paths of cursor and session_id are not fixed in the contract, so increasing offset alone does not prove correct continuation. See answer pagination.
  3. After each batch, check whether the batch added a new condition or counterexample.
  4. Once the main differences are supported, organize the findings. When you reach the planned page count or no usable continuation value remains, record the stop reason and the uncovered range.

Read an answer’s comments only when the comments add a model correction or a testing condition. Keep answer IDs and comment IDs separate, and fetch details or comments according to the missing material; do not expand every discussion by default.

6. How should the team receive the findings?

Deliver a “conditions—viewpoint—supporting excerpt—source—open question” comparison. State which conclusions match, which claims apply only to specific situations and what evidence is still needed. Attach the questions, answers and pages actually read.

Prompt for an assistant with the BeatAPI tools configured:

Compare viewpoints on daytime projector use under this question, retaining sources and excerpts. Separate lighting, screen and purpose before describing agreement or conflict. Reuse saved material and name specific answers or context that need further reading.

For example, your review notes could say:

What we found: One answer describes watching during the day with the room shaded.

What to check next: How well it works in a living room with open curtains. Look for answers that describe the screen and room setup.

Put the answer link and the archive file name beside each finding, so a teammate can follow each finding back to the original passage.

Object identifiers · Answers and search pagination