Code and Docs on GitHub Star

Search for Books in Computer Science

Selected Fields run code

Show selected fields in the result.
        
          zAPI.SearchWidget.new({
            mountPoint: "#zAPI-sw-root",
            host: "https://rrsoft.zapiness.com",
            endpoint: "books",
            fields: [
              "title",
              "publisher",
              "authors",
              "page_count"
            ]
          });
        
      

Preview Mode run code

Show full details of the first result once the search widget is loaded.
        
          zAPI.SearchWidget.new({
            mountPoint: "#zAPI-sw-root",
            host: "https://rrsoft.zapiness.com",
            endpoint: "books",
            preview: true,
            fields: [
              "title",
              "publisher",
              "average_rating",
              "rating_count",
              "language",
              "categories",
              "authors",
              "page_count"
            ]
          });
        
      

Specific Label run code

Specify the title of the result.
        
          zAPI.SearchWidget.new({
            mountPoint: "#zAPI-sw-root",
            host: "https://rrsoft.zapiness.com",
            endpoint: "books",
            label: "authors",
            fields: [
              "title",
              "publisher",
              "average_rating",
              "rating_count",
              "language",
              "categories",
              "authors",
              "page_count"
            ]
          });
        
      

Hide Search Bar run code

Hide Search Bar and show advanced filters only.
        
          zAPI.SearchWidget.new({
            mountPoint: "#zAPI-sw-root",
            host: "https://rrsoft.zapiness.com",
            endpoint: "books",
            label: "authors",
            showSearchBar: false,
            fields: [
              "title",
              "publisher",
              "average_rating",
              "rating_count",
              "language",
              "categories",
              "authors",
              "page_count"
            ]
          });