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.

Supported Features

  • Automatically obeys the backoff parameter.
  • 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.

The API Documentation

Information about specific functions, classes, and methods are available in this portion of documentation.

Contributor Guidelines

Information about how to contribute to the project is available in this portion of the documentation.