Use Quora Question, Answer & Profile Search Scraper with Python
Search Quora by keyword or scrape question, answer, profile, topic, Space, and post URLs directly, and get the text, author details, and engagement counts of each visibly accessible page, with clear status rows for anything blocked.
1. Choose the data you need
Review the published README for supported collection modes, examples, and limits. The recipe below uses the current published input definition.
2. Prepare a source-based input
This JSON contains published prefills and required-field defaults. Review every value for your task before running it; it is not a promise of successful collection.
{
"answerSortOrder": "observed",
"directUrls": [
"https://www.quora.com/What-is-Python-primarily-used-for"
],
"expandRelatedQuestions": false,
"filterAiAnswers": "include",
"includeAnswerHtml": false,
"includeAnswers": true,
"includeAuthorProfiles": true,
"includeFieldEvidence": true,
"includeProfileSensitiveFields": true,
"includeSocialLinks": true,
"maxAnswersPerQuestion": 2,
"maxAuthors": 1,
"maxItems": 3,
"maxQuestionsPerQuery": 1,
"maxRelatedQuestionsPerSeed": 0,
"minAnswerUpvotes": 0,
"mode": "urls",
"onlyUnanswered": false,
"resultTypes": [
"question",
"answer"
],
"searchQueries": [],
"searchTarget": "questions",
"usernames": []
}
Download input.example.json and save your reviewed copy as input.json.
| Field | Type | Required | Description |
|---|---|---|---|
mode | string | optional | Search discovers questions through the DuckDuckGo index and Quora related questions. URLs is deterministic and does not depend on search. |
searchQueries | array | optional | Two to four word phrases work best. Each query finds at most a couple of question seeds, then related questions expand the result. |
searchTarget | string | optional | Choose whether keyword discovery looks for question pages, profile pages, or both. Profile search is best-effort because search engines index few Quora profiles. |
directUrls | array | optional | Question, answer, profile, or topic URLs. Language subdomains are accepted. Comma-separated or one URL per line. |
usernames | array | optional | Quora profile usernames or slugs, with or without @ or a trailing slash. Each is normalised to a profile URL. |
resultTypes | array | optional | Which rows to save. Status and run-manifest rows are always emitted so blocked or empty sources stay visible. |
includeAnswers | boolean | optional | Expand question pages into answer rows. Turn off to keep question rows only. |
maxAnswersPerQuestion | integer | optional | Answers to collect from each question, including the 3-5 already visible on the page. Zero means no answers. |
expandRelatedQuestions | boolean | optional | Open related questions linked from each question page. Quora exposes up to 70, which is how keyword search reaches more than its first result. |
maxRelatedQuestionsPerSeed | integer | optional | How many related questions to open from each question page. Zero lists the links without opening them. |
maxQuestionsPerQuery | integer | optional | Hard cap on question rows for each search query, including seed and related questions. |
includeAuthorProfiles | boolean | optional | Open each discovered author's profile to add follower, answer, question, view, and join-date fields. Turn off to keep author rows from answer evidence only. |
maxAuthors | integer | optional | Maximum unique author rows to emit when author is included in Result Types. |
minAnswerUpvotes | integer | optional | Keep only answers with an explicit upvote count at or above this value. Answers with unknown upvotes are excluded when this is positive. |
filterAiAnswers | string | optional | Include all answers, drop answers Quora explicitly labels as AI, or keep only those labelled answers. |
answerSortOrder | string | optional | Keep Quora's order, sort by explicit upvotes, or sort by the answer creation timestamp. |
onlyUnanswered | boolean | optional | Keep only questions whose visible answer count is exactly zero. Questions with an unknown count are excluded. |
includeProfileSensitiveFields | boolean | optional | Include location, employment, education, and join date on profile and author rows when Quora shows them. |
includeSocialLinks | boolean | optional | Include website and social links from a profile's public bio when present. |
includeAnswerHtml | boolean | optional | Include a rendered HTML version of each answer beside its plain text. Turn off to reduce dataset size. |
maxItems | integer | optional | Maximum question, answer, profile, author, topic, and search-result rows across the run. Status and manifest rows do not count. |
includeFieldEvidence | boolean | optional | Include field_sources and fields_present provenance maps on each row. |
3. Start an Actor run
Set APIFY_TOKEN in your environment. Python 3.10 or newer is sufficient; this recipe uses no third-party packages.
Execution may incur charges. Review current pricing on Apify. The request asks for a 120-second timeout and a charge limit; these settings are subject to Apify’s pricing and do not guarantee an all-inclusive spending cap.
import json
import os
import urllib.request
# Save the schema-derived example as input.json; review and edit it first.
with open("input.json", encoding="utf-8") as stream:
actor_input = json.load(stream)
token = os.environ["APIFY_TOKEN"]
request = urllib.request.Request(
"https://api.apify.com/v2/acts/4f1nWGGi2uy4RE0qo/runs?timeout=120&maxTotalChargeUsd=0.50",
data=json.dumps(actor_input).encode("utf-8"),
headers={"Authorization": "Bearer " + token, "Content-Type": "application/json"},
method="POST",
)
# This starts a potentially billable run. Do not automatically retry this POST.
with urllib.request.urlopen(request, timeout=40) as response:
run = json.load(response)["data"]
print("Run ID:", run["id"])
print("Status:", run["status"])
# Inspect and download results in Apify Console once the run succeeds.
4. Inspect the actual results
Open the run in Apify Console and wait for a successful completion. Use the published output schema to locate results and the dataset schema to understand declared views. Missing or optional record fields must not be treated as guaranteed values.
Quora questions, full answers, profiles, authors, topics, search-result cards, access-status rows, and a run manifest.
Questions before you run
Which inputs are required?
No top-level fields are marked required in the published schema. Conditional requirements can still apply; check the README.
What does this guide verify?
The fields, prefills, and schema links are rendered from the published build. This is a usage recipe, not a paid live extraction test. Source availability and collection results can vary.
What if the run request times out?
Check Apify Console before retrying. The first request may already have created a run. Do not automatically repeat a run-creation POST.
Generated from source build 4Ofo0BFs3PM3I87Iz and its README and schemas. Source changes regenerate this guide; no third-party editorial claims are inferred.