google custom search api 申请注册 cx key
目录
1.建立Custom Search Engine
2.到API key网站 获取 api key
3.测试 api key 搜索
4.搜索参数列表
1.建立Custom Search Engine
得到search engine ID,必须先建立 Custom Search Engine。
我们连到Custom Search Engine control panel 建立Search Engine。
https://cse.google.com/cse/all
取得Search Engine ID , 把值复制下来
2.到API key网站 获取 api key
https://developers.google.com/custom-search/v1/overview
取得API key
3.测试 api key 搜索
有了search engine ID & API key,我们将可采用以下网址搜寻Google 上丰富资料。
网址至少要包含以下三个参数:
key: API key
cx: search engine ID
q: 搜寻的文字
接下来我们就可以在浏览器输入要查询的资料,之后就可以在App中放入查询的API
get 搜索 实例:
https://www.googleapis.com/customsearch/v1?key=INSERT_YOUR_API_KEY&cx=017576662512468239146:omuauf_lfve&q=lectures
其中 INSERT_YOUR_API_KEY 换成自己 api key
4.搜索参数列表
原文链接:https://developers.google.com/custom-search/v1/reference/rest/v1/cse/list
Parameters | |
---|---|
c2coff
|
Enables or disables Simplified and Traditional Chinese Search. The default value for this parameter is 0 (zero), meaning that the feature is enabled. Supported values are:
|
cr
|
Restricts search results to documents originating in a particular country. You may use Boolean operators in the cr parameter's value. Google Search determines the country of a document by analyzing:
See the Country Parameter Values page for a list of valid values for this parameter. |
cx
|
The Programmable Search Engine ID to use for this request. |
dateRestrict
|
Restricts results to URLs based on date. Supported values include:
|
exactTerms
|
Identifies a phrase that all documents in the search results must contain. |
excludeTerms
|
Identifies a word or phrase that should not appear in any documents in the search results. |
fileType
|
Restricts results to files of a specified extension. A list of file types indexable by Google can be found in Search Console Help Center. |
filter
|
Controls turning on or off the duplicate content filter.
Acceptable values are:
|
gl
|
Geolocation of end user.
|
googlehost
|
Deprecated. Use the The local Google domain (for example, google.com, google.de, or google.fr) to use to perform the search. |
highRange
|
Specifies the ending value for a search range.
|
hl
|
Sets the user interface language.
|
hq
|
Appends the specified query terms to the query, as if they were combined with a logical AND operator. |
imgColorType
|
Returns black and white, grayscale, transparent, or color images. Acceptable values are:
|
imgDominantColor
|
Returns images of a specific dominant color. Acceptable values are:
|
imgSize
|
Returns images of a specified size. Acceptable values are:
|
imgType
|
Returns images of a type. Acceptable values are:
|
linkSite
|
Specifies that all search results should contain a link to a particular URL. |
lowRange
|
Specifies the starting value for a search range. Use |
lr
|
Restricts the search to documents written in a particular language (e.g., Acceptable values are:
|
num
|
Number of search results to return.
|
orTerms
|
Provides additional search terms to check for in a document, where each document in the search results must contain at least one of the additional search terms. |
q
|
Query |
relatedSite
|
Specifies that all search results should be pages that are related to the specified URL. |
rights
|
Filters based on licensing. Supported values include: |
safe
|
Search safety level. Acceptable values are:
|
searchType
|
Specifies the search type: Acceptable values are:
|
siteSearch
|
Specifies a given site which should always be included or excluded from results (see |
siteSearchFilter
|
Controls whether to include or exclude results from the site named in the Acceptable values are:
|
sort
|
The sort expression to apply to the results. The sort parameter specifies that the results be sorted according to the specified expression i.e. sort by date. Example: sort=date. |
start
|
The index of the first result to return. The default number of results per page is 10, so |
google custom search api 申请注册 cx key相关推荐
- 使用Google Custom Search打造站内搜索
链接: Google AJAX 搜索 API 参考: http://www.google.com/cse/docs/cref.html?hl=zh-CN http://www.google.com/c ...
- 第 9 部分: 使用 Google Ajax Search API
发出异步请求并不意味着只是与您自己的服务器端程序交互.其实也可以与一些公共 API,例如来自 Google 或 Amazon 的 API 进行通信,从而为 Web 应用程序增加您自己的脚本和服务器端程 ...
- 谷歌 Google Custom Search 站内搜索功能
谷歌 Google Custom Search 站内搜索功能 一. 进入设置网址 https://cse.google.com 二. 登入谷歌账号,没有的需申请 三. 新增搜索引擎,添加网址 点击创建 ...
- Google Ajax Search 参考
Google AJAX Search API参考 Google AJAX Search API是一种允许您设置Google查寻到您的网页和其他 Web应用程序上的Javascript类库.要使用API ...
- Google AJAX 搜索 API
链接: 使用Google Custom Search打造站内搜索 文档:http://code.google.com/intl/zh-CN/apis/websearch/docs/ <!DOCT ...
- 掌握AJAX, 第 9部分: 运用Google Ajax搜索API
掌握AJAX, 第 9部分: 运用Google Ajax搜索API 本系列英文链接:http://www-128.ibm.com/developerworks/views/web/libraryvie ...
- Google Book Search APIs——谷歌图书搜索API
Getting Started Guide 你可以在自己的网站或应用程序中使用图书搜索API.例如,Data API使你可以执行一个通常用户能过在图书搜索网站上允许执行的大部分操作.使用JavaScr ...
- 申请Google Map Android API Key
http://www.iteye.com/topic/1111863 要想使用Google的Map服务编写应用,无论是Google Map API和Google Map Android API都需要申 ...
- 带有serpstack的实时Google搜索结果API
SERP stands for Search Engine Results Page. serpstack is an API that queries the result page of sear ...
最新文章
- AIProCon在线大会笔记之华为涂丹丹:华为云EI,行业智能化升级新引擎
- 并发(concurrency)和并行(parallellism)
- Nginx反向代理实现负载均衡web集群
- 认识与防御XSS攻击
- vue-quasar-admin 一个包含通用权限控制的后台管理系统
- C语言生命游戏源代码
- 电商平台微服Dubbox实战,实现高并发抢购
- JS提升:Promise中reject与then之间的关系
- 001_扎马步_初识hadoop
- lisp 焊接符号标注_焊接符号标注及表示方法
- 什么品牌蓝牙耳机音质好?2020蓝牙耳机排行榜10强!
- (可能是)最后一次参加同学婚礼了
- mysql 父子排序_mysql 父子结构排序
- Ubuntu安装软件时报错(报错:dpkg: 处理软件包 xxx (--configure)时出错: 依赖关系问题 - 仍未被配置)
- 证券交易api 查询证券编码及基本上市信息
- 在网页中如何定义鼠标的样式
- 微信小程序中定位报错在app.json中声明permission字段
- SAP PP配置详解之六:物料需求计划
- alsa 添加codec
- CKA考试习题:存储管理-普通卷、PV、PVC
热门文章
- 从硬盘上装xp手记(2005.8.14 )
- 李战java_李战:悟透JavaScript
- python数据可视化库 动态的_python --数据可视化(一)
- 数据中心网络架构 — 云数据中心网络 — 二层架构设计示例
- Linux 虚拟化网络技术 — KVM + Linux Bridge 的网络虚拟化解决方案
- Openstack组建部署 — Environment of Controller Node
- 实体类中用基本类型好,还是用包装类型
- XSZD00982 流向屏闭
- 什么是事务(transaction)?它有什么好处
- Docker1.12.1之swarm集群搭建与使用