سفارشی کردن قطعات نتایج
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
این صفحه نحوه سفارشی کردن قطعات نتیجه را برای وب سایت خود توضیح می دهد. برای ارائه قطعه های سفارشی شده خود، باید داده های ساختاریافته را به صفحات وب خود اضافه کنید.
- بررسی اجمالی
- ایجاد ریچ اسنیپت با عنصر جستجوی قابل برنامه ریزی
- بررسی سایر ویژگی ها
بررسی اجمالی
موتور جستجوی قابل برنامه ریزی به کاربران کمک می کند تا صفحه مناسب را با نشان دادن یک قطعه به آنها بیابند—نمونه کوچکی از محتوا که به کاربران جستجو ایده ای از آنچه در صفحه وب است می دهد. برای کسب اطلاعات بیشتر در مورد اسنیپت ها، به پست وبلاگ Webmaster Central در مورد آناتومی یک نتیجه جستجو مراجعه کنید. اگر قطعههای استاندارد ایجاد شده توسط الگوریتم موتور جستجوی برنامهپذیر را دوست ندارید، میتوانید قطعههای خود را ایجاد کنید. میتوانید اطلاعات کلیدی - مانند ریز عکسها، خلاصهها، تاریخها، تألیف، رتبهبندیها و قیمتها - را مستقیماً در قطعههای خود به نمایش بگذارید. داشتن مرتبطترین اطلاعات در نتایج جستجو، صفحات وب سایت شما را برای کاربران جذابتر میکند.
شکلهای زیر روشهای مختلفی را نشان میدهند که میتوانید قطعهها را در نتایج جستجوی خود سفارشی کنید.
شکل 1: قطعه نتیجه با رتبه بندی، محدوده قیمت و بررسی.

شکل 2: قطعه نتیجه با قالب بندی، پیوندها، تصویر و اطلاعات مقایسه ای.

شکل 3: قطعه نتیجه شامل انواع سند، نویسندگان، نماهای صفحه و نظرات است.

شکل 4: قطعه نتیجه با قالب بندی غنی که دسترسی چند رسانه ای و دکمه ها را فراهم می کند ("افزودن به سبد خرید").

بازگشت به بالا
ایجاد ریچ اسنیپت با عنصر جستجوی قابل برنامه ریزی
اساساً ایجاد ریچ اسنیپت شامل مراحل زیر است:
- داده های ساختار یافته را در صفحات وب خود ارائه دهید.
هنگامی که موتور جستجوی برنامه پذیر صفحات وب شما را نمایه می کند، متادیتا را شناسایی و حفظ می کند.
- آن داده های ساختار یافته را در نتایج جستجو برای موتور جستجوی قابل برنامه ریزی خود واکشی کنید.
سرور موتور جستجوی قابل برنامه ریزی می تواند نتایج جستجو را به همراه داده های ساختاریافته در قالب JSON برگرداند.
- یک لایه ارائه ایجاد کنید تا داده های ساخت یافته را به HTML فرمت شده تبدیل کنید.
لایه ارائه مجموعه ای از کدها (مانند جاوا اسکریپت، PHP، JSP و ASP) است که داده های خام را به فرمتی تبدیل می کند که به کاربر نمایش داده می شود. در مورد موتور جستجوی قابل برنامه ریزی، می توانید:
- از عنصر جستجوی قابل برنامه ریزی برای تبدیل خروجی JSON برای ارائه به کاربر استفاده کنید.
- لایه ارائه سفارشی خود را بنویسید که دادههای JSON را به HTML تبدیل میکند که با استفاده از جستجوی عنصر جستجو به کاربر نهایی ارائه میشود.
استخراج دادههای ساختاریافته با جزئیات بیشتری در صفحه دادههای ساختاریافته مستند شده است و ایجاد یک لایه ارائه با عنصر جستجوی قابل برنامهریزی با جزئیات بیشتری در صفحه عنصر جستجوی برنامهپذیر مستند شده است.
بازگشت به بالا
بررسی سایر ویژگی ها
قطعات سفارشی با چندین ویژگی دیگر موتور جستجوی قابل برنامه ریزی به خوبی کار می کند:
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eProgrammable Search Engine allows you to customize result snippets to showcase key information like images, summaries, and ratings, making your site's search results more compelling.\u003c/p\u003e\n"],["\u003cp\u003eTo create custom snippets, you need to add structured data to your webpages, which Programmable Search Engine uses to generate rich snippets.\u003c/p\u003e\n"],["\u003cp\u003eThe Programmable Search Element can be utilized to easily transform the structured data into formatted HTML for display in search results.\u003c/p\u003e\n"],["\u003cp\u003eYou can further enhance your search results by exploring features like Drilling Deeper into Search Results and Providing Structured Data.\u003c/p\u003e\n"]]],[],null,["# Customizing Results Snippets\n\nThis page describes how to customize the result snippets for your own website. To render your customized snippets, you must add structured data to your webpages.\n\n1. [Overview](#overview)\n2. [Creating Rich Snippets with the Programmable Search Element](#creating_snippets)\n3. [Exploring Other Features](#next)\n\nOverview\n--------\n\nProgrammable Search Engine helps users find the right page by showing them a snippet---a small sample of content that gives search users an idea of what's in the webpage. To learn more about snippets, see the Webmaster Central [blog post](http://googlewebmastercentral.blogspot.com/2007/11/anatomy-of-search-result.html) on the anatomy of a search result. If you do not like the standard snippets created by the Programmable Search Engine algorithm, you can create your own snippets. You can showcase key information---such as image thumbnails, summaries, dates, authorship, ratings, and prices---directly in your snippets. Having the most relevant information in your search results makes the webpages in your site more compelling to your users.\n\nThe following figures demonstrate various ways you can customize the snippets in your search results.\n\n**Figure 1:** Result snippet with rating, price range, and review.\n\n**Figure 2:** Result snippet with formatting, links, image, and comparative information.\n\n**Figure 3:** Result snippet that includes document types, authors, page views, and comments.\n\n**Figure 4:** Richly formatted result snippet that provides multimedia access and buttons (\"ADD TO CART\").\n\n[Back to top](#top)\n\nCreating Rich Snippets with the Programmable Search Element\n-----------------------------------------------------------\n\nEssentially, creating rich snippets involves the following steps:\n\n1. Provide [structured data](/custom-search/docs/structured_data) in your webpages.\n\n When Programmable Search Engine is indexing your webpages, it recognizes and preserves\n the metadata.\n2. Fetch that structured data in the search results for your Programmable Search Engine. The Programmable Search Engine server can return the search results, along with the\n structured data in JSON format.\n\n3. Create a presentation layer to transform the structured data into formatted HTML. A presentation layer is a set of code (such as JavaScript, PHP,\n JSP and ASP) that transforms the raw data into a format that is displayed\n to the user. In the case of Programmable Search Engine, you can:\n\n - Use the [Programmable Search Element](/custom-search/docs/element) to transform JSON output for presentation to the user.\n - Write your own custom presentation layer that transforms JSON data to HTML that is presented to the end user using Search Element [Callbacks](/custom-search/docs/element#search-time-callbacks)\n\n\nStructured data extraction is documented in more detail in the\n[Structured Data](/custom-search/docs/structured_data) page, and creating a presentation\nlayer with the Programmable Search Element is documented in more detail at the\n[Programmable Search Element](https://developers.google.com/custom-search/docs/element) page.\n\n[Back to top](#top)\n\nExploring Other Features\n------------------------\n\n\nCustom Snippets works well with several other Programmable Search Engine features:\n\n- If you want to learn more about changing the order of your results, see [Drilling Deeper into Search Results](/custom-search/docs/structured_search).\n- If you want to learn more about what structured data Google supports, see [Providing Structured Data](/custom-search/docs/structured_data).\n- If you want to learn more about the Programmable Search Element, see [Programmable Search Element documentation](https://developers.google.com/custom-search/docs/element)."]]