YepAPI
Web Scraping

Google Search

Get raw Google search results for any query.

POST/v1/search/google
$0.02/call

Usage

const res = await fetch('https://api.yepapi.com/v1/search/google', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ query: 'best web scraping api', country: 'us' }),
});
const { data } = await res.json();
console.log(data.html); // Raw Google SERP HTML
curl -X POST https://api.yepapi.com/v1/search/google \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "best web scraping api", "numResults": 10}'

Request Body

ParameterTypeRequiredDescriptionDefault
querystringYesSearch query
countrystringNoCountry code for geo-targeted results"us"
numResultsnumberNoNumber of results to return10

Response

{
  "ok": true,
  "data": {
    "query": "best web scraping api",
    "html": "<!DOCTYPE html><html>...(full Google SERP HTML)...</html>"
  }
}

Response Fields

FieldTypeDescription
okbooleanWhether the request succeeded
dataobjectResponse payload
data.querystringThe search query that was executed
data.htmlstringRaw Google SERP HTML. Parse this to extract organic results, featured snippets, People Also Ask, and other SERP features
Info

Returns the raw Google search results page HTML. Parse it to extract organic results, featured snippets, People Also Ask, ads, and any other SERP features you need.

On this page