简介
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
欢迎!本教程将在短短几分钟内帮助您创建自定义搜索。本教程介绍如何使用预定义的 JavaScript widget 实现简单的可编程搜索引擎。如需更精细地控制搜索结果,请参阅开发者指南中的 JSON 和 XML API。
在本教程中,您将学习如何完成以下操作:
- 构建一个简单的可编程搜索引擎
- 在网页上实施搜索框
- 向搜索框添加功能
- 自定义搜索结果的外观和风格
在本教程结束时,您已使用免费版本的可编程搜索引擎在网站上实现搜索功能,搜索一组预定义的网站。
下一个...
首先,您需要创建一个可编程搜索引擎实例。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThis tutorial provides a step-by-step guide to implementing a basic Programmable Search Engine using a pre-built JavaScript widget.\u003c/p\u003e\n"],["\u003cp\u003eYou will learn how to build a search engine, integrate it into your webpage, enhance its functionality, and customize its appearance.\u003c/p\u003e\n"],["\u003cp\u003eUpon completion, you will have a functional search feature on your website, searching across a predefined set of websites using the free version of Programmable Search Engine.\u003c/p\u003e\n"],["\u003cp\u003eFor advanced customization and control over search results, refer to the JSON and XML API documentation in the Developer Guide.\u003c/p\u003e\n"]]],[],null,["# Introduction\n\nWelcome! This tutorial will help you create a customized search in just a few\nminutes. This tutorial explains how to implement a simple Programmable Search Engine\nusing a predefined javascript widget. For more fine-grained control over search\nresults, see JSON and XML API in the\n[Developer Guide](/custom-search/v1/overview).\n\nIn this tutorial, you will learn how to:\n\n- build a simple Programmable Search Engine\n- implement a search box on your page\n- add features to the search box\n- customize the look and feel of your search results\n\nBy the end of the tutorial, you will have implemented a search feature on a website, searching a predefined set of sites, using the free version of Programmable Search Engine.\n\nNext...\n-------\n\nTo get started, you need to [create an instance of a Programmable Search Engine](/custom-search/docs/tutorial/creatingcse)."]]