# Google Search

Perform a Google search and get structured results using the same reliable Google retrieval path as Search Advanced. gl=us and hl=en are used when omitted. page is 0-based: page=0 is the first page and page=1 is the second; start is the preferred explicit result offset. total_results is Google's estimate when exposed and may be null; organic_results_count is the number of returned organic rows. Scrappa does not impose fixed per-key concurrency or requests-per-minute limits. Transient capacity responses include Retry-After, and failed responses including 503 are never charged. External text is returned as valid UTF-8; malformed byte sequences are replaced with the Unicode replacement character (�), while valid Unicode is preserved. Account balance and recent usage are available from GET /api/account/usage and in the dashboard. YouTube results include raw views/date text plus normalized view_count and publication_age when Google provides them.

- **Documentation:** [https://staging.scrappa.co/docs/google-search-api/search](https://staging.scrappa.co/docs/google-search-api/search)
- **API group:** Google Search API
- **Endpoint:** `GET https://scrappa.co/api/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | Yes | Search query |
| `location` | string | No | Location for results (currently ignored by backend) |
| `uule` | string | No | Encoded location (deprecated; supported) |
| `google_domain` | string | No | Google domain (e.g., google.de) |
| `gl` | string | No | Country code (e.g., us, de, fr; default: us) |
| `cr` | string | No | Restrict results to countries (e.g., countryUS\|countryDE) |
| `hl` | string | No | Interface language code (default: en) |
| `lr` | string | No | Restrict results to language (e.g., lang_en) |
| `ludocid` | string | No | Google Customer ID for places |
| `lsig` | string | No | Knowledge graph map signature |
| `kgmid` | string | No | Knowledge graph entity ID (e.g., /g/11b6gq7c8p) |
| `si` | string | No | Encrypted cached search parameters |
| `ibp` | string | No | Controls rendering layouts and expansions |
| `uds` | string | No | Google-provided filter strings |
| `oq` | string | No | Original Google query value, passed through and encoded once in the upstream URL. |
| `sclient` | string | No | Google search client identifier, passed through and encoded once in the upstream URL. |
| `gs_lp` | string | No | Opaque Google SERP context value, passed through and encoded once in the upstream URL. |
| `tbs` | string | No | Advanced search filters (dates, patents, etc.) |
| `as_qdr` | string | No | Simple time range filter (e.g., d, w, m, y) |
| `safe` | string | No | Safe search mode (active, off) |
| `nfpr` | integer | No | Exclude auto-corrected results (0 or 1) |
| `filter` | integer | No | Enable/disable similar/omitted filters (0 or 1) |
| `tbm` | string | No | Search type (isch, vid, nws, lcl, shop, pts) |
| `start` | integer | No | Result offset for pagination (0-indexed) |
| `page` | integer | No | 0-based page number: 0 is the first page and 1 is the second. Prefer start for new integrations. |
| `amount` | integer | No | Results per page (1-10, may return fewer) |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/search?query=best+restaurants+in+Berlin&hl=en&safe=off"
```

## Example response

```json
{
    "search_information": {
        "query_displayed": "best restaurants in Berlin",
        "total_results": 428000000,
        "time_taken_displayed": 0.42
    },
    "organic_results": [
        {
            "position": 1,
            "title": "The 38 Best Restaurants in Berlin",
            "link": "https://www.example.com/berlin/best-restaurants",
            "redirect_link": "https://www.google.com/url?q=https://www.example.com/berlin/best-restaurants",
            "displayed_link": "www.example.com > berlin > best-restaurants",
            "snippet": "A curated guide to Berlin restaurants, from modern German dining rooms to casual neighborhood favorites.",
            "source": "example.com",
            "sitelinks": {
                "inline": [
                    {
                        "title": "Fine Dining",
                        "link": "https://www.example.com/berlin/fine-dining"
                    },
                    {
                        "title": "Neighborhood Guides",
                        "link": "https://www.example.com/berlin/neighborhoods"
                    }
                ]
            }
        },
        {
            "position": 2,
            "title": "Berlin Restaurant Guide",
            "link": "https://guide.example.org/berlin-restaurants",
            "displayed_link": "guide.example.org > berlin-restaurants",
            "snippet": "Compare highly rated restaurants in Berlin by cuisine, district, price level, and opening hours.",
            "source": "guide.example.org"
        }
    ],
    "related_searches": [
        {
            "query": "best restaurants berlin mitte",
            "link": "https://www.google.com/search?q=best+restaurants+berlin+mitte"
        },
        {
            "query": "berlin restaurants with tasting menu",
            "link": "https://www.google.com/search?q=berlin+restaurants+with+tasting+menu"
        }
    ],
    "people_also_search_for": [
        {
            "name": "Berlin food guide",
            "query": "Berlin food guide",
            "link": "https://www.google.com/search?q=Berlin+food+guide"
        },
        {
            "name": "Restaurants in Kreuzberg",
            "query": "restaurants in Kreuzberg",
            "link": "https://www.google.com/search?q=restaurants+in+Kreuzberg"
        },
        {
            "name": "Michelin restaurants Berlin",
            "query": "Michelin restaurants Berlin",
            "link": "https://www.google.com/search?q=Michelin+restaurants+Berlin"
        }
    ],
    "related_questions": [
        {
            "question": "What food is Berlin best known for?",
            "text_blocks": [
                {
                    "type": "paragraph",
                    "snippet": "Berlin is known for currywurst, doner kebab, schnitzel, and a large international restaurant scene."
                }
            ]
        }
    ],
    "local_results": {
        "places": [
            {
                "position": 1,
                "title": "Example Berlin Bistro",
                "rating": 4.7,
                "reviews": 1842,
                "type": "Restaurant",
                "address": "Mitte, Berlin"
            }
        ]
    },
    "knowledge_graph": null,
    "inline_images": [
        {
            "title": "Berlin restaurant dining room",
            "thumbnail": "https://images.example.com/berlin-restaurant.jpg",
            "source": "example.com"
        }
    ],
    "inline_videos": [
        {
            "position": 1,
            "title": "Adobe Express Brand Kit Tutorial 2026",
            "link": "https://www.youtube.com/watch?v=example123",
            "platform": "YouTube",
            "channel": "XayLi Barclay",
            "views": "720+ views",
            "view_count": 720,
            "date": "4 months ago",
            "publication_age": "4 months ago"
        }
    ],
    "pagination": {
        "next": null
    },
    "organic_results_count": 2,
    "total_results": 428000000,
    "engine_used": "google",
    "service_used": "google"
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | One or more query parameters failed validation. |
| 503 | Search Providers Unavailable | Google Search and fallback providers are temporarily unavailable. |

## More Scrappa resources

- [API documentation](https://staging.scrappa.co/docs)
- [Full LLM-readable API reference](https://staging.scrappa.co/llms-full.txt)
- [OpenAPI specification](https://staging.scrappa.co/docs/api.json)
- [Pricing](https://staging.scrappa.co/pricing)
