खोज परिणाम कस्टमाइज़ करना
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
खोज बॉक्स को पसंद के मुताबिक बनाने के लिए उसी तरह, खोज नतीजों के एलिमेंट में अतिरिक्त विकल्प जोड़े जा सकते हैं.
उदाहरण के लिए, वेब परिणाम-आधारित वेब खोज इंजन से हमारे खोज इंजन को बदलने के लिए
इमेज के आधार पर, हम defaultToImageSearch
एट्रिब्यूट का इस्तेमाल कर सकते हैं.
सबसे पहले, आपको अपने सर्च इंजन के लिए कंट्रोल पैनल में इमेज सर्च की सुविधा चालू करनी होगी. सेटअप सेक्शन में, बेसिक जानकारी टैब में, "चालू है" में जाकर इमेज सर्च विकल्प पर क्लिक करें स्थिति. इसके बाद, अपनी वेबसाइट पर <div class="gcse-searchresults"></div>
एलिमेंट में defaultToImageSearch
एट्रिब्यूट जोड़ें.
<!-- अपना Programmable Search Engine आईडी यहां डालें -->
<script async src="https://cse.google.com/cse.js?cx=017643444788069204610:4gvhea_mvga"></script>
<!-- एट्रिब्यूट की वैल्यू को "सही" पर सेट करें या "गलत" -->
<div class="gcse-searchbox"></div>
<div class="gcse-searchresults" data-defaultToImageSearch="true"></div>
अब, किसी चीज़ को खोजने पर, 'इमेज सर्च' टैब डिफ़ॉल्ट तौर पर दिखता है.
वहां कई और विकल्प उपलब्ध हैं. Programmable Search Element Control API सेक्शन में, खोज के नतीजों को पसंद के मुताबिक बनाने के अन्य विकल्पों के बारे में जानें.
आगे बढ़ें...
अगले चरण पर जाएं.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThe search results element can be customized with additional options, such as switching to image-based results using the \u003ccode\u003edefaultToImageSearch\u003c/code\u003e attribute.\u003c/p\u003e\n"],["\u003cp\u003eTo enable image search, you need to activate it in the Control Panel for your search engine and then add the \u003ccode\u003edefaultToImageSearch\u003c/code\u003e attribute to the search results div element.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edefaultToImageSearch\u003c/code\u003e attribute, when set to "true", makes the image search tab the default view for search results.\u003c/p\u003e\n"],["\u003cp\u003eFurther customization options for search results can be found in the Programmable Search Element Control API documentation.\u003c/p\u003e\n"]]],[],null,["# Customizing Search Results\n\nIn a similar way to customizing search box, you can add additional options to the search results element.\n\nFor example, in order to change our search engine from webresults-based\nto image-based, we can utilize the `defaultToImageSearch` attribute.\n\nFirst of all, you need to enable Image Search in the [Control Panel](https://programmablesearchengine.google.com) for your search engine. In the **Setup** section, in **Basics** tab, click the **Image search** option into the \"on\" position. After that, add the `defaultToImageSearch` attribute to the `\u003cdiv class=\"gcse-searchresults\"\u003e\u003c/div\u003e` element on your website. \n\\\u003c!-- Insert your own Programmable Search Engine ID here --\\\u003e \\\u003cscript async src=\"https://cse.google.com/cse.js?cx=017643444788069204610:4gvhea_mvga\"\\\u003e\\\u003c/script\\\u003e \\\u003c!-- Try switching the attribute value to \"true\" or \"false\" --\\\u003e \n\n \u003cdiv class=\"gcse-searchbox\"\u003e\u003c/div\u003e\n \u003cdiv class=\"gcse-searchresults\" data-defaultToImageSearch=\"true\"\u003e\u003c/div\u003e\n\nNow, when you search for something, the image search tab is showing as a default.\n\nThere are many more options available. You can read about other search results customization options in [Programmable Search Element Control API](/custom-search/docs/element#supported_attributes) section.\n\nNext...\n-------\n\nContinue to [Next steps](/custom-search/docs/tutorial/nextsteps)."]]