Our Google Ads API allows you to scrape sponsored results from Google search pages at a higher rate than the standard Google Search API.


The API endpoint is https://serpapi.com/search?engine=google_ads

Head to the playground for a live and interactive demo.

API Parameters

Search Query

q

Required

Parameter defines the query you want to search. You can use anything that you would use in a regular Google search. e.g. inurl:, site:, intitle:.

Geographic Location

location

Required

Parameter defines from where you want the search to originate. If several locations match the location requested, we'll pick the most popular one. Head to the /locations.json API if you need more precise control.

Localization

hl

Optional

Parameter defines the language to use for the Google search. It's a two-letter language code. (e.g., en for English, es for Spanish, or fr for French). Head to the Google languages page for a full list of supported Google languages.

Advanced Filters

safe

Optional

Parameter defines the level of filtering for adult content. It can be set to active or off, by default Google will blur explicit content.

nfpr

Optional

Parameter defines the exclusion of results from an auto-corrected query when the original query is spelled wrong. It can be set to 1 to exclude these results, or 0 to include them (default). Note that this parameter may not prevent Google from returning results for an auto-corrected query if no other results are available.

Serpapi Parameters

engine

Required

Set parameter to google_ads to use the Google Ads API engine.

device

Optional

Parameter defines the device to use to get the results. It can be set to desktop (default) to use a regular browser, tablet to use a tablet browser (currently using iPads), or mobile to use a mobile browser.

no_cache

Optional

Parameter will force SerpApi to fetch the Google Ads results even if a cached version is already present. A cache is served only if the query and all parameters are exactly the same. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month. It can be set to false (default) to allow results from the cache, or true to disallow results from the cache. no_cache and async parameters should not be used together.

async

Optional

Parameter defines the way you want to submit your search to SerpApi. It can be set to false (default) to open an HTTP connection and keep it open until you got your search results, or true to just submit your search to SerpApi and retrieve them later. In this case, you'll need to use our Searches Archive API to retrieve your results. async and no_cache parameters should not be used together. async should not be used on accounts with Ludicrous Speed enabled.

zero_trace

Optional

Enterprise only. Parameter enables ZeroTrace mode. It can be set to false (default) or true. Enable this mode to skip storing search parameters, search files, and search metadata on our servers. This may make debugging more difficult.

api_key

Required

Parameter defines the SerpApi private key to use.

output

Optional

Parameter defines the final output you want. It can be set to json (default) to get a structured JSON of the results, or html to get the raw html retrieved.

JSON structure overview

{
  ...
  "ads": [
    {
      "position": "Integer - Item position",
      "block_position": "String - Position of the item on the page, one of 'top', 'middle', 'bottom' and 'right'",
      "title": "String - Item title",
      "link": "String - URL to the item",
      "displayed_link": "String - Displayed link to the item",
      "thumbnail": "String - URL to the item's thumbnail",
      "tracking_link": "String - Google ad tracking link",
      "description": "String - Description of the item",
      "source": "String - Source of the item",
      "price": "String - Price of the item",
      "extracted_price": "Numeric - Price of the item",
      "rating": "Numeric - Rating of the item",
      "reviews": "Numeric - Number of reviews of the item",
      "extensions": "Array - List of extensions to the item",
      "sitelinks": [
        {
          "title": "String - Sitelink title",
          "link": "String - URL to the item",
          "snippets": "Array - List of snippets of the item"
        }
      ],
      "vehicles_for_sale": [
        {
          "title": "String - Model of the vehicle",
          "thumbnail": "String - URL to the vehicle's picture",
          "price": "String - Price of the vehicle",
          "extracted_price": "Numeric - Price of the vehicle",
          "condition": "String - Condition of the vehicle (e.g. 'Used')",
          "mileage": "String - Mileage of the vehicle",
          "extracted_mileage": "Numeric - Mileage of the vehicle",
          "dealership": "String - Dealership of the vehicle",
          "location": "String - Location of the vehicle",
          "link": "String - URL to the vehicle"
        }
      ]
    }
  ],
  ...
  "local_ads": {
    "title": "String - Title of Local Ads section",
    "see_more_text": "String - Text on link to see more results",
    "link": "String - URL to see more results",
    "ads": [
      {
        "position": "Integer - Position of the ad",
        "title": "String - Title on the ad",
        "link": "String - URL to see more details about the ad",
        "rating": "Integer - Rating of the service being advertised on the ad",
        "rating_count": "Integer - Number of ratings given to the service being advertised on the ad",
        "type": "String - Type of service advertised on the ad",
        "service_area": "String - Area where service advertised cover",
        "hours": "String - Text describing when service advertised on the ad is available",
        "years_in_business": "String - Information about how many years service provider has been operational",
        "phone": "String - Phone number of service provider on the ad",
        "thumbnail": "String - URL to the thumbnail image",
        "highlighted_details": [
          "String - Detail about the service provider highlighted on the ad"
        ],
      }
    ],
  },
  ...
  "shopping_results": [
    {
      "position": "Integer - Item position",
      "title": "String - Item title",
      "link": "String - Link to the item",
      "source": "String - Product source name",
      "price": "String - Item price",
      "extracted_price": "Float - Item price as a float",
      "old_price": "String - Item's price before discount (Ex: '$15.99')",
      "extracted_old_price": "Numeric - Item's old price as float or integer (Ex: '15.99')",
      "second_hand_condition": "String - Description of condition when the product is second hand (Ex: 'used', or 'refurbished')",
      "shipping": "String - Item shipping method",
      "rating": "Float - Item rating",
      "reviews": "Integer - Item review count",
      "reviews_original": "String - Item review in text format",
      "extensions": "Array - Item tags/extensions",
      "thumbnail": "String - URL of an image",
    },
  ],
  ...
}