> For the complete documentation index, see [llms.txt](https://docs.sharinpix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sharinpix.com/documentation/features/search-images/how-to-show-the-result.md).

# How to show the result

In this example, it is shown how the search results can be displayed on a Visualforce Page through the use of an Apex Class Controller.

* The code below demonstrates the implementation of the Visualforce Page used in this example.

```html
  <apex:page docType="html-5.0" cache="false"
    showHeader="false"
    sidebar="false"
    standardStylesheets="false"
    standardController="Account"
    extensions="SharinPixSearchPage"
    applyHtmlTag="false"
    applyBodyTag="false">
    <iframe src="{!searchUrl}" height="400px" width="100%" style="border: 0" > </iframe>
  </apex:page>
```

* The code below demonstrates the implementation of the Apex Class Controller used in this example.

```apex
  public class SharinPixSearchPage {
  	public String url { get; set; }
    	public String albumId { get; set; }
      public Map<String, Object> params;
      private sharinpix.Client clientInstance = sharinpix.Client.getInstance();
  
    	public SharinPixSearchPage(ApexPages.StandardController controller) {
        albumId = controller.getId();
        Map<String, Object> query = new Map<String, Object> {
          'q' =>  '*',
          'thumbnail_tags' => true,
          'thumbnail_filename' => true,
          'thumbnail_date' => 'L'
        };
        params = new Map<String, Object>{
          'path' => 'search?v=2&search_bar=false&q='+clientInstance.token(query)
        };
    	}
  
      public String getSearchUrl() {
        return clientInstance.getAppHost() + '?token=' + clientInstance.token(params);
      }
  }
```

* The snippet <mark style="color:red;">`'q' => '*'`</mark> represents the query fed to the search. The <mark style="color:red;">`*`</mark> symbol is used to return all the images from the corresponding album.

The screenshot below shows how the Visualforce Page appears when it is added to the record page of an Account object.

<figure><img src="/files/t6OdQ6mB9w4iVhJZlhsX" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.sharinpix.com/documentation/features/search-images/how-to-show-the-result.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
