Custom Search API
Searches over a website or collection of websites
Data & analytics#openapi#analytics#media
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
Searches over a website or collection of websites
Endpoints 2
cse
- GETReturns metadata about the search performed, metadata about the engine used for the search, and the search results.
/customsearch/v1?c2coff=string&cr=string&cx=string&dateRestrict=string&enableAlternateSearchHandler=true&exactTerms=string&excludeTerms=string&fileType=string&filter=string&gl=string&googlehost=string&highRange=string&hl=string&hq=string&imgColorType=imgColorTypeUndefined&imgDominantColor=imgDominantColorUndefined&imgSize=imgSizeUndefined&imgType=imgTypeUndefined&linkSite=string&lowRange=string&lr=string&num=0&orTerms=string&q=string&relatedSite=string&rights=string&safe=safeUndefined&searchType=searchTypeUndefined&siteSearch=string&siteSearchFilter=siteSearchFilterUndefined&snippetLength=0&sort=string&start=0Returns metadata about the search performed, metadata about the engine used for the search, and the search results.
cse.siterestrict
- GETReturns metadata about the search performed, metadata about the engine used for the search, and the search results
/customsearch/v1/siterestrict?c2coff=string&cr=string&cx=string&dateRestrict=string&enableAlternateSearchHandler=true&exactTerms=string&excludeTerms=string&fileType=string&filter=string&gl=string&googlehost=string&highRange=string&hl=string&hq=string&imgColorType=imgColorTypeUndefined&imgDominantColor=imgDominantColorUndefined&imgSize=imgSizeUndefined&imgType=imgTypeUndefined&linkSite=string&lowRange=string&lr=string&num=0&orTerms=string&q=string&relatedSite=string&rights=string&safe=safeUndefined&searchType=searchTypeUndefined&siteSearch=string&siteSearchFilter=siteSearchFilterUndefined&snippetLength=0&sort=string&start=0Returns metadata about the search performed, metadata about the engine used for the search, and the search results. Uses a small set of url patterns.
API details
- Base URL
https://customsearch.googleapis.com- Authentication
- OAuth 2.0 (authorization code flow)
An API key in the key query parameter - Operations
- 2 operations on 2 pathsGET 2
- Main resources
- cse 1cse.siterestrict 1
- Response formats
application/json- Description format
- Google API Discovery, API version
v1 - Links
- Documentation · OpenAPI document
- Listed from
- Google API Discovery document (googleapis/discovery-artifact-manager) (Apache-2.0)
How to test the Custom Search API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Custom Search API collection, without the publisher's secrets.
- Add your credentialsThis API uses OAuth 2.0 (authorization code flow). Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Returns metadata about the search performed, metadata about the engine used for the search, and the search results.” (GET /customsearch/v1?c2coff=string&cr=string&cx=string&dateRestrict=string&enableAlternateSearchHandler=true&exactTerms=string&excludeTerms=string&fileType=string&filter=string&gl=string&googlehost=string&highRange=string&hl=string&hq=string&imgColorType=imgColorTypeUndefined&imgDominantColor=imgDominantColorUndefined&imgSize=imgSizeUndefined&imgType=imgTypeUndefined&linkSite=string&lowRange=string&lr=string&num=0&orTerms=string&q=string&relatedSite=string&rights=string&safe=safeUndefined&searchType=searchTypeUndefined&siteSearch=string&siteSearchFilter=siteSearchFilterUndefined&snippetLength=0&sort=string&start=0), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Custom Search API?
Searches over a website or collection of websites It is listed under Data & analytics and has 2 endpoints.
Who publishes the Custom Search API?
It is listed from Google's public API description (an OpenAPI document), not published by Google on Swastik Codes. Anyone who controls googleapis.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Custom Search API?
Requests go to https://customsearch.googleapis.com. Endpoint paths are added to this base URL.
How do I authenticate with the Custom Search API?
It accepts 2 methods: OAuth 2.0 (authorization code flow); an API key in the key query parameter.
How many endpoints does the Custom Search API have?
2 operations on 2 paths (2 GET). The largest groups are cse, cse.siterestrict.
Is forking the Custom Search API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.