Google Search – Ultra-Fast, Structured Google Search API
收藏Google Search – Ultra-Fast, Structured Google Search API 数据集概述
基本概况
- API名称: Google Search – Ultra-Fast, Structured Google Search API
- 提供商: RainAPI
- 类别: Search
- 版本: 1.0.0 (current)
- 订阅计划:
- BASIC: $0.00 / mo
- PRO: $15.00 / mo
- ULTRA: $40.00 / mo
- MEGA: $100.00 / mo
性能指标
- 流行度: 9.3
- 服务等级: 99%
- 延迟: 48ms
主要特性
- 超快性能: 在竞争对手中提供最低延迟,由Cloudflare全球边缘网络提供支持。
- 干净、结构化数据: 以一致的JSON格式接收搜索结果,包括标题、链接、片段和网站图标。
- 全球覆盖: 支持30多个国家,包括美国、英国、加拿大、澳大利亚、德国、法国、意大利、日本、巴西、印度等。
- 语言过滤: 支持30多种语言的搜索结果过滤。
- 基于时间的过滤: 按最近时间(天、周、月、年)过滤结果。
- 分页支持: 通过简单的页面参数轻松浏览搜索结果。
- 一致的网站图标交付: 所有网站图标均通过我们的网络提供,以确保外观和品牌一致。
- 慷慨的速率限制: 设计用于生产用途,具有稳定、可预测的配额。
使用案例
- 将搜索功能集成到您的网站或应用程序中。
- 构建具有多样化来源的内容聚合平台。
- 开发需要广泛搜索功能的研究工具。
- 创建用于跟踪搜索排名的SEO分析解决方案。
- 实施竞争情报工具。
- 为新闻聚合服务提供最新内容。
端点信息
- 端点:
GET https://google-search-ultra-fast-structured-google-search-api.p.rapidapi.com/search
查询参数
| 参数 | 是否必需 | 描述 | 示例 |
|---|---|---|---|
| q | 是 | 搜索查询 | q=scarlet+macaw |
| country | 否 | 地区特定结果的国家代码 | country=us |
| language | 否 | 语言特定结果的语言代码 | language=en |
| lastUpdated | 否 | 时间过滤器(d=天,w=周,m=月,y=年) | lastUpdated=w |
| page | 否 | 分页的页码 | page=2 |
响应格式
json { "results": [ { "rank": 1, "link": "https://example.com", "title": "Example Website Title", "snippet": "This is a preview snippet of the search result...", "favicon": "https://rainapi-google-search.ofc.workers.dev/favicon/YnlPbn..." } ] }
支持的国家
| 国家代码 | 国家名称 |
|---|---|
| (empty) | Default / Global |
| ar | Argentina |
| au | Australia |
| at | Austria |
| be | Belgium |
| br | Brazil |
| ca | Canada |
| cl | Chile |
| cn | China |
| dk | Denmark |
| fi | Finland |
| fr | France |
| de | Germany |
| hk | Hong Kong |
| in | India |
| id | Indonesia |
| it | Italy |
| jp | Japan |
| kr | South Korea |
| my | Malaysia |
| mx | Mexico |
| nl | Netherlands |
| nz | New Zealand |
| no | Norway |
| ph | Philippines |
| pl | Poland |
| pt | Portugal |
| ru | Russia |
| sa | Saudi Arabia |
| za | South Africa |
| es | Spain |
| se | Sweden |
| ch | Switzerland |
| tw | Taiwan |
| tr | Turkey |
| uk | United Kingdom |
| us | United States |
支持的语言
| 语言代码 | 语言名称 |
|---|---|
| (empty) | Default / Automatic |
| ar | Arabic |
| bg | Bulgarian |
| ca | Catalan |
| zh-hans | Chinese (Simplified) |
| zh-hant | Chinese (Traditional) |
| hr | Croatian |
| cs | Czech |
| da | Danish |
| nl | Dutch |
| en | English |
| et | Estonian |
| fi | Finnish |
| fr | French |
| de | German |
| he | Hebrew |
| hu | Hungarian |
| is | Icelandic |
| it | Italian |
| jp | Japanese |
| ko | Korean |
| lv | Latvian |
| lt | Lithuanian |
| nb | Norwegian Bokmål |
| pl | Polish |
| pt | Portuguese |
| ro | Romanian |
| ru | Russian |
| sr | Serbian |
| sk | Slovak |
| sl | Slovenian |
| es | Spanish |
| sv | Swedish |
| tr | Turkish |
示例代码片段
cURL
bash curl --request GET --url https://google-search-ultra-fast-structured-google-search-api.p.rapidapi.com/search?q=artificial%20intelligence&country=us&language=en&lastUpdated=w --header X-RapidAPI-Host: google-search-ultra-fast-structured-google-search-api.p.rapidapi.com --header X-RapidAPI-Key: YOUR_RAPIDAPI_KEY
Python
python import requests
url = "https://google-search-ultra-fast-structured-google-search-api.p.rapidapi.com/search"
querystring = { "q": "artificial intelligence", "country": "us", "language": "en", "lastUpdated": "w" }
headers = { "X-RapidAPI-Host": "google-search-ultra-fast-structured-google-search-api.p.rapidapi.com", "X-RapidAPI-Key": "YOUR_RAPIDAPI_KEY" }
response = requests.get(url, headers=headers, params=querystring) print(response.json())
JavaScript (Fetch)
javascript const options = { method: GET, headers: { X-RapidAPI-Host: google-search-ultra-fast-structured-google-search-api.p.rapidapi.com, X-RapidAPI-Key: YOUR_RAPIDAPI_KEY } };
fetch(https://google-search-ultra-fast-structured-google-search-api.p.rapidapi.com/search?q=artificial%20intelligence&country=us&language=en&lastUpdated=w, options) .then(response => response.json()) .then(data => console.log(data)) .catch(err => console.error(err));
Node.js (Axios)
javascript const axios = require(axios);
const options = { method: GET, url: https://google-search-ultra-fast-structured-google-search-api.p.rapidapi.com/search, params: { q: artificial intelligence, country: us, language: en, lastUpdated: w }, headers: { X-RapidAPI-Host: google-search-ultra-fast-structured-google-search-api.p.rapidapi.com, X-RapidAPI-Key: YOUR_RAPIDAPI_KEY } };
axios.request(options) .then(function (response) { console.log(response.data); }) .catch(function (error) { console.error(error); });
Java
java import java.io.IOException; import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse;
public class Main { public static void main(String[] args) throws IOException, InterruptedException { HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://google-search-ultra-fast-structured-google-search-api.p.rapidapi.com/search?q=artificial%20intelligence&country=us&language=en&lastUpdated=w")) .header("X-RapidAPI-Host", "google-search-ultra-fast-structured-google-search-api.p.rapidapi.com") .header("X-RapidAPI-Key", "YOUR_RAPIDAPI_KEY") .method("GET", HttpRequest.BodyPublishers.noBody()) .build();
HttpResponse response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
Go
go package main
import ( "fmt" "net/http" "io/ioutil" )
func main() { url := "https://google-search-ultra-fast-structured-google-search-api.p.rapidapi.com/search?q=artificial%20intelligence&country=us&language=en&lastUpdated=w"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-RapidAPI-Host", "google-search-ultra-fast-structured-google-search-api.p.rapidapi.com")
req.Header.Add("X-RapidAPI-Key", "YOUR_RAPIDAPI_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
PHP
php <?php $curl = curl_init();
curl_setopt_array($curl, [ CURLOPT_URL => "https://google-search-ultra-fast-structured-google-search-api.p.rapidapi.com/search?q=artificial%20intelligence&country=us&language=en&lastUpdated=w", CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "X-RapidAPI-Host: google-search-ultra-fast-structured-google-search-api.p.rapidapi.com", "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" ], ]);
$response = curl_exec($curl); $err = curl_error($curl);
curl_close($curl);
if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ?>



