StackAPI: A Python wrapper for the Stack Exchange API¶
Release v0.1.12. (Installation)
StackAPI is a simple Python wrapper for the Stack Exchange API and supports the 2.2 API.
Retrieving data from the API is simple:
from stackapi import StackAPI SITE = StackAPI('stackoverflow') comments = SITE.fetch('comments')
The above, will issue a call to the
comments end point on Stack Overflow and retrieve the 600 newest comments.
- Automatically obeys the
- Read and write functionality via the API.
- Retrieve multiple pages of results with a single call and merge all the results into a single response.
- Throw exceptions returned by the API for easier troubleshooting.
- Utilize Requests.
StackAPI is supported on Python 2.7 - 3.7.
This portion of documentation provides details on how to utilize the library, and provides advanced examples of various use cases.
- Advanced Usage
- Complex API Queries
- All Stack Overflow Users Created on Feb. 27th of 2011
- Comments with at least a score of 10 on Ask Ubuntu
- Of three specific posts on Server Fault, which one has the most recent activity
- Any favorites added in the month of December 2011 by Darin Dimitrov
- Questions created during the Modern Warfare 3 VS Skyrim Contest with the
skryimtag and a score greater than 10 on Gaming Stack Exchange
The API Documentation¶
Information about specific functions, classes, and methods are available in this portion of documentation.
Information about how to contribute to the project is available in this portion of the documentation.