Rather than using single letters (i.e. 'c' for courses and 'f' for friends) to represent the types of items you want to return, I think it would be cleaner to use names like 'courses' and 'friends'. In addition, you should consider changing the param string to use one of the following formats (or another format if you have other ideas):

1. `?dataNeeded=courses,friends`. (Have the types of results you want as a comma separated string). Then you can manually `.split(',')` to get a list of the types you want.
2. `?dataNeeded=courses&dataNeeded=friends`. Then calling `flask.request.args.getlist('dataNeeded') will return a list of the different types.

I personally like option 1 since it will give a nicer-looking 

Also consider changing 'dataNeeded' to something like 'types' or 'result_types'.