网页结果数据API允许您执行自定义搜索,并直接从全球最广泛使用的搜索引擎获取详细结果。该API根据关键字或查询词提供结构化结果,返回数据如页面标题、描述摘要、直接链接、格式化URL、缩略图以及丰富内容如元数据、Open Graph标签和社交卡片(例如,Twitter Card)。
每个结果的类型为customsearch#result,包含诸如标题、摘要、链接、显示链接、格式化URL和HTML版本(htmlTitle、htmlSnippet、htmlFormattedUrl)等字段,允许您突出匹配项。此外,通过pagemap还可以获取视觉信息,您可以访问缩略图(cse_thumbnail)和特色图片(cse_image)。还可以获取有用的元信息,以便与社交平台集成,如og:image、og:title、og:description和twitter:card。
这使您能够在自己的平台上利用Google搜索的强大功能,显示准确且相关的结果,结构上可以准备好在网站、移动应用或仪表板上呈现。
要使用此端点,您必须在参数中指定一个关键字。
搜索 - 端点功能
| 对象 | 描述 |
|---|---|
q |
[必需] Enter a keyword |
[{"kind":"customsearch#result","title":"iPhone - Apple","htmlTitle":"<b>iPhone</b> - Apple","link":"https://www.apple.com/iphone/","displayLink":"www.apple.com","snippet":"Designed for Apple Intelligence. Discover the iPhone 16e along with iPhone 16 Pro, iPhone 16, and iPhone 15.","htmlSnippet":"Designed for Apple Intelligence. Discover the <b>iPhone</b> 16e along with <b>iPhone</b> 16 Pro, <b>iPhone</b> 16, and <b>iPhone</b> 15.","formattedUrl":"https://www.apple.com/iphone/","htmlFormattedUrl":"https://www.apple.com/<b>iphone</b>/","pagemap":{"cse_thumbnail":[{"src":"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQj-SXGzFcW9StliE3aB91xU1a0XEsshFTv9UVCoj5As7FKT4uCqQm9DQIP&s","width":"310","height":"163"}],"BreadcrumbList":[{}],"metatags":[{"analytics-s-bucket-1":"applestoreww","og:image":"https://www.apple.com/v/iphone/home/cc/images/meta/iphone__kqge21l9n26q_og.png?202507301724","analytics-s-bucket-0":"applestoreww","og:type":"website","twitter:card":"summary_large_image","og:site_name":"Apple","al:ios:app_name":"Apple Store","globalnav-store-key":"SFX9YPYY9PPXCU9KH","og:title":"iPhone","al:ios:url":"https://www.apple.com/us/xc/iphone?cid=AOS_ASA","og:description":"Designed for Apple Intelligence. Discover the iPhone 16e along with iPhone 16 Pro, iPhone 16, and iPhone 15.","al:ios:app_store_id":"375380948","analytics-s-channel":"iphone","twitter:site":"@Apple","analytics-s-page-tracking-data":"{\"eVar70\": \"android\"}","viewport":"width=device-width, initial-scale=1, viewport-fit=cover","ac:pricing-alias":"iphone-16-pro=IPHONE16PRO","og:locale":"en_US","ac:tradein-alias":"tradein-iphone12=slug:model_iphone_12","ssmvt-data":"[{\"experimentId\":\"f0e52d\",\"variationId\":\"C\"}]","position":"1","og:url":"https://www.apple.com/iphone/","analytics-track":"iphone - index/tab","analytics-s-bucket-2":"applestoreww"}],"cse_image":[{"src":"https://www.apple.com/v/iphone/home/cc/images/meta/iphone__kqge21l9n26q_og.png?202507301724"}]}},{"kind":"customsearch#result","title":"iPhone - Wikipedia","htmlTitle":"<b>iPhone</b> - Wikipedia","link":"https://en.wikipedia.org/wiki/IPhone","displayLink":"en.wikipedia.org","snippet":"The iPhone is a line of smartphones developed and marketed by Apple Inc. that run iOS, the company's own mobile operating system. The first-generation ...","htmlSnippet":"The <b>iPhone</b> is a line of smartphones developed and marketed by Apple Inc. that run iOS, the company's own mobile operating system. The first-generation ...","formattedUrl":"https://en.wikipedia.org/wiki/IPhone","htmlFormattedUrl":"https://en.wikipedia.org/wiki/<b>IPhone</b>","pagemap":{"metatags":[{"referrer":"origin","og:image":"https://upload.wikimedia.org/wikipedia/commons/thumb/d/d2/IPhone_16_Pro_Vector.svg/1200px-IPhone_16_Pro_Vector.svg.png","theme-color":"#eaecf0","og:image:width":"1200","og:type":"website","viewport":"width=device-width, initial-scale=1.0, user-scalable=yes, minimum-scale=0.25, maximum-scale=5.0","og:title":"iPhone - Wikipedia","og:image:height":"2461","format-detection":"telephone=no"}],"hproduct":[{"fn":"iPhone","url":"apple.com/iphone"}]}},{"kind":"customsearch#result","title":"Apple","htmlTitle":"Apple","link":"https://www.apple.com/","displayLink":"www.apple.com","snippet":"Discover the innovative world of Apple and shop everything iPhone, iPad, Apple Watch, Mac, and Apple TV, plus explore accessories, entertainment, ...","htmlSnippet":"Discover the innovative world of Apple and shop everything <b>iPhone</b>, iPad, Apple Watch, Mac, and Apple TV, plus explore accessories, entertainment, ...","formattedUrl":"https://www.apple.com/","htmlFormattedUrl":"https://www.apple.com/","pagemap":{"cse_thumbnail":[{"src":"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS3FXTmbGhhVYBuhbY47TyPnaxOcRIiP3DCX4V_6ZgKR65gR84sxFGhi2U&s","width":"310","height":"163"}],"metatags":[{"analytics-s-bucket-1":"applestoreww","analytics-s-bucket-0":"applestoreww","og:image":"https://www.apple.com/ac/structured-data/images/open_graph_logo.png?202110180743","og:type":"website","og:site_name":"Apple","globalnav-store-key":"SFX9YPYY9PPXCU9KH","og:title":"Apple","og:description":"Discover the innovative world of Apple and shop everything iPhone, iPad, Apple Watch, Mac, and Apple TV, plus explore accessories, entertainment, and expert device support.","analytics-s-channel":"homepage","viewport":"width=device-width, initial-scale=1, viewport-fit=cover","og:locale":"en_US","og:url":"https://www.apple.com/","analytics-track":"Apple - Index/Tab","analytics-s-bucket-2":"applestoreww"}],"cse_image":[{"src":"https://www.apple.com/ac/structured-data/images/open_graph_logo.png?202110180743"}]}},{"kind":"customsearch#result","title":"r/iPhone","htmlTitle":"r/<b>iPhone</b>","link":"https://www.reddit.com/r/iphone/","displayLink":"www.reddit.com","snippet":"r/iphone: Reddit's little corner for iPhone lovers (and some people who just mildly enjoy it…)","htmlSnippet":"r/<b>iphone</b>: Reddit's little corner for <b>iPhone</b> lovers (and some people who just mildly enjoy it…)","formattedUrl":"https://www.reddit.com/r/iphone/","htmlFormattedUrl":"https://www.reddit.com/r/<b>iphone</b>/","pagemap":{"cse_thumbnail":[{"src":"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSIdavNM8sk5fHPLXO2OdOBUBDBfHfnuGH6tXC7xcmo_xj1hy-QzHPqdBkx&s","width":"227","height":"222"}],"metatags":[{"og:image":"https://styles.redditmedia.com/t5_2qh2b/styles/communityIcon_ig9nr9020vnb1.jpg?format=pjpg&s=d099cbfa5c87f941a1e65a58a52a18047f151eaa","theme-color":"#000000","og:image:width":"256","og:type":"website","twitter:card":"summary","twitter:title":"r/iPhone","og:site_name":"Reddit","og:title":"r/iPhone","og:image:height":"256","bingbot":"noarchive","msapplication-navbutton-color":"#000000","og:description":"Reddit’s little corner for iPhone lovers (and some people who just mildly enjoy it…)","twitter:image":"https://styles.redditmedia.com/t5_2qh2b/styles/communityIcon_ig9nr9020vnb1.jpg?format=pjpg&s=d099cbfa5c87f941a1e65a58a52a18047f151eaa","apple-mobile-web-app-status-bar-style":"black","twitter:site":"@reddit","viewport":"width=device-width, initial-scale=1, viewport-fit=cover","apple-mobile-web-app-capable":"yes","og:ttl":"600","og:url":"https://www.reddit.com/r/iphone/"}],"cse_image":[{"src":"https://styles.redditmedia.com/t5_2qh2b/styles/communityIcon_ig9nr9020vnb1.jpg?format=pjpg&s=d099cbfa5c87f941a1e65a58a52a18047f151eaa"}]}},{"kind":"customsearch#result","title":"iPhone - Compare Models - Apple","htmlTitle":"<b>iPhone</b> - Compare Models - Apple","link":"https://www.apple.com/iphone/compare/","displayLink":"www.apple.com","snippet":"Compare features and technical specifications for iPhone 16 Pro, iPhone 16 Pro Max, iPhone 16, iPhone 16 Plus, iPhone 16e, and many more.","htmlSnippet":"Compare features and technical specifications for <b>iPhone</b> 16 Pro, <b>iPhone</b> 16 Pro Max, <b>iPhone</b> 16, <b>iPhone</b> 16 Plus, <b>iPhone</b> 16e, and many more.","formattedUrl":"https://www.apple.com/iphone/compare/","htmlFormattedUrl":"https://www.apple.com/<b>iphone</b>/compare/","pagemap":{"cse_thumbnail":[{"src":"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSz9B53KzVjxS16U0yhgM_oEv4pLw_kqLl228KDu8-lpeSAHg_DApm1AUQY&s","width":"310","height":"163"}],"BreadcrumbList":[{}],"metatags":[{"analytics-s-bucket-1":"applestoreww","og:image":"https://www.apple.com/v/iphone/compare/ai/images/meta/compare__0kr7oqqwknma_og.png?202507301724","analytics-s-bucket-0":"applestoreww","og:type":"website","og:site_name":"Apple","globalnav-store-key":"SFX9YPYY9PPXCU9KH","og:title":"iPhone - Compare Models","og:description":"Compare features and technical specifications for iPhone 16 Pro, iPhone 16 Pro Max, iPhone 16, iPhone 16 Plus, iPhone 16e, and many more.","analytics-s-channel":"iphone.tab+other","viewport":"width=device-width, initial-scale=1, viewport-fit=cover","ac-custom-local-desc-start":"Compare features and technical specifications for the","og:locale":"en_US","ac:tradein-alias":"tradein-iphone12=slug:model_iphone_12","position":"1","og:url":"https://www.apple.com/iphone/compare/","ac-custom-local-desc-end":"and many more.","analytics-track":"iphone - compare","analytics-s-bucket-2":"applestoreww"}],"cse_image":[{"src":"https://www.apple.com/v/iphone/compare/ai/images/meta/compare__0kr7oqqwknma_og.png?202507301724"}]}},{"kind":"customsearch#result","title":"iPhone Repair and Service - Apple Support","htmlTitle":"<b>iPhone</b> Repair and Service - Apple Support","link":"https://support.apple.com/iphone/repair","displayLink":"support.apple.com","snippet":"Need to repair your iPhone? See your service options, their costs by coverage type, and how long they take.","htmlSnippet":"Need to repair your <b>iPhone</b>? See your service options, their costs by coverage type, and how long they take.","formattedUrl":"https://support.apple.com/iphone/repair","htmlFormattedUrl":"https://support.apple.com/<b>iphone</b>/repair","pagemap":{"cse_thumbnail":[{"src":"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTdEyIxqj7ExppNkJKjZtJuqaGqgVBPzm3zYd6LUNtH7u-uJZtEqxfk3Mar&s","width":"263","height":"192"}],"Organization":[{"name":"Apple","telephone":"1-800-692-7753"}],"BreadcrumbList":[{}],"metatags":[{"og:type":"article","globalnav-search-field[locale]":"en_US","og:site_name":"Apple Support","globalnav-store-key":"S2A49YFKJF2JAT22K","og:title":"iPhone Repair and Service - Apple Support","globalnav-search-field[src]":"globalnav_support","globalnav-search-field[name]":"q","telephone":"1-800-692-7753","og:description":"Need to repair your iPhone? See your service options, their costs by coverage type, and how long they take.","globalnav-search-field[placeholder]":"Search Support","globalnav-search-field[action]":"https://support.apple.com/kb/index","viewport":"width=device-width, initial-scale=1, viewport-fit=cover","og:locale":"en_US","globalnav-search-field[type]":"organic","name":"Apple","globalnav-search-field[page]":"search"}]}},{"_note":"Response truncated for documentation purposes"}]
curl --location --request GET 'https://zylalabs.com/api/9165/web+result+data+api/16575/search?q=iphone' --header 'Authorization: Bearer YOUR_API_KEY'
| 标头 | 描述 |
|---|---|
授权
|
[必需] 应为 Bearer access_key. 订阅后,请查看上方的"您的 API 访问密钥"。 |
无长期承诺。随时升级、降级或取消。 免费试用包括最多 50 个请求。
该API返回来自Google的结构化搜索结果,包括标题、描述、URL、缩略图和丰富的信息,例如元数据和Open Graph标签。每个结果都经过格式化,以便于集成到应用程序中
响应中的关键字段包括标题 摘要 链接 显示链接 格式化网址和HTML版本(html标题 html摘要 html格式化网址)这些字段有效地帮助突出搜索匹配
响应数据被组织为一个结果数组,每个结果包含标题 摘要 和链接等字段 此外 视觉元素被包含在页面地图中 提供缩略图和特色图像
API提供的信息包括页面标题 描述片段 直接链接 格式化的URL 缩略图以及丰富的内容如Open Graph和Twitter Card元数据 增强搜索结果的上下文
GET搜索端点的主要参数是关键字或查询词 用户可以通过指定不同的关键字来自定义他们的请求以获取相关的搜索结果
用户可以利用返回的数据在网站或应用程序上显示搜索结果 结构化格式便于集成 使得高亮匹配和显示丰富媒体等功能成为可能
典型的用例包括增强网站搜索功能 创建带有实时搜索结果的仪表板以及将搜索功能集成到移动应用中以改善用户体验
数据准确性通过使用谷歌的搜索算法得以保持,这些算法不断更新和优化搜索结果 该API反映了来自谷歌的最新信息,确保相关性和可靠性
服务级别:
97%
响应时间:
1,934ms
服务级别:
100%
响应时间:
4,368ms
服务级别:
100%
响应时间:
141ms
服务级别:
100%
响应时间:
5,660ms
服务级别:
100%
响应时间:
3,290ms
服务级别:
100%
响应时间:
1,247ms
服务级别:
100%
响应时间:
3,415ms
服务级别:
100%
响应时间:
1,778ms
服务级别:
100%
响应时间:
427ms
服务级别:
100%
响应时间:
724ms