{
  "openapi": "3.0.1",
  "info": {
    "title": "Real-Time Web Search API",
    "description": "Fast and reliable Google Search & SERP API - organic results, AI Overviews, AI Mode, videos, places, news, knowledge graph, people also ask, related searches, and more in real-time.",
    "version": "1.0",
    "x-build-id": "Y685h9M3wnbuKFeGO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/openweb-ninja~real-time-web-search/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-openweb-ninja-real-time-web-search",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/openweb-ninja~real-time-web-search/runs": {
      "post": {
        "operationId": "runs-sync-openweb-ninja-real-time-web-search",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/openweb-ninja~real-time-web-search/run-sync": {
      "post": {
        "operationId": "run-sync-openweb-ninja-real-time-web-search",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "endpoint"
        ],
        "properties": {
          "endpoint": {
            "title": "Endpoint",
            "enum": [
              "/search-light",
              "/search",
              "/search-by-url",
              "POST /ai-mode",
              "/people-also-ask",
              "POST /search-light-bulk"
            ],
            "type": "string",
            "description": "Which endpoint of the API to call. Each endpoint uses the parameters listed in its section below; parameters of other endpoints are ignored.",
            "default": "/search-light"
          },
          "q": {
            "title": "Q",
            "type": "string",
            "description": "<br><br><em>Used by: Search Light, Search, People Also Ask. Required for Search Light, Search, People Also Ask.</em>",
            "default": "how to build a website"
          },
          "num": {
            "title": "Num",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "<br><br><em>Used by: Search Light, Search.</em>"
          },
          "gl": {
            "title": "Gl",
            "type": "string",
            "description": "<br><br><em>Used by: Search Light, Search, AI Mode, People Also Ask, Search Light Bulk.</em>"
          },
          "hl": {
            "title": "Hl",
            "type": "string",
            "description": "<br><br><em>Used by: Search Light, Search, AI Mode, People Also Ask, Search Light Bulk.</em>"
          },
          "start": {
            "title": "Start",
            "type": "integer",
            "description": "Number of results to skip for pagination (default 0).<br><br><em>Used by: Search.</em>"
          },
          "location": {
            "title": "Location",
            "type": "string",
            "description": "Where the search originates from. Recommended to specify at city level to simulate a real user's search (e.g. London, England, United Kingdom). See https://openwebninja.s3.us-east-1.amazonaws.com/locations.json for the list of supported locations.<br><br><em>Used by: Search, AI Mode, People Also Ask.</em>"
          },
          "uule": {
            "title": "Uule",
            "type": "string",
            "description": "Google's own encoded location string (e.g. w+CAIQICIgU2VhdHRsZSxXYXNoaW5ndG9uLFVuaXRlZCBTdGF0ZXM=), passed to Google as is. Use it instead of location when you already generate uule values. Cannot be combined with location.<br><br><em>Used by: Search, AI Mode.</em>"
          },
          "device": {
            "title": "Device",
            "enum": [
              "desktop",
              "mobile",
              "tablet"
            ],
            "type": "string",
            "description": "The device to simulate for the search. Mobile and tablet return Google's mobile SERP layout, whose rankings and features can differ from desktop. Allowed values: desktop (default), mobile, tablet.<br><br><em>Used by: Search, Search by URL.</em>",
            "default": "desktop"
          },
          "lr": {
            "title": "Lr",
            "type": "string",
            "description": "Restrict search results to a specific language. Uses lang_{two-letter language code} with | as delimiter (e.g. lang_fr|lang_de searches French and German pages only).<br><br><em>Used by: Search, People Also Ask.</em>"
          },
          "tbs": {
            "title": "Tbs",
            "type": "string",
            "description": "Advanced Google search parameters that aren't available using regular query parameters (e.g. qdr:d for the last day, qdr:w for the last week).<br><br><em>Used by: Search, AI Mode, People Also Ask.</em>"
          },
          "nfpr": {
            "title": "Nfpr",
            "enum": [
              "0",
              "1"
            ],
            "type": "string",
            "description": "Exclude results of the auto-corrected query when the original query is misspelled with nfpr=1, and include them with nfpr=0 (default).<br><br><em>Used by: Search, People Also Ask.</em>",
            "default": "0"
          },
          "nhr": {
            "title": "Nhr",
            "enum": [
              "0",
              "1"
            ],
            "type": "string",
            "description": "Exclude 'People also ask' style related questions from the results with nhr=1. Include them with nhr=0 (default).<br><br><em>Used by: Search, People Also Ask.</em>",
            "default": "0"
          },
          "fetch_ai_overviews": {
            "title": "Fetch ai overviews",
            "type": "boolean",
            "description": "Whether to return AI Overviews when available (false by default). When true or 1, if AI Overviews are available, each request consumes two request credits instead of one.<br><br><em>Used by: Search.</em>",
            "default": false
          },
          "return_organic_result_video_thumbnail": {
            "title": "Return organic result video thumbnail",
            "type": "boolean",
            "description": "Whether to return a base64-encoded video_thumbnail field for organic video results (false by default).<br><br><em>Used by: Search.</em>",
            "default": false
          },
          "url": {
            "title": "Url",
            "type": "string",
            "description": "Full Google search URL to fetch, passed to Google as is. Must be a https://www.google.{domain}/search URL with a q parameter. Any other Google search parameters in the URL (gl, hl, start, tbs, uule, etc.) are kept.<br><br><strong>Examples:</strong><br><br><code>https://www.google.com/search?q=best+vpn+2026&amp;gl=us&amp;hl=en</code><br><br><code>https://www.google.co.uk/search?q=weather+london&amp;hl=en</code><br><br><em>Used by: Search by URL. Required for Search by URL.</em>"
          },
          "return_raw_html": {
            "title": "Return raw html",
            "type": "boolean",
            "description": "Whether to return the raw HTML of the results page, without any parsing, as data.html with its length in data.html_length (false by default). With expand_ai_overviews=true, this is the whole page with the AI Overview expanded.<br><br><em>Used by: Search by URL.</em>",
            "default": false
          },
          "expand_ai_overviews": {
            "title": "Expand ai overviews",
            "type": "boolean",
            "description": "Whether to return the AI Overview fully expanded (false by default). Parsed responses then include has_ai_overviews, the parsed ai_overviews and text ads (when Google shows them); with return_raw_html=true, data.html is the whole page HTML with the AI Overview expanded. Works with every device (desktop, mobile, tablet).<br><br><strong>Note:</strong> With expand_ai_overviews=true each request consumes 3 request credits instead of 2.<br><br><em>Used by: Search by URL.</em>",
            "default": false
          },
          "prompt": {
            "title": "Prompt",
            "type": "string",
            "description": "AI Mode prompt.<br><br><em>Used by: AI Mode. Required for AI Mode.</em>"
          },
          "session_token": {
            "title": "Session token",
            "type": "string",
            "description": "Specify a session token from previous AI Mode response to continue the chat from the same point (preserving history in context for continuous conversation).<br><br><em>Used by: AI Mode.</em>"
          },
          "attachments": {
            "title": "Attachments",
            "type": "array",
            "description": "Optional list of document URLs (PDF) to attach to the prompt, as plain URL strings. Up to 5 files, 10 MB each. Images are not supported. Attaching one or more documents is charged a flat 1 extra request credit.<br><br><em>Used by: AI Mode.</em>",
            "items": {
              "type": "string"
            }
          },
          "fetch_answers": {
            "title": "Fetch answers",
            "enum": [
              "true",
              "false",
              "0",
              "1"
            ],
            "type": "string",
            "description": "<br><br><em>Used by: People Also Ask.</em>",
            "default": "true"
          },
          "queries": {
            "title": "Queries",
            "type": "array",
            "description": "Query or list of queries to search (max 100 items; each trimmed; each ≤ 5000 chars; duplicates removed server-side).<br><br><em>Used by: Search Light Bulk. Required for Search Light Bulk.</em>",
            "items": {
              "type": "string"
            }
          },
          "limit": {
            "title": "Limit",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Number of results to return (1–300; capped at 300).<br><br><em>Used by: Search Light Bulk.</em>"
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}