OhMyGPT API Docs
  1. Search API
OhMyGPT API Docs
  • About This site
  • About new website
  • Midjourney Open API
    • About Midjourney Service
    • Midjourney Blend Image Generation Task Creation
      POST
    • Midjourney Text-to-Image Task Creation
      POST
    • Midjourney Execute Action Task Creation
      POST
    • Midjourney Query Specific Task ID Execution Status
      POST
    • Midjourney Paginated Bulk Query Tasks
      POST
    • Midjourney Describe Prompt Extraction Task Creation
      POST
    • Retrieve Images Generated by Midjourney from Object Storage
      GET
    • Retrieve Compressed Images Generated by Midjourney from Object Storage + WSRV
      GET
    • Retrieve Images Generated by Midjourney from Object Storage + WSRV
      GET
    • Proxy Discord Images via WSRV
      GET
    • Proxy and Compress Discord Images via WSRV
      GET
  • Management API
    • Create a New API Key
      POST
    • Update API Key Information
      POST
    • Query All of User's API Keys
      POST
    • Delete Specified API Key
      POST
    • Query User Membership Expiration Date
      POST
    • User Balance Query
      POST
    • Query the current model rates
      GET
  • OpenAI
    • About OpenAI Compatible API
    • About Azure OpenAI API
    • Audio
      • Text To Speech API
    • Chat
      • Chat Completion
      • Completion (Legacy)
    • Images
      • Create Image
    • Realtime API
  • Anthropic Claude
    • Deprecated
      • ChatCompletions
      • Claude2 API
    • Anthropic Official Claude API
  • Policies
    • Terms of Service
    • Privacy Policy
  • Other OpenAPIs
    • Search API
      • Google Custom Search API
        GET
      • Google Search By Serper
        POST
    • Azure API
      • Get Azure TTS voice list
      • Azure TTS
  1. Search API

Google Search By Serper

POST
/api/v1/openapi/search/serper/v1

Introduction#

Still Google Search, but offered by a third party, with lower costs, a simpler calling procedure, and enhanced results. The embedded LLM search service for websites is developed based on this implementation.

Pricing#

For successful queries not hitting the cache: 500 tokens per query
For queries hitting the cache: Free

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/x-www-form-urlencoded
q
string 
required
Search key word
Example:
What is cloudflare?
cache
integer 
optional
cache control default: 3
Example:
3
gl
string 
optional
Geo code
Example:
us
hl
string 
optional
Lang code
Example:
en
page
integer 
optional
page
Example:
1
num
integer 
optional
results per page, default: 10, max:100, bigger than 10 will double the fee
Example:
10

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.ohmygpt.com/api/v1/openapi/search/serper/v1' \
--data-urlencode 'q=What is cloudflare?' \
--data-urlencode 'cache=3' \
--data-urlencode 'gl=us' \
--data-urlencode 'hl=en' \
--data-urlencode 'page=1' \
--data-urlencode 'num=10'

Responses

🟢200OK
application/json
Body
object {0}
Example
{
    "searchParameters": {
        "q": "What is cloudflare?",
        "gl": "us",
        "hl": "en",
        "num": 10,
        "page": 1,
        "type": "search",
        "engine": "google"
    },
    "answerBox": {
        "snippet": "Fundamentally, Cloudflare is a large network of servers that can improve the security, performance, and reliability of anything connected to the Internet. Cloudflare does this by serving as a reverse proxy Open external link for your web traffic.",
        "snippetHighlighted": [
            "a large network of servers that can improve the security, performance, and reliability of anything connected to the Internet"
        ],
        "title": "How Cloudflare works · Cloudflare Fundamentals docs",
        "link": "https://developers.cloudflare.com/fundamentals/concepts/how-cloudflare-works/",
        "date": "Oct 25, 2023"
    },
    "knowledgeGraph": {
        "title": "Cloudflare",
        "type": "IT service management company"
    },
    "organic": [
        {
            "title": "So what is Cloudflare?",
            "link": "https://www.cloudflare.com/learning/what-is-cloudflare/",
            "snippet": "Cloudflare is one of the biggest networks on the Internet. People use Cloudflare for web application security and performance.",
            "position": 1
        },
        {
            "title": "Cloudflare - The Web Performance & Security Company | Cloudflare",
            "link": "https://www.cloudflare.com/",
            "snippet": "Powered by an intelligent global network, our connectivity cloud is a unified platform that helps your business work, deliver, and innovate everywhere.",
            "position": 2
        },
        {
            "title": "Why Cloudflare? | Cloudflare",
            "link": "https://www.cloudflare.com/what-is-cloudflare/",
            "snippet": "Cloudflare is the cloud for the “everywhere world”​​ Today, everything needs to be connected to everything everywhere, all the time. This hyperconnectivity ...",
            "position": 3
        },
        {
            "title": "What is Cloudflare and when do you use it? : r/webdev - Reddit",
            "link": "https://www.reddit.com/r/webdev/comments/wwyh5g/what_is_cloudflare_and_when_do_you_use_it/",
            "snippet": "CDN. CDN stands for Content Delivery Network. It means that Cloudflare have physical servers all over the world and they will help host your ...",
            "date": "Aug 25, 2022",
            "sitelinks": [
                {
                    "title": "What is Cloudflare? (I promised that I've been trying to figure it out ...",
                    "link": "https://www.reddit.com/r/CloudFlare/comments/sv8t7c/what_is_cloudflare_i_promised_that_ive_been/"
                },
                {
                    "title": "What is Cloudflare and why is it important? : r/HostingHostel - Reddit",
                    "link": "https://www.reddit.com/r/HostingHostel/comments/10y26gm/what_is_cloudflare_and_why_is_it_important/"
                }
            ],
            "position": 4
        },
        {
            "title": "What is Cloudflare? - YouTube",
            "link": "https://www.youtube.com/watch?v=XHvmX3FhTwU",
            "snippet": "Cloudflare is a global network designed to make everything you connect to the Internet secure ...",
            "date": "Jan 27, 2022",
            "attributes": {
                "Duration": "1:15",
                "Posted": "Jan 27, 2022"
            },
            "imageUrl": "https://i.ytimg.com/vi/XHvmX3FhTwU/default.jpg?sqp=-oaymwEECHgQQw&rs=AMzJL3lU_LtzLOitGJQbwR38ER_SmebjWQ",
            "position": 5
        },
        {
            "title": "Cloudflare - Wikipedia",
            "link": "https://en.wikipedia.org/wiki/Cloudflare",
            "snippet": "Cloudflare, Inc. is an American company that provides content delivery network services, cloud cybersecurity, DDoS mitigation, and ICANN-accredited domain ...",
            "position": 6
        },
        {
            "title": "Cloudflare: what is it? And what can you do with it? | Hipex.io",
            "link": "https://www.hipex.io/en/cloudflare/",
            "snippet": "Cloudflare is an American company that delivers services like a DNS, a content delivery network (CDN) and many other additional services to make websites ...",
            "position": 7
        },
        {
            "title": "What Is Cloudflare: A Quick Explanation - Cloudwards",
            "link": "https://www.cloudwards.net/what-is-cloudflare/",
            "snippet": "Cloudflare acts as an intermediary between a client and a server, using a reverse proxy to mirror and cache websites. By storing web content for ...",
            "date": "Nov 23, 2023",
            "position": 8
        },
        {
            "title": "Cloudflare Explained! - YouTube",
            "link": "https://www.youtube.com/watch?v=DFJP-HJ6JBs",
            "snippet": "https://craylor.co/cloudflare #shorts #cloudflare #CDN #DNS #cybersecurity #wordpress ...",
            "date": "Jul 1, 2022",
            "attributes": {
                "Duration": "0:59",
                "Posted": "Jul 1, 2022"
            },
            "imageUrl": "https://i.ytimg.com/vi/DFJP-HJ6JBs/default.jpg?sqp=-oaymwEECHgQQw&rs=AMzJL3mxQVYwteCjvlv9nTOUBtlvv4wYUg",
            "position": 9
        }
    ],
    "peopleAlsoAsk": [
        {
            "question": "What is Cloudflare used for?",
            "snippet": "We provide security and performance for millions of Internet properties and offer great functionality such as SSL and content distribution to every website on our network. Our services run silently in the background, keeping many of the websites and services you depend on up and running.",
            "title": "So what is Cloudflare?",
            "link": "https://www.cloudflare.com/learning/what-is-cloudflare/"
        },
        {
            "question": "Why is Cloudflare on my computer?",
            "snippet": "Technically, the owner of the property is using cloudflare to prevent traffic to their site that they do not want. Sometimes that's because of where you're located, sites you've visited that have injected malware on your system, or the IP address of your machine or network.",
            "title": "Cloudflare blocking a specific computer on my network - General",
            "link": "https://community.cloudflare.com/t/cloudflare-blocking-a-specific-computer-on-my-network/567501"
        },
        {
            "question": "Is Cloudflare safe and legit?",
            "snippet": "Cloudflare is a high-performance global network. It offers secure and reliable services at competitive prices. In addition it offers powerful WAF and DDoS protection as well as an easy-to-use and user-friendly dashboard. Customizable DNS and caching plus advanced analytics and real-time analytics.",
            "title": "Cloudflare Reviews - Pros & Cons, Ratings & more - GetApp",
            "link": "https://www.getapp.com/security-software/a/cloudflare/reviews/"
        },
        {
            "question": "Can Cloudflare be trusted?",
            "snippet": "Cloudflare offers security and reliability services to millions of websites, helping prevent online abuse and make the Internet more secure.",
            "title": "Abuse approach - Cloudflare",
            "link": "https://www.cloudflare.com/trust-hub/abuse-approach/"
        }
    ],
    "relatedSearches": [
        {
            "query": "Cloudflare alternative"
        },
        {
            "query": "What is cloudflare reddit"
        },
        {
            "query": "What is cloudflare dns"
        },
        {
            "query": "What is cloudflare app"
        },
        {
            "query": "What is cloudflare and how it works"
        },
        {
            "query": "What is Cloudflare and why is it on my computer"
        },
        {
            "query": "Is Cloudflare safe"
        },
        {
            "query": "What is Cloudflare CDN"
        },
        {
            "query": "Is Cloudflare free"
        }
    ]
}
Previous
Google Custom Search API
Next
Get Azure TTS voice list
Built with