I am using Google Documents List API for searching within documents.
Searching on the google drive ui returns results with most number of occurences of words first. But
You can use the orderBy
query parameter to order the Documents List Feed by certain criteria:
last-modified
: Default value, sort by last modified date.last-accessed
: sort by last accessed date.title
: sort by title (this is what you're looking for.starred
: sort documents by their "starred" attribute.