The various /questions
routes do allow you to simultaneously retrieve answers, if you set the right filter.
A good starting filter for getting questions with answers is: !gB7hjL3lhJ*Cnfe63rh6pAm74J(5qrOZKbL
To Customize a Filter:
Scroll to the Filter Edit Tool:
- Click on the tool and this dropdown appears:
Adjust the filter to return just the fields you want without any cruft:
First type
withbody
into the text box and hit Enter. This presets many of the fields in a good way.Then expand the various groups and adjust which fields are checked.
For example, click onbadge_count
and then click theunselect all badge_count fields
link.It is recommended that you zero out:
badge_count
,original_question
,related_site
, andstyling
. These are almost always unneeded clutter.Here is the critical part:
Expand thequestion
group and checkanswers
.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 validaccess_token
.Click the save button.
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.