Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

I want to fetch all my favorite questions on Stackoverflow.com and dump them as JSON. I used this API path:

/2.1/users/1310070/favorites?fromdate=1382486400&site=stackoverflow


But it is returning some fields which are not required like upvote_count, downvote_count, and owner.
Can I use the API in such a way that it does not return these fields?

This is to make my API calls light -- decrease the response size -- to save bandwidth (and time, and quota).

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

This is what custom filters are for.
For example, if you append &filter=!BGRhem4Z)WIti9lP55R*tgr(Jq_fHC to your query, above, you will get results without upvote_count, downvote_count, or owner information. (The first two aren't included by default anyway.)


An easy way to create a filter is to use the filter-edit tool, on the appropriate doc page for the path you are using. :

(Sample image of tool follows. It is not specific to this question)
Filter tool

share|improve this answer
    
Awesome @Brock Adams..This is what I was looking for..Thanks a lot :) You made the day.. –  blunderboy Jan 15 at 4:30
    
You're welcome; glad to help! –  Brock Adams Jan 15 at 22:32
add comment

You must log in to answer this question.

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