https://github.com/csu/quora-api
An unofficial API for Quora.
https://github.com/csu/quora-api
api flask python quora quora-api rest-api web-api web-scraping
Last synced: 18 days ago
JSON representation
An unofficial API for Quora.
- Host: GitHub
- URL: https://github.com/csu/quora-api
- Owner: csu
- License: other
- Created: 2014-07-24T04:33:00.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-10-09T22:15:34.000Z (over 9 years ago)
- Last Synced: 2025-12-21T17:51:26.343Z (3 months ago)
- Topics: api, flask, python, quora, quora-api, rest-api, web-api, web-scraping
- Language: Python
- Homepage:
- Size: 141 KB
- Stars: 304
- Watchers: 21
- Forks: 66
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Quora API
=========
#### Note: parts of this API may be broken due to changes on Quora's end. Please open issues and make pull requests regarding this at [csu/pyquora](http://github.com/csu/pyquora).
An unofficial API for Quora.
### Table of Contents
* [API Usage](#api-usage)
* [Features](#features)
* [Installation](#installation)
* [Contributing](#contributing)
# API Usage
### API Base URL: `http://quora.christopher.su`
## Endpoints Summary
* GET: [`/users/`](#get-usersuser)
* GET: [`/users//activity`](#get-usersuseractivity)
* GET: `/users//activity/answers`
* GET: `/users//activity/user_follows`
* GET: `/users//activity/want_answers`
* GET: `/users//activity/upvotes`
* GET: `/users//activity/review_requests`
* GET: [`/questions/`](#get-questionsquestion)
### GET: `/users/`
#### Example
Example usage: `GET http://quora.christopher.su/users/Christopher-J-Su`
Example result:
```json
{
"answers": 301,
"blogs": null,
"edits": 5576,
"followers": 173,
"following": 167,
"name": "Christopher-J-Su",
"posts": 6,
"questions": 110,
"topics": null,
"username": "Christopher-J-Su"
}
```
Note: due to recent Quora UI changes, the `blogs` and `topics` statistics are currently not working and will always return `null`.
### GET: `/users//activity`
Get the user's activity.
#### Example
Example usage: `GET http://quora.christopher.su/users/Christopher-J-Su/activity`
Output (excerpt):
```json
{
"activity": [
{
"link": "http://www.quora.com/University-of-Washington/What-does-the-UW-CS-department-gain-from-barring-other-UW-students-from-taking-its-courses/answer/Christopher-J-Su",
"published": "Tue, 25 Feb 2014 00:10:55 GMT",
"summary": "<-- ... --->",
"title": "What does the UW CS department gain from barring other UW students from taking its courses?"
},
{
"link": "http://www.quora.com/Can-applied-math-students-take-CSE-majors-only-courses/answer/Christopher-J-Su",
"published": "Tue, 25 Feb 2014 00:04:33 GMT",
"summary": "
Christopher J. Su added this answer.
I think you might need to fill out a CSE course petition to take a 300+-level CSE course as a non-major: Petition for Non-Majors.
See question on Quora
",
"title": "Can applied math students take CSE majors only courses?"
}
],
"last_updated": "Thu, 24 Jul 2014 05:32:49 GMT",
"username": "Christopher-J-Su"
}
```
### GET: `/users//activity/answers`
Get the user's latest answers.
#### Example
Example usage: `GET http://quora.christopher.su/users/Christopher-J-Su/activity/answers`
Output (excerpt):
```json
{
"items": [
{
"id": "5:48afe1749959ac2b673b1094a13b6cb5#1418975956225507",
"link": "http://www.quora.com/I-need-a-summer-internship-but-I-dont-want-to-apply-because-theres-a-90-chance-Ill-get-rejected-What-should-I-do/answer/Christopher-J-Su",
"published": "Fri, 19 Dec 2014 07:59:16 GMT",
"summary": "
Apply, interview, fail, repeat. Keep failing. Eventually, you'll notice you stop failing as much as you did before. Then, you'll suddenly start passing interviews. Then, you'll start getting offers.
Don't get locked up in the mindset that you won't make it. If you never even try, you'll never get an internship. Having interviews scheduled will motivate you to study and prepare for them. Doing the interviews themselves is great practice.
See question on Quora
",
"title": "I need a summer internship, but I don't want to apply because there's a 90% chance I'll get rejected. What should I do?"
}
]
}
```
### GET: `/users//activity/user_follows`
Get the user's latest user follows.
#### Example
Example usage: `GET http://quora.christopher.su/users/Christopher-J-Su/activity/user_follows`
Output (excerpt):
```json
{
"items": [
{
"id": "4:c219dbf80746802cf733f0cb3d5218c2#1419000196656496",
"link": "http://www.quora.com/Inna-Vishik",
"published": "Fri, 19 Dec 2014 14:43:16 GMT",
"summary": "",
"title": "Inna Vishik"
},
{
"id": "4:bd7227ae22f8f8cd9acfcb906ae8f6ea#1418975190093378",
"link": "http://www.quora.com/Mira-Zaslove",
"published": "Fri, 19 Dec 2014 07:46:30 GMT",
"summary": "",
"title": "Mira Zaslove"
}
]
}
```
### GET: `/users//activity/want_answers`
Get the user's latest followed questions.
#### Example
Example usage: `GET http://quora.christopher.su/users/Christopher-J-Su/activity/want_answers`
Output (excerpt):
```json
{
"items": [
{
"id": "1:03fb57d2ccb343bff9bb608c6978f5c7#1418895552348316",
"link": "http://www.quora.com/What-is-a-typical-day-like-for-a-software-engineer-at-Google",
"published": "Thu, 18 Dec 2014 09:39:12 GMT",
"summary": "
",
"title": "What is a typical day like for a software engineer at Google?"
}
]
}
```
### GET: `/users//activity/upvotes`
Get the user's latest upvoted answers.
#### Example
Example usage: `GET http://quora.christopher.su/users/Christopher-J-Su/activity/upvotes`
Output (excerpt):
```json
{
"items": [
{
"id": "5:cf756de40913266d1c7bb0ff1306a384#1419235600718606",
"link": "https://www.quora.com/What-criteria-are-Google-interns-graded-on-for-performance-reviews/answer/Kshitij-Gopal",
"published": "Mon, 22 Dec 2014 08:06:40 GMT",
"summary": "
I'm not sure on what basis the earlier answer was given, but as someone who managed interns directly at Google I'll give this one a crack.
Interns are evaluated on a number of parameters, most of which are confidential but rest assured there are a range of performance criteria, parameters that measure initiative, enthusiasm, work ethic and finally Googley-ness. Going above and beyond is expected and will help you in your final evaluation, if you're an aspiring intern then remember that.
Just to clarify the other answer completely - there is nothing random about it and certainly no "lottery" system. I've seen and filled the evaluation form, at Google not much is left to luck.
See question on Quora
",
"title": "What criteria are Google interns graded on for performance reviews?"
}
]
}
```
### GET: `/users//activity/review_requests`
Get the user's latest review requests.
#### Example
Example usage: `GET http://quora.christopher.su/users/Aaron-Ounn/activity/review_requests`
Output (excerpt):
```json
{
"items": [
{
"id": "1:24ee4ef5eff0c53d8247f5a45e83f5e3#1418745295543236",
"link": "https://www.quora.com/Reviews-of-Elixir-programming-language",
"published": "Tue, 16 Dec 2014 15:54:55 GMT",
"summary": "
",
"title": "Reviews of: Elixir (programming language)"
}
]
}
```
### GET: `/questions/`
Get statistics on a question.
#### Example
Example usage: `GET http://quora.christopher.su/questions/If-space-is-3-dimensional-can-time-also-be-3-dimensional`
Output:
```json
{
"answer_count": 6,
"topics": [
"Science, Engineering, and Technology",
"Science",
"Physical Sciences",
"Physics",
"Time (physics)"
],
"want_answers": 7
}
```
### GET: `/answers/`
Get an answer by its short link.
#### Example
Example usage: `GET http://quora.christopher.su/answers/6hARL`
Output:
```json
{
"answer": "",
"author": "Mayur-P-R-Rohith",
"comment_count": 1,
"question_link": "http://www.quora.com/Does-Quora-similar-question-...",
"upvote_count": 6,
"views": 227,
"want_answers": 8
}
```
### GET: `/answers//`
Get an answer by its question and its author.
# Features
### Currently implemented
* User statistics
* User activity
* Question statistics
* Answer statistics
### Todo
* Detailed user information (followers, following, etc.; not just statistics)
* Unit tests
* Cache data with memcached
# Installation
You will need [Python 2](https://www.python.org/download/). [pip](http://pip.readthedocs.org/en/latest/installing.html) is recommended for installing dependencies.
To run the API locally:
```bash
$ pip install -r requirements.txt
$ python server.py
```
# Contributing
Feel free to submit a pull request or an issue!
Quora API uses the [pyquora package](https://github.com/csu/pyquora).