Official Template

Google SERP Results

Extract organic search results from Google — links, titles, snippets, ads, and featured snippets.

searchserpgoogle

Target URL Pattern

google.com/search*

This template is optimised for URLs matching this pattern, but works with any URL.

Template Configuration

Request Config (merged with your URL)
{
  "mode": "markdown",
  "render_js": true,
  "extraction_schema": {
    "type": "object",
    "properties": {
      "ads": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "description": {
              "type": "string"
            }
          }
        }
      },
      "search_query": {
        "type": "string"
      },
      "total_results": {
        "type": "string"
      },
      "organic_results": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "snippet": {
              "type": "string"
            },
            "position": {
              "type": "integer"
            }
          }
        }
      },
      "featured_snippet": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "source_url": {
            "type": "string"
          }
        }
      }
    }
  },
  "bypass_cookie_banners": true
}
Try It Live

Test the Google SERP Results Template

Template: Google SERP Results

Template config applied: {"mode":"markdown","render_js":true,"extraction_schema":{"type":"object","properties":{"ads":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"}}}},"search_query":{"type":"string"},"total_results":{"type":"string"},"organic_results":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"snippet":{"type":"string"},"position":{"type":"integer"}}}},"featured_snippet":{"type":"object","properties":{"text":{"type":"string"},"source_url":{"type":"string"}}}}},"bypass_cookie_banners":true}

Enter a URL and click Run to see the template in action. for a real API key.

Code Examples

cURL
curl -X POST https://api.alterlab.io/v1/scrape \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "YOUR_TARGET_URL",
  "formats": ["markdown", "text"],
  "mode": "markdown",
  "render_js": true,
  "extraction_schema": {"type":"object","properties":{"ads":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"}}}},"search_query":{"type":"string"},"total_results":{"type":"string"},"organic_results":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"snippet":{"type":"string"},"position":{"type":"integer"}}}},"featured_snippet":{"type":"object","properties":{"text":{"type":"string"},"source_url":{"type":"string"}}}}},
  "bypass_cookie_banners": true
}'
Python
import requests

response = requests.post(
    "https://api.alterlab.io/v1/scrape",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={
        "url": "YOUR_TARGET_URL",
        "formats": ["markdown", "text"],
        "mode": "markdown",
        "render_js": true,
        "extraction_schema": {"type":"object","properties":{"ads":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"}}}},"search_query":{"type":"string"},"total_results":{"type":"string"},"organic_results":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"snippet":{"type":"string"},"position":{"type":"integer"}}}},"featured_snippet":{"type":"object","properties":{"text":{"type":"string"},"source_url":{"type":"string"}}}}},
        "bypass_cookie_banners": true,
    },
)
data = response.json()
print(data["data"]["markdown"])
Node.js
const response = await fetch("https://api.alterlab.io/v1/scrape", {
  method: "POST",
  headers: {
    "X-API-Key": "YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "YOUR_TARGET_URL",
    formats: ["markdown", "text"],
    mode: "markdown",
    render_js: true,
    extraction_schema: {"type":"object","properties":{"ads":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"}}}},"search_query":{"type":"string"},"total_results":{"type":"string"},"organic_results":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"snippet":{"type":"string"},"position":{"type":"integer"}}}},"featured_snippet":{"type":"object","properties":{"text":{"type":"string"},"source_url":{"type":"string"}}}}},
    bypass_cookie_banners: true,
  }),
});
const data = await response.json();
console.log(data.data.markdown);

Need an API key? — no credit card required.

Responsible Use

AlterLab is designed for extracting publicly available data. Always review the terms of service for any website you access, respect robots.txt directives, and ensure your use case complies with applicable laws in your jurisdiction.

Your first scrape.
Sixty seconds.

$1 free credit — up to 5,000 scrapes. No credit card.Just a POST request.

terminal
curl -X POST https://api.alterlab.io/v1/scrape \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "formats": ["markdown"]}'

No credit card required · $1 free credit, up to 5,000 scrapes · Balance never expires