32

I see the Stack Exchange API but I'm unable to understand it. I don't think there is any fundamental tutorial showing how to use Stack Overflow fully in the API documentation.

I want some fundamental tutorials which will help me to understand the API and how to use it from the start, and also how to use the total of Stack Overflow.

1 Answer 1

35

There is no tutorial for the API, nor is there likely to be one -- at least officially. There is a "Hello World" introduction.

To use the current API (version 2.2), you really only need to know/do:

  1. How to make an HTTP GET request, in the language of your choice. There are also various user-supplied libraries in .net, PHP, Python, etc. to help with this.
  2. How to parse the JSON results.
  3. Monitor the results to make sure you haven't busted your quota or received a backoff warning.

For the next step, It's highly recommended that:

  1. You get an API key.
  2. You learn and use Custom Filters to streamline operation and save resources and bandwidth.
  3. You know how to page through results.

Optionally, for sensitive data or write operations, you need to:

  1. Know how to authenticate in the language and/or library of your choice.
  2. Make an HTTP POST to write data.

Beware that you currently cannot duplicate much of the functionality of Stack Overflow, using the API. The (public) API is mostly read-only, and none of the Review or Moderation operations are supported.
Update: Many new write/post methods were added with API version 2.2.

See the API Change Log.

3
  • can you just tell me that is it mandatory to use StackWrap4J library ?
    – Ranjit
    Commented Jan 30, 2014 at 7:27
  • No it is not mandatory. The libraries just help with the overhead, housekeeping, paging, and sometimes authentication. It's pretty easy to code all that stuff from scratch, if you've a hankering to. Commented Jan 30, 2014 at 7:29
  • @RanjitPati That library is quite far out of date. There were a few others, but I don't know if any of them have been kept up. See the answers to Java wrapper for Stack Exchange. Commented Jan 31, 2014 at 20:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .