• Stars
    star
    282
  • Rank 146,549 (Top 3 %)
  • Language
    Python
  • License
    Other
  • Created over 10 years ago
  • Updated about 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An unofficial API for Quora.

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.

An unofficial API for Quora.

Table of Contents

API Usage

API Base URL: http://quora.christopher.su

Endpoints Summary

GET: /users/<user>

Example

Example usage: GET http://quora.christopher.su/users/Christopher-J-Su

Example result:

{
  "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/<user>/activity

Get the user's activity.

Example

Example usage: GET http://quora.christopher.su/users/Christopher-J-Su/activity

Output (excerpt):

{
  "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": "<div style=\"color: #666666;\">Christopher J. Su added this answer.</div><br /><div id=\"ld_ihbjvp_3370\"><div style=\"font-weight: bold; color: #000000;\"><div class=\"hover_menu hidden hover_menu_wide hover_menu_cards\" id=\"__w2_qIjTQfx_menu\" style=\"display: none;\"><div class=\"hover_menu_nub\"></div><div class=\"hover_menu_contents\" id=\"__w2_qIjTQfx_menu_contents\"> </div></div><a class=\"user\" href=\"http://www.quora.com/Christopher-J-Su\" id=\"__w2_qIjTQfx_link\">Christopher J. Su</a></div><br />I think you might need to fill out a CSE course petition to take a 300+-level CSE course as a non-major: <span class=\"qlink_container\"><a class=\"external_link\" href=\"https://www.cs.washington.edu/prospective_students/undergrad/petition/\" target=\"_blank\">Petition for Non-Majors</a></span>.<br /><br /><a href=\"http://www.quora.com/Can-applied-math-students-take-CSE-majors-only-courses\" style=\"font-weight: bold;\">See question on Quora</a></div>", 
      "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/<user>/activity/answers

Get the user's latest answers.

Example

Example usage: GET http://quora.christopher.su/users/Christopher-J-Su/activity/answers

Output (excerpt):

{
  "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": "<div id=\"ld_ftujiv_1299\"><div style=\"font-weight: bold; color: #000000;\"><div class=\"hover_menu hidden hover_menu_cards hover_menu_wide hover_menu_cards\" id=\"__w2_lHemksQ_menu\" style=\"display: none;\"><div class=\"hover_menu_nub\"></div><div class=\"hover_menu_contents\" id=\"__w2_lHemksQ_menu_contents\"> </div></div><a class=\"user\" href=\"http://www.quora.com/Christopher-J-Su\" id=\"__w2_lHemksQ_link\">Christopher J. Su</a></div><br />Apply, interview, fail, repeat. Keep failing. Eventually, you&#039;ll notice you stop failing as much as you did before. Then, you&#039;ll suddenly start passing interviews. Then, you&#039;ll start getting offers.<br /><br />Don&#039;t get locked up in the mindset that you won&#039;t make it. If you never even try, you&#039;ll never get an internship. Having interviews scheduled will motivate you to study and prepare for them. Doing the interviews themselves is great practice.<br /><br /><a href=\"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\" style=\"font-weight: bold;\">See question on Quora</a></div>", 
      "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/<user>/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):

{
  "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/<user>/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):

{
  "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": "<div id=\"ld_veqgnk_1856\"><span id=\"ld_veqgnk_1857\">5 Answers</span><br /><br /><a href=\"http://www.quora.com/What-is-a-typical-day-like-for-a-software-engineer-at-Google\" style=\"font-weight: bold;\">See question on Quora</a></div><br />", 
      "title": "What is a typical day like for a software engineer at Google?"
    }
  ]
}

GET: /users/<user>/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):

{
  "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": "<div id=\"ld_gurtiz_2329\"><div style=\"font-weight: bold; color: #000000;\"><div class=\"hover_menu hidden hover_menu_cards hover_menu_wide hover_menu_cards\" id=\"__w2_EisD67h_menu\" style=\"display: none;\"><div class=\"hover_menu_nub\"></div><div class=\"hover_menu_contents\" id=\"__w2_EisD67h_menu_contents\"> </div></div><a class=\"user\" href=\"https://www.quora.com/Kshitij-Gopal\" id=\"__w2_EisD67h_link\">Kshitij Gopal</a></div><br />I&#039;m not sure on what basis the earlier answer was given, but as someone who managed interns directly at Google I&#039;ll give this one a crack.<br /><br />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&#039;re an aspiring intern then remember that.<br /><br />Just to clarify the other answer completely - there is nothing random about it and certainly no &quot;lottery&quot; system. I&#039;ve seen and filled the evaluation form, at Google not much is left to luck.<br /><br /><a href=\"https://www.quora.com/What-criteria-are-Google-interns-graded-on-for-performance-reviews\" style=\"font-weight: bold;\">See question on Quora</a></div>", 
      "title": "What criteria are Google interns graded on for performance reviews?"
    }
  ]
}

GET: /users/<user>/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):

{
  "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": "<div id=\"ld_qxesgk_3346\"><span id=\"ld_qxesgk_3347\">0 Answers</span><br /><br /><a href=\"https://www.quora.com/Reviews-of-Elixir-programming-language\" style=\"font-weight: bold;\">Write an answer on Quora</a></div><br />", 
      "title": "Reviews of: Elixir (programming language)"
    }
  ]
}

GET: /questions/<question>

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:

{
  "answer_count": 6, 
  "topics": [
    "Science, Engineering, and Technology", 
    "Science", 
    "Physical Sciences", 
    "Physics", 
    "Time (physics)"
  ], 
  "want_answers": 7
}

GET: /answers/<answer_short_link>

Get an answer by its short link.

Example

Example usage: GET http://quora.christopher.su/answers/6hARL

Output:

{
  "answer": "<div...</div>", 
  "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/<question>/<author>

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. pip is recommended for installing dependencies.

To run the API locally:

$ 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.

More Repositories

1

export-saved-reddit

Export saved Reddit posts into a HTML file for import into Google Chrome.
Python
424
star
2

pyquora

A Python module for fetching and parsing data from Quora.
Python
128
star
3

singularity-cms

A simple, flat file, markdown CMS in a single PHP file.
PHP
86
star
4

project-euler-offline

Check solutions for Problem Euler problems while offline.
Python
28
star
5

encryptFS

A simple file system that encrypts files individually.
Python
18
star
6

habits

A lightweight habit tracker with a simple REST API.
Python
18
star
7

pymetacritic

Python API for Metacritic.
Python
17
star
8

pymontecarlo

A small Python library for creating simple Monte Carlo simulations.
Python
16
star
9

todoist-cli

A command line interface for adding tasks to Todoist.
Python
15
star
10

wp-svbtle-cs

A modified version of wp-svbtle.
PHP
15
star
11

ALICEChatAPI

Uses the ALICE AIML to control a chatbot through a REST API on Flask. With speech recognition!
JavaScript
15
star
12

batch_sms

Send large amounts of SMS with the Twilio API.
Python
11
star
13

quora-backup

A syncing approach to backing up Quora content.
Python
10
star
14

Showlist

Review live performances. Won 2nd place at the 2014 Facebook Seattle Regional Hackathon.
HTML
8
star
15

PySteamMarket

Python API for getting prices from the Steam market.
Python
8
star
16

metacritic-api

A REST API for accessing Metacritic data.
Python
7
star
17

gh-streak

A Python library, CLI, and API for fetching GitHub contribution streaks.
Python
6
star
18

Todoist-Tools

Some utility scripts for Todoist
Python
5
star
19

Fitbit-Tools

Calculates sleep debt using sleep records from the Fitbit API
Python
5
star
20

pinboardquick

A Google Chrome extension to bookmark pages to Pinboard without dialogues or pop ups.
JavaScript
5
star
21

verification-bot

Verifies users through a Google Form, applies flair, and performs moderation tasks on submissions and comments.
Python
4
star
22

Reddit-Tools

A collection of small utilities and scripts for Reddit.
Python
4
star
23

scrape

Quickly scrape web pages from the command line.
Go
4
star
24

Instagram-Tools

Various utility scripts for Instagram.
Python
4
star
25

progress

An app for maintaining weekly snippets of progress.
Python
4
star
26

modapi

A modular API framework in Python.
Python
4
star
27

Facebook-Tools

Small tools and scripts that utilize the Facebook Graph API.
PHP
3
star
28

PySpotifyControl

A Python module to control Spotify for Mac using AppleScripts through Python.
Python
3
star
29

twitbot

A framework for building modular Twitter bots.
Python
3
star
30

netviz

A tool for visualizing real-time network/graph data.
JavaScript
3
star
31

logrus_socketio

A Logrus hook to send entries over Socket.IO.
Go
3
star
32

twitbot-img

A twitbot module to return images depending on keywords.
Python
3
star
33

archivist

A bot for managing Slack chat history archives.
Python
2
star
34

elo

Calculate Elo ratings for players given match data.
Python
2
star
35

Tumblr-Tools

Tools for Tumblr using the v2 API.
Python
2
star
36

logs.tf-scraper

Libraries and utilities for scraping (one-off and real-time) Logs.tf data.
Python
2
star
37

flask-templates

Templates for Flask applications.
HTML
2
star
38

PySpotifyControlAPI

A REST API and web app to control Spotify for Mac.
HTML
2
star
39

Evernote-Tools

Scripts I wrote in AppleScript to work with Evernote for Mac.
2
star
40

Rendezvous-iOS

The iOS app for Rendezvous.
Objective-C
2
star
41

convey

A serverless gateway to an Elasticsearch instance.
JavaScript
2
star
42

TabClock

A Safari extension that displays a fancy clock when a new tab is opened.
HTML
2
star
43

log-server

Collect and display logs by streaming them through websockets.
JavaScript
1
star
44

housemates

A web app to help find housemates to live with. Made to learn Express/Node.js.
JavaScript
1
star
45

jira-cli

A lightweight command line interface for JIRA.
Python
1
star
46

Last.fm-Tools

Tools for Last.fm.
Python
1
star
47

SongQueue

A web app to add and vote on songs and then play them in order by score.
JavaScript
1
star
48

pynotify

A Python library for sending notifications.
Python
1
star
49

modapi-todoist

A Todoist module for modapi.
Python
1
star
50

product-prompt-legacy

Get prompts to practice product design.
HTML
1
star
51

photo-v1

A static photo website generated with Jekyll.
CSS
1
star
52

applescript.dart

A library for executing AppleScript in Dart.
Dart
1
star
53

Instachart

Quickly make and share charts from data.
JavaScript
1
star
54

CatalystRobotics

Concordia International School Catalyst FIRST Tech Challenge (FTC) team's code.
C
1
star
55

dashing-widgets

Some custom jobs and widgets for Dashing.
Ruby
1
star
56

IdeaDB

A database and API for saving and accessing ideas. Made to learn Flask.
Python
1
star
57

WordPress-Plugins

Various WordPress plugins. Also available on the WP Plugin Directory.
PHP
1
star
58

open-hunt-api

An unofficial API for Open Hunt.
Python
1
star
59

TabHomePage

A Safari extension to set a home page for new tabs (separate from the new window home page).
HTML
1
star
60

jira-secure-cal

A web service to generate and securely access iCal calendar subscriptions from JIRA.
Python
1
star
61

quora-scripts

A collection of small scripts for Quora.
HTML
1
star
62

filescraper

Scrapes a web page and downloads all linked files of specified file types.
Python
1
star