OhMyGPT API
English
  • 中文
  • English
  • 日本語
OhMyGPT
OhMyGPT
English
  • 中文
  • English
  • 日本語
  1. search
  • Introduction to this site
  • Change log
  • OpenAI
    • Responses
      • Create model response
      • Get model response
      • Delete model response
      • Cancel response
      • List input items
    • Conversations
      • create conversation
      • Retrieve conversation
      • update conversation
      • delete conversation
      • Create items
      • list items
      • Retrieve item
      • Delete item
    • create completion
      POST
    • TTS text to speech
      POST
    • Embeddings
      POST
    • image generation
      POST
    • image editing
      POST
  • Store
    • List chat completions
      POST
    • Get chat completed
      POST
    • Deletion of chat completed
      POST
  • Claude
    • Anthropic native Completions enterprise commercial API
      POST
    • Anthropic native Messages API
      POST
    • Anthropic native Messages Token Count API
      POST
  • OAuth开放API
    • Introduction to Open OAuth API
    • User authorization page
      GET
    • Code display page
      GET
    • Apply for access_token
      POST
    • Read basic user information
      POST
    • Read user balance information
      POST
    • Charge user fees
      POST
    • Create a Stripe Checkout recharge order for the user
      POST
    • Create a Stripe Invoice recharge order for the user
      POST
    • Call other open APIs
      POST
    • Read user management token through OAuth Token
      POST
    • Update user management token through OAuth Token
      POST
  • other
    • search
      • Google Custom Search API
        GET
      • Google Search By Serper
        POST
    • Azure
      • Azure text-to-speech
      • Azure gets TTS voice list
  • Override rules
    • Create rules
    • Update rules
    • delete rule
    • Get rules
    • list rules
    • Batch enable/disable
    • Copy rules
    • test rules
    • Get statistics
    • Get restriction configuration
    • Check rule name
    • Batch delete
    • Export rules
    • Import rules
  • image generation
    • other
      • ND image generation API
    • Flux
      • Flux Schnell image generation
      • Flux Dev image generation
      • Flux Pro image generation
      • Flux Pro 1.1 image generation
      • Flux 1.1 Pro Ultura image generation
  • Storage service
    • File storage service
    • File upload
    • File information update
    • Delete files
    • User query (pagination)
    • User metadata query (by fileUinqueIds)
    • File download interface (Public file download)
    • File download interface (Private private file download)
    • Obtain public file metadata
  • API KEY management
    • Create new API Key
    • Modify API Key information
    • Query all API Keys of the user
    • Delete the specified API Key
    • Interface for querying user membership expiration date
    • User balance query interface
    • Query the current model magnification interface
  • Archive documents
    • Self-service invoicing system usage documentation
    • Telegram Bot usage documentation
    • Self-built Cloudflare Worker anti-generation tutorial
    • Claude Code forwarding service
    • CodeX forwarding service
    • Introduction to the new website
  • Model list
    GET
  1. search

Google Custom Search API

line1
https://cn2us02.opapi.win
line1
https://cn2us02.opapi.win
GET
/api/v1/openapi/search/google-search/v1

Google Custom Search API#

In order to facilitate developers to integrate Google search capabilities into your projects, and to pave the way for the next launch of networked LLM services, Google's official search API forwarding service is now launched. You can now call the near-original Google Custom Search JSON API directly from our site.

Main features#

Compatibility: Call the official Google Custom Search API directly on this site. In theory, it can be directly compatible with original programs that support Google Search API.
Cost Efficiency: The cache function of query results is provided by default, thereby reducing usage costs and improving query efficiency.
Applicability: Pave the way for the next step of networking functions of large language models.

Precautions for use#

Compared with the official original API, there are the following differences:
1.
key parameter (optional):
This parameter corresponds to the APIKey you obtained on the "Settings" page of this site.
If you directly put your Key in the request header using the Bearer specification, this parameter can be omitted.
2.
cache parameter (optional):
In order to reduce usage costs, the cache function of query results is provided by default.
By default, cached results within 3 days are considered valid under the same query conditions.
Your request will not be charged when it hits the cache.
The parameter can be defaulted. Setting it to 0 means disabling caching. The minimum value is 0 and the maximum value is 30.
3.
cx parameter (optional):
By default this parameter will be set to 73d45d507c0b2430e.
Can be defaulted, it is recommended to default or fill in this value.
Different cx values ​​also affect cache hits.
Except for the above, the functions and usage of other parameters are exactly the same (Tip: The q parameter is the query parameter, it is required, just put the keywords in and you can check it.)
Curl example
##Official documentation
Google official development documentation: Google Custom Search API
Google official parameter description document: API parameter description

Pricing#

Successful queries that miss the cache: 1500 tokens/time
Queries that hit cache: FREE

请求参数

Query 参数

返回响应

🟢200success
application/json
Body

请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request GET 'https://cn2us02.opapi.win/api/v1/openapi/search/google-search/v1?key=&q=什么是芝士雪豹'
响应示例响应示例
{
    "kind": "customsearch#search",
    "url": {
        "type": "application/json",
        "template": "https://www.googleapis.com/customsearch/v1?q={searchTerms}&num={count?}&start={startIndex?}&lr={language?}&safe={safe?}&cx={cx?}&sort={sort?}&filter={filter?}&gl={gl?}&cr={cr?}&googlehost={googleHost?}&c2coff={disableCnTwTranslation?}&hq={hq?}&hl={hl?}&siteSearch={siteSearch?}&siteSearchFilter={siteSearchFilter?}&exactTerms={exactTerms?}&excludeTerms={excludeTerms?}&linkSite={linkSite?}&orTerms={orTerms?}&dateRestrict={dateRestrict?}&lowRange={lowRange?}&highRange={highRange?}&searchType={searchType}&fileType={fileType?}&rights={rights?}&imgSize={imgSize?}&imgType={imgType?}&imgColorType={imgColorType?}&imgDominantColor={imgDominantColor?}&alt=json"
    },
    "queries": {
        "request": [
            {
                "title": "Google Custom Search - 什么是芝士雪豹",
                "totalResults": "73900",
                "searchTerms": "什么是芝士雪豹",
                "count": 10,
                "startIndex": 1,
                "inputEncoding": "utf8",
                "outputEncoding": "utf8",
                "safe": "off",
                "cx": "73d45d507c0b2430e"
            }
        ],
        "nextPage": [
            {
                "title": "Google Custom Search - 什么是芝士雪豹",
                "totalResults": "73900",
                "searchTerms": "什么是芝士雪豹",
                "count": 10,
                "startIndex": 11,
                "inputEncoding": "utf8",
                "outputEncoding": "utf8",
                "safe": "off",
                "cx": "73d45d507c0b2430e"
            }
        ]
    },
    "context": {
        "title": "DogeNet Search"
    },
    "searchInformation": {
        "searchTime": 0.335479,
        "formattedSearchTime": "0.34",
        "totalResults": "73900",
        "formattedTotalResults": "73,900"
    },
    "items": [
        {
            "kind": "customsearch#result",
            "title": "芝士雪豹是什么梗? - narita 的回答- 知乎",
            "htmlTitle": "<b>芝士雪豹</b>是什么梗? - narita 的回答- 知乎",
            "link": "https://www.zhihu.com/question/548907903/answer/2633304852",
            "displayLink": "www.zhihu.com",
            "snippet": "Aug 17, 2022 ... 芝士雪豹原为丁真在参与的节目中说的一段话:“这是雪豹。”由于其普通话不够标准,导致听起来像“芝士雪豹”,最后被贴吧网友和丁真宇宙表情包爱好者发扬光大 ...",
            "htmlSnippet": "Aug 17, 2022 <b>...</b> <b>芝士雪豹</b>原为丁真在参与的节目中说的一段话:“这是<b>雪豹</b>。”由于其普通话不够标准,导致听起来像“<b>芝士雪豹</b>”,最后被贴吧网友和丁真宇宙表情包爱好者发扬光大&nbsp;...",
            "cacheId": "zEVGX2_7RHwJ",
            "formattedUrl": "https://www.zhihu.com/question/548907903/answer/2633304852",
            "htmlFormattedUrl": "https://www.zhihu.com/question/548907903/answer/2633304852",
            "pagemap": {
                "question": [
                    {
                        "commentcount": "4",
                        "keywords": "抖音,豹猫,雪豹,理塘丁真,芝士雪豹",
                        "answercount": "177",
                        "datemodified": "2022-08-18T17:33:19.000Z",
                        "name": "芝士雪豹是什么梗?",
                        "datecreated": "2022-08-18T02:23:20.000Z",
                        "text": "芝士雪豹,原为一次丁真在参与的节目中因普通话不标准而被网友空耳描述的谐音梗,但随着近期的抖音直播PK,芝士雪豹已不仅仅作为一个谐音梗出...",
                        "url": "https://www.zhihu.com/question/548907903"
                    }
                ],
                "answer": [
                    {
                        "upvotecount": "727",
                        "commentcount": "65",
                        "datemodified": "2022-08-22T12:18:16.000Z",
                        "datecreated": "2022-08-18T10:54:16.000Z",
                        "text": "简述:芝士雪豹原为丁真在参与的节目中说的一段话:“这是雪豹。”由于其普通话不够标准,导致听起来像“芝士雪豹”,最后被贴吧网友和丁真...",
                        "url": "https://www.zhihu.com/question/548907903/answer/2633304852"
                    },
                    {
                        "upvotecount": "5330",
                        "commentcount": "64",
                        "datemodified": "2022-11-16T10:29:19.000Z",
                        "datecreated": "2022-10-18T15:43:56.000Z",
                        "text": "我尝试在一堆散文和小说里寻找答案,我感觉在做阅读理解一样",
                        "url": "https://www.zhihu.com/question/548907903/answer/2720903646"
                    },
                    {
                        "upvotecount": "5259",
                        "commentcount": "116",
                        "datemodified": "2022-08-24T05:20:59.000Z",
                        "datecreated": "2022-08-20T01:59:35.000Z",
                        "text": "雪豹并不懂那些人们所说的话,大雪时节阿妈依旧五六点起床给电子烟充电,雪豹发了疯般的叫,丁真大喊着雪豹闭嘴,雪豹转过头看向远处的雪山...",
                        "url": "https://www.zhihu.com/question/548907903/answer/2635822048"
                    }
                ],
                "person": [
                    {
                        "image": "https://pic1.zhimg.com/v2-74fdd2d76626ad421009f0e4a852bc02_l.jpg?source=2c26e567",
                        "name": "narita",
                        "url": "https://www.zhihu.com/people/chen
修改于 2025-10-15 08:07:30
上一页
Update user management token through OAuth Token
下一页
Google Search By Serper
Built with