The Search script returns a list of results based on the user input. For example, when you search a book by title, the script sends a request to the Google Books API and returns a list of results that will be presented to you.
The Document script inserts a new document in the collection. It receives one or more parameters from the Search script, sends a new request if needed, and insert a document.
The Library script is an additional script shared between the Search and Document ones. You can put your classes or functions in it.