{
  "openapi": "3.0.1",
  "info": {
    "title": "Website to Markdown & RAG Refresh API",
    "description": "Convert website pages and sitemaps to clean Markdown, cited RAG chunks and FAQ retrieval tests. Refresh changed pages with strict page and spending limits.",
    "version": "0.2",
    "x-build-id": "DH2ntnu4VyGjfnAmT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/solidscrape~docs-to-rag-dataset/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-solidscrape-docs-to-rag-dataset",
        "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/solidscrape~docs-to-rag-dataset/runs": {
      "post": {
        "operationId": "runs-sync-solidscrape-docs-to-rag-dataset",
        "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/solidscrape~docs-to-rag-dataset/run-sync": {
      "post": {
        "operationId": "run-sync-solidscrape-docs-to-rag-dataset",
        "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": {
          "urls": {
            "title": "Documentation URLs",
            "minItems": 0,
            "maxItems": 40,
            "type": "array",
            "description": "Up to 40 final public HTTPS HTML pages. Use these and/or sitemap URLs. Queries and redirects are refused. Existing URL-only inputs work unchanged.",
            "items": {
              "type": "string",
              "maxLength": 1500
            }
          },
          "sitemapUrls": {
            "title": "Sitemap URLs",
            "maxItems": 3,
            "type": "array",
            "description": "Optional 1–3 public HTTPS sitemap XML URLs. Same-origin child sitemaps and pages only. Each robots, sitemap and page attempt costs $0.0015. Maximum 500 locations per XML file.",
            "items": {
              "type": "string",
              "maxLength": 1500
            }
          },
          "includePathPrefixes": {
            "title": "Include page path prefixes",
            "maxItems": 10,
            "type": "array",
            "description": "Only fetch page paths starting with these literal prefixes, such as /docs/ or /faq.html. Empty includes every discovered path. Applied before page requests; sitemap discovery requests still cost.",
            "items": {
              "type": "string",
              "maxLength": 300
            }
          },
          "excludePathPrefixes": {
            "title": "Exclude page path prefixes",
            "maxItems": 10,
            "type": "array",
            "description": "Never fetch content pages whose path starts with a listed prefix, such as /blog/ or /private/. Overrides include filters. No regex or wildcards.",
            "items": {
              "type": "string",
              "maxLength": 300
            }
          },
          "maxPages": {
            "title": "Maximum content pages",
            "minimum": 1,
            "maximum": 40,
            "type": "integer",
            "description": "Maximum eligible content pages after path filters, with supplied URLs first. Omitted pages are explicit in MANIFEST; no inferred deletions.",
            "default": 40
          },
          "maxSitemaps": {
            "title": "Maximum sitemap documents",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Cap across root and child XML sitemaps. Sitemap index cycles are deduplicated.",
            "default": 3
          },
          "previousSnapshot": {
            "title": "Previous refresh snapshot",
            "type": "object",
            "description": "Optional SNAPSHOT JSON from a previous run, using the same chunkChars. Up to 200 page records and 150 KB. Old page hashes/IDs are preserved when a page is skipped, incomplete or missing from discovery. Store data retention applies."
          },
          "changesOnly": {
            "title": "Output only new or updated pages",
            "type": "boolean",
            "description": "With a previousSnapshot, suppress unchanged chunks and Markdown. Unchanged checks still incur source-request fees, but no indexed-page fee. The first run returns a baseline.",
            "default": false
          },
          "chunkChars": {
            "title": "Maximum chunk characters",
            "minimum": 300,
            "maximum": 4000,
            "type": "integer",
            "description": "Split at section and block boundaries, with long blocks split to this many UTF-16 units.",
            "default": 1800
          },
          "maxChunks": {
            "title": "Maximum chunks",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum unique chunks across the run. MANIFEST marks a truncated page.",
            "default": 80
          },
          "maxSeconds": {
            "title": "Maximum work time",
            "minimum": 10,
            "maximum": 150,
            "type": "integer",
            "description": "Maximum source work time, shared by pages and robots requests.",
            "default": 60
          },
          "maxSpendUsd": {
            "title": "Spending cap in USD",
            "minimum": 0.002,
            "maximum": 1,
            "type": "number",
            "description": "Stop before the next charge would exceed this budget. Apify's run-level maximum also applies.",
            "default": 0.1
          },
          "expectedLicenseUrl": {
            "title": "Required page license URL",
            "type": "string",
            "description": "Optional exact HTTPS rel=license match. Unmatched pages skip indexing. Source attempts still incur a fee."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}