> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fetchserp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SERP

> This endpoint fetches the SERP results. For Google, pages are rendered by a real browser (desktop or mobile, optionally placed at a location) and `google.com/goto` redirect links are resolved to destination URLs. Every Google page is scored for poisoning (`quality`); `strict=true` refuses a suspect page, `samples=n` returns how often each domain appears across n independent captures (`distribution`). A page that fails after earlier pages succeeded is reported under `warnings` instead of failing the request.



## OpenAPI

````yaml /openapi.json get /api/v1/serp
openapi: 3.1.0
info:
  title: API Documentation
  summary: 'OasRails: Automatic Interactive API Documentation for Rails'
  description: >+
    # FetchSERP API


    This API provides endpoints for retrieving search engine results, analyzing
    keyword and domain performance, scraping web content, and conducting SEO
    audits. It is designed to help developers access valuable SEO and SERP data
    programmatically.


    ## Authentication


    All API endpoints require Bearer token authentication.



    ## Rate Limiting


    The API has a rate limit of 600 requests per minute per API key. If you
    exceed this limit, you will receive a 429 status code.



    ## Available Resources


    - Get Backlinks : Get backlinks for a given domain

    - Get Domain Emails : Retrieve emails from a given domain

    - Get Domain Info : Get domain info including DNS records, WHOIS data, SSL
    certificates, and technology stack

    - Get Keywords search volume : Get search volume for given keywords

    - Get Keywords suggestions : Get keyword suggestions based on a url or a
    list of keywords

    - Get Long-tail Keywords Generator : Generate long-tail keywords for a given
    keyword

    - Get Page Indexation Check : Check if a domain is indexed for a given
    keyword

    - Get Domain Ranking : Get domain ranking for a given keyword

    - Get Web Page Scraping : Scrape a web page without JS

    - Get Domain Scraping : Scrape a domain

    - Post Web Page Scraping : Scrape a web page with custom JS

    - Post Web Page Scraping with Proxy : Scrape a web page with JS and proxy

    - Get Moz Domain Analysis : Get Moz domain analysis data

    - GET Search engine results : Get search engine results

    - GET Search engine results AI : Get search engine results with AI overview
    and AI mode response

    - GET Search engine results html : Get search engine results html content

    - GET Search engine results JS : Get search engine results with JS rendering

    - GET Search engine results text : Get search engine results text content

    - Get User : Get user information including api credit

    - Get Web Page AI Analysis : Analyze a web page with AI

    - Get SEO Analysis : Get SEO analysis for a given url


    For more information, contact contact@fetchserp.com

  termsOfService: ''
  contact:
    name: Support
    url: https://fetchserp.com
    email: contact@fetchserp.com
  license:
    name: GPL 3.0
    url: https://www.gnu.org/licenses/gpl-3.0.html#license-text
  version: 1.0.0
servers:
  - url: https://www.fetchserp.com
    description: Production
security:
  - bearer: []
tags:
  - name: Users
    description: Manage the `amazing` Users table.
paths:
  /api/v1/serp:
    get:
      tags:
        - Api
      summary: SERP
      description: >-
        This endpoint fetches the SERP results. For Google, pages are rendered
        by a real browser (desktop or mobile, optionally placed at a location)
        and `google.com/goto` redirect links are resolved to destination URLs.
        Every Google page is scored for poisoning (`quality`); `strict=true`
        refuses a suspect page, `samples=n` returns how often each domain
        appears across n independent captures (`distribution`). A page that
        fails after earlier pages succeeded is reported under `warnings` instead
        of failing the request.
      operationId: index_api_v1_serp
      parameters:
        - $ref: '#/components/parameters/32aa60a30e3320137f3d09f779431245'
        - $ref: '#/components/parameters/82684a02ea93b9c2e9c9bf4011448b55'
        - $ref: '#/components/parameters/9ccc3be88a72c474df2eefc3b72e81d4'
        - $ref: '#/components/parameters/412f4eaf7b6d0c834d0c456653165400'
        - $ref: '#/components/parameters/ef6629bad38f714f28afe8416fb598fb'
        - $ref: '#/components/parameters/10d5c888514595e56838d39024459dda'
        - $ref: '#/components/parameters/0e8c2ecb667d12129f7c25c452e8bea8'
        - $ref: '#/components/parameters/2dad2f8d14e0dd4e46dd165be31b3140'
        - $ref: '#/components/parameters/c1b0de989cc2b81b6bb8382f1e4efff1'
        - $ref: '#/components/parameters/0f9b986b2f997008265ac9453aee456a'
        - $ref: '#/components/parameters/8c51804fc85bb39529fd2b3d26f49c5a'
      responses:
        '200':
          $ref: '#/components/responses/6d5dcf2d0102b3a70556ed2992fc3009'
        '401':
          $ref: '#/components/responses/b4d1fb108bbe86ad024967a4286ed69a'
        '403':
          $ref: '#/components/responses/7ff117d41b48f41d426e2b918a0bc095'
        '422':
          $ref: '#/components/responses/5c152b1740f5af7e9e4ff29155c98455'
        '500':
          $ref: '#/components/responses/0466dcc24aed86fecaf900ad7818cb21'
      security:
        - bearer: []
components:
  parameters:
    32aa60a30e3320137f3d09f779431245:
      name: query
      in: query
      description: The query to search
      required: true
      schema:
        type: string
      style: form
    82684a02ea93b9c2e9c9bf4011448b55:
      name: search_engine
      in: query
      description: >-
        The search engine to use. Supported values: google, bing, yahoo and
        duckduckgo. Default to duckduckgo.
      required: false
      schema:
        type: string
      style: form
    9ccc3be88a72c474df2eefc3b72e81d4:
      name: country
      in: query
      description: The country to search from. Default to us.
      required: false
      schema:
        type: string
      style: form
    412f4eaf7b6d0c834d0c456653165400:
      name: pages_number
      in: query
      description: The number of pages to search (1-30). Default to 1.
      required: false
      schema:
        type: integer
      style: form
    ef6629bad38f714f28afe8416fb598fb:
      name: resolve_urls
      in: query
      description: >-
        Google only. Resolve Google redirect links (google.com/goto) to their
        destination URLs. Default to true. When false, `url` is null for
        redirect links and `domain`/`display_url` are still returned.
      required: false
      schema:
        type: boolean
      style: form
    10d5c888514595e56838d39024459dda:
      name: device
      in: query
      description: Google only. desktop or mobile. Default to desktop.
      required: false
      schema:
        type: string
      style: form
    0e8c2ecb667d12129f7c25c452e8bea8:
      name: location
      in: query
      description: >-
        Google only. Where the search is made from: "lat,lng" in decimal degrees
        (e.g. 40.6782,-73.9442), or a place name: city, neighborhood, county,
        state or postal code (e.g. "Brooklyn, NY", "Austin TX", "11216", "SW1A
        1AA, UK"). Names are resolved to coordinates and a time zone; the
        resolved place is echoed in `location`. Look names up with
        /api/v1/locations. Default: the exit IP's location.
      required: false
      schema:
        type: string
      style: form
    2dad2f8d14e0dd4e46dd165be31b3140:
      name: timezone
      in: query
      description: >-
        Google only, with location. IANA time zone id (e.g. America/New_York).
        Default: the named location's time zone.
      required: false
      schema:
        type: string
      style: form
    c1b0de989cc2b81b6bb8382f1e4efff1:
      name: strict
      in: query
      description: >-
        Google only. Return 422 instead of results when the page looks poisoned
        (see `quality`). Default to false.
      required: false
      schema:
        type: boolean
      style: form
    0f9b986b2f997008265ac9453aee456a:
      name: samples
      in: query
      description: >-
        Google only. Take 1-5 independent captures of page 1 and return a
        per-domain retrieval distribution. Implies pages_number=1. Default to 1.
      required: false
      schema:
        type: integer
      style: form
    8c51804fc85bb39529fd2b3d26f49c5a:
      name: max_resamples
      in: query
      description: >-
        Google only. Extra captures (0-3) to take when page 1 looks poisoned;
        the best is returned. Each one is a fresh browser identity (often a
        captcha solve, tens of seconds). Default to 1.
      required: false
      schema:
        type: integer
      style: form
  responses:
    6d5dcf2d0102b3a70556ed2992fc3009:
      description: success
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/15561c50f3d1304528d11bcdb46a6978'
    b4d1fb108bbe86ad024967a4286ed69a:
      description: Validation errors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/9d665ada07b74ee5119ec08992fb01eb'
    7ff117d41b48f41d426e2b918a0bc095:
      description: >-
        You are not allowed to access this resource. You do not have the
        necessary permissions.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/38bddf8128b086e90de170d98c730f6d'
    5c152b1740f5af7e9e4ff29155c98455:
      description: Validation errors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/9d665ada07b74ee5119ec08992fb01eb'
    0466dcc24aed86fecaf900ad7818cb21:
      description: Validation errors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/555048dfa1a2eef6cf92eb6be54763a0'
  schemas:
    15561c50f3d1304528d11bcdb46a6978:
      type: object
      properties:
        data:
          type: object
          properties:
            query:
              type: string
            search_engine:
              type: string
            country:
              type: string
            results_count:
              type: integer
            results:
              type: array
              items:
                type: object
                properties:
                  site_name:
                    type: string
                  url:
                    type: string
                  title:
                    type: string
                  description:
                    type: string
                  ranking:
                    type: integer
                  domain:
                    type: string
                  display_url:
                    type: string
                  google_redirect_url:
                    type: string
                  url_resolved:
                    type: boolean
                  url_source:
                    type: string
            resolution:
              type: object
              properties:
                requested:
                  type: integer
                resolved:
                  type: integer
                cached:
                  type: integer
                unresolved:
                  type: integer
                pending:
                  type: integer
            quality:
              type: object
              properties:
                score:
                  type: float
                flags:
                  type: array
                  items:
                    type: string
                suspected_poisoned:
                  type: boolean
                usual_domain_retention:
                  type: float
                history_size:
                  type: integer
                resampled:
                  type: boolean
                samples:
                  type: array
                  items:
                    type: object
                    properties:
                      session:
                        type: string
                      score:
                        type: float
                      suspected_poisoned:
                        type: boolean
                      chosen:
                        type: boolean
            distribution:
              type: object
              properties:
                samples:
                  type: integer
                domains:
                  type: array
                  items:
                    type: object
                    properties:
                      domain:
                        type: string
                      appearances:
                        type: integer
                      rate:
                        type: float
                      mean_position:
                        type: float
                      min_position:
                        type: integer
                      max_position:
                        type: integer
                features:
                  type: object
                  properties:
                    ai_overview:
                      type: float
                    people_also_ask:
                      type: float
            pages:
              type: array
              items:
                type: object
                properties:
                  page:
                    type: integer
                  status:
                    type: string
                  organic:
                    type: integer
                  goto_links:
                    type: integer
                  features:
                    type: object
                    properties:
                      ai_overview:
                        type: boolean
                      people_also_ask:
                        type: boolean
                      people_also_search_for:
                        type: boolean
                      related_searches:
                        type: boolean
                      discussions_and_forums:
                        type: boolean
                      videos:
                        type: boolean
                      local_pack:
                        type: boolean
                      ads:
                        type: boolean
                  pagination:
                    type: object
                    properties:
                      has_next:
                        type: boolean
                      max_visible_page:
                        type: integer
                  captcha_solved:
                    type: boolean
                  location_text:
                    type: string
            device:
              type: string
            location:
              type: object
              properties:
                name:
                  type: string
                query:
                  type: string
                type:
                  type: string
                source:
                  type: string
                latitude:
                  type: float
                longitude:
                  type: float
                timezone:
                  type: string
                country_code:
                  type: string
            warnings:
              type: array
              items:
                type: string
    9d665ada07b74ee5119ec08992fb01eb:
      type: object
      properties:
        error:
          type: string
    38bddf8128b086e90de170d98c730f6d:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
      required:
        - success
    555048dfa1a2eef6cf92eb6be54763a0:
      type: object
      properties:
        status:
          type: integer
        error:
          type: string
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        A bearer token that will be supplied within an `Authorization` header as
        `bearer <token>`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.