Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Warning: there's still a lot of work to be done.

Edit: Pilha has been updated and now it supports most of the stack exchange api. There's still work to be done and the gem should be completely functional by the end of this week. Watch the github repo to keep track of the latest updates.

Code Snippet

require 'rubygems'
require 'pilha'

include StackExchange::StackOverflow

StackExchange::StackOverflow.config do |options|
  options.api_key = 'your key goes here'

response = Answer.all
answer = response.answers.first
answer.answers_comments_url    # "/answers/123/comments"
answer.owner                   # <StackExchange::StackOverflow::User:0x93234b8  ...> 
answer.owner.display_name      " "john smith"


Pilha aims to provide an ActiveRecord-like interface for querying the StackExchange API.

More info about the gem can be founded at its github page:

Desing goals:

  • Simplicity
  • No external dependencies/gems
  • Lots of specs/tests


The MIT License


To install it, just gem install pilha. The library's code is hosted in github (


Tested under Ruby 1.8.7 (Enterprise Edition)


[my username] @


This library is written in Ruby and uses Rspec for its tests. Anyone can contribute to the code by sending a pull request.

share|improve this question
That's an odd choice of name. Any particular reason for that? – Mark Rushakoff May 27 '10 at 14:39
Pilha means 'stack' in portuguese. :) – daltojr May 27 '10 at 14:42

You must log in to answer this question.

Browse other questions tagged .