# Google Search Advanced

Fetch a modern Google SERP through the browser orchestrator and return richer structured modules including organic results, ads, People Also Ask, knowledge panels, local packs, news, videos, images, shopping blocks, answer boxes, related searches, spelling corrections, filters, and pagination when present.

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

## 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) |
| `cr` | string | No | Restrict results to countries (e.g., countryUS\|countryDE) |
| `hl` | string | No | Interface language code |
| `lr` | string | No | Restrict results to language (e.g., lang_en) |
| `device` | string | No | Device used to fetch Google results: desktop (default), tablet, or mobile. |
| `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 | Page number for pagination (0-indexed) |
| `amount` | integer | No | Results per page (1-10, may return fewer) |
| `lsig` | string | No | Google local listing signature, used with ludocid to target one listing. |
| `kgmid` | string | No | Google Knowledge Graph machine ID of the entity to target (e.g. /m/0dr90d). |
| `si` | string | No | Opaque Google search context token, passed through unchanged. |
| `ibp` | string | No | Opaque Google interface parameter, passed through unchanged. |
| `uds` | string | No | Opaque Google filter token from a previous result page, passed through unchanged. |

## Example request

```bash
#!/bin/bash

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

## Example response

```json
{
    "search_information": {
        "query_displayed": "best restaurants in Berlin",
        "total_results": 428000000
    },
    "organic_results": [
        {
            "position": 1,
            "title": "The 38 Best Restaurants in Berlin",
            "link": "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"
        }
    ],
    "related_questions": [
        {
            "question": "What food is Berlin best known for?"
        }
    ],
    "people_also_search_for": [],
    "things_to_know": [],
    "knowledge_graph": null,
    "see_results_about": null,
    "twitter_card": null,
    "local_results": {
        "places": []
    },
    "local_map": null,
    "answer_box": null,
    "ai_overview": null,
    "ads": [],
    "top_stories": [],
    "videos": [],
    "inline_videos": [],
    "inline_images": [],
    "shopping_results": [],
    "popular_products": [],
    "perspectives": [],
    "events_results": [],
    "recipes_results": [],
    "immersive_products": [],
    "filters": [],
    "related_searches": [],
    "refine_this_search": [],
    "nutrition_information": null,
    "pagination": [],
    "total_results": 428000000,
    "engine_used": "google",
    "service_used": "google"
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | One or more query parameters failed validation. |
| 503 | Browser Orchestrator Unavailable | The browser orchestrator, Google Search providers, or upstream SERP parsing are temporarily unable to return a valid result. |

## More Scrappa resources

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