map reduce api