Skip to main content
1 of 2
Brock Adams
  • 13k
  • 5
  • 39
  • 64

The various /questions routes do allow you to simultaneously retrieve answers, if you set the right filter.

  1. Go to the /questions documentation page.

  2. Scroll to the Filter Edit Tool:

Filter edit tool

  1. Click on the tool and this dropdown appears:

Filter dropdown

  1. Adjust the filter to return just the fields you want without any cruft:

    1. First type withbody into the text box and hit Enter. This presets many of the fields in a good way.

    2. Then expand the various groups and adjust which fields are checked.
      For example, click on badge_count and then click the unselect all badge_count fields link.

    3. It is recommended that you zero out: badge_count, original_question, related_site, and styling. These are almost always unneeded clutter.

    4. Here is the critical part:
      Expand the question group and check answers.

    5. Expand the other fields and uncheck items you do not want. You probably do not need to check any additional items, except in the .wrapper group.

    Be careful about checking private_info properties. If you do have any of these checked, your API calls will fail unless you also pass a valid access_token.

  2. Click the save button.

  3. If you break the filter, repeat step 4 but enter !gB7hjL3lhJ*Cnfe63rh6pAm74J(5qrOZKbL as the starting point.

A good starting filter for getting questions with answers is: !gB7hjL3lhJ*Cnfe63rh6pAm74J(5qrOZKbL.


Also note that you do not need a key or an access_token for most requests to /questions.
It's only needed if your filter returns one of the few protected properties and, since you are fetching all recent questions, these properties will almost never apply anyway.

Brock Adams
  • 13k
  • 5
  • 39
  • 64