{
  "openapi": "3.0.1",
  "info": {
    "title": "Research Agent – Evidence-Graded Web Search for RAG",
    "description": "Ask a question, get a cited, evidence-graded context for your LLM: Google web and news, official EU and German law, Wikipedia, open-access science, Hacker News, Stack Overflow and GitHub. Every source rated by evidence level, facts cross-checked across sites, outdated information flagged.",
    "version": "1.0",
    "x-build-id": "dORCXf2tcd2BENUa7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/perceptr0n~research-agent/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-perceptr0n-research-agent",
        "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/perceptr0n~research-agent/runs": {
      "post": {
        "operationId": "runs-sync-perceptr0n-research-agent",
        "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/perceptr0n~research-agent/run-sync": {
      "post": {
        "operationId": "run-sync-perceptr0n-research-agent",
        "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",
        "properties": {
          "query": {
            "title": "Question",
            "type": "string",
            "description": "One question or search phrase. For several questions at once use **Questions** below. AI agents: put the user's question here."
          },
          "queries": {
            "title": "Questions (batch)",
            "maxItems": 200,
            "type": "array",
            "description": "Several questions, one per line — each gets its own row. Combined with **Question** above.",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Where to look. **web**: Google results (pages are read in full, PDFs too). **news**: Google News. **law**: official legal texts — EU law in its current consolidated version (all 24 languages, via the EU Publications Office) and German federal law. **wikipedia**: Wikipedia in the question's language. **science**: OpenAlex, 330 M+ scholarly works; open-access papers are read in full. **discussions**: Hacker News threads and Stack Overflow answers. **code**: GitHub repositories (README).",
            "items": {
              "type": "string",
              "enum": [
                "web",
                "news",
                "law",
                "wikipedia",
                "science",
                "discussions",
                "code"
              ],
              "enumTitles": [
                "Web (Google)",
                "News (Google News)",
                "Law (EU & German federal law, official texts)",
                "Wikipedia",
                "Science (OpenAlex, open-access full text)",
                "Discussions (Hacker News, Stack Overflow)",
                "Code (GitHub)"
              ]
            },
            "default": [
              "web",
              "wikipedia"
            ]
          },
          "preferEvidence": {
            "title": "Evidence preference",
            "enum": [
              "balanced",
              "official_first"
            ],
            "type": "string",
            "description": "Every source gets an evidence level (official, academic, reference, news, documentation, community, commercial). **Official first** ranks laws, authorities, standards bodies and peer-reviewed work clearly ahead of blogs and vendor pages.",
            "default": "balanced"
          },
          "deepResearch": {
            "title": "Second search round",
            "type": "boolean",
            "description": "Learns the specialist terms the first results use (e.g. a regulation number) and searches Google again with them. More complete answers; charged as one extra search.",
            "default": false
          },
          "scienceFullText": {
            "title": "Read open-access papers in full",
            "type": "boolean",
            "description": "For the top 3 science results with an open-access PDF, the full paper is read, not only the abstract.",
            "default": true
          },
          "tokenBudget": {
            "title": "Token budget per question",
            "minimum": 300,
            "maximum": 30000,
            "type": "integer",
            "description": "Maximum tokens of the selected passages per question. The `context` block adds source headers and evidence notes on top (typically 5–15 %).",
            "default": 3000
          },
          "maxResults": {
            "title": "Web results to read",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many Google results are opened and read per question (Google returns at most 10 per search; news: half of it).",
            "default": 8
          },
          "maxPassagesPerSource": {
            "title": "Max passages per source",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Keeps the context diverse: no single page can fill the budget.",
            "default": 3
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "`auto` detects the language of each question (en, de, fr, es, it, nl, pl). Or set a two-letter code — it sets the Google interface language, the Wikipedia edition and word stemming.",
            "default": "auto"
          },
          "country": {
            "title": "Country (optional)",
            "pattern": "^([a-zA-Z]{2})?$",
            "type": "string",
            "description": "Two-letter country code to localise Google results, e.g. `us`, `de`."
          },
          "freshness": {
            "title": "Freshness",
            "enum": [
              "any",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "Only results from the last day, week, month or year (web, news; science: month or year).",
            "default": "any"
          },
          "urls": {
            "title": "Also read these pages (optional)",
            "maxItems": 50,
            "type": "array",
            "description": "Pages or PDFs to include in every question — e.g. your own docs. They are read and ranked together with the search results.",
            "items": {
              "type": "string"
            }
          },
          "outputMode": {
            "title": "Output",
            "enum": [
              "query",
              "passages"
            ],
            "type": "string",
            "description": "**One row per question**: context block, passages and sources — best for agents. **One row per passage**: flat rows for vector databases.",
            "default": "query"
          },
          "includeFullText": {
            "title": "Include full text of every source",
            "type": "boolean",
            "description": "Adds the complete extracted Markdown of each source to `sources[].fullText` (larger rows).",
            "default": false
          },
          "githubToken": {
            "title": "GitHub token (optional)",
            "type": "string",
            "description": "Only for the code source: without a token GitHub allows about 10 searches per minute."
          },
          "fetchTimeoutSecs": {
            "title": "Page timeout (seconds)",
            "minimum": 5,
            "maximum": 60,
            "type": "integer",
            "description": "Pages slower than this are skipped and listed with the reason. Each question waits at most this long plus 6 seconds for all pages together.",
            "default": 12
          },
          "useProxyForPages": {
            "title": "Read pages through Apify Proxy",
            "type": "boolean",
            "description": "Uses one Apify datacenter proxy address for the whole run when reading pages.",
            "default": false
          },
          "webFetch": {
            "title": "Read pages we cannot read ourselves through Apify's Web Fetch",
            "type": "boolean",
            "description": "ON by default. A page the agent cannot read itself — it refuses automated requests (HTTP 401/402/403/429, a bot check), does not answer (timeout, network or server error) or is drawn by JavaScript — is read through Apify's own Web Fetch actor instead; JavaScript pages are rendered in a browser there. It runs on your Apify account and Apify bills it there: $0.0015 per delivered page on the free plan plus $0.00005 per call start (Apify Store, 13 October 2026); a page that comes back drawn by JavaScript or as a bot check is tried once more in a browser (a second call). Such a page may take up to 30 seconds longer than the others. PDFs are not sent there. Sources read this way say readVia: \"Apify Web Fetch\" or \"Apify Web Fetch (browser)\".",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}