{
  "openapi": "3.0.1",
  "info": {
    "title": "Article to Clean Markdown & JSONL for AI",
    "description": "Extract Japanese and English articles into clean Markdown, JSONL, structured metadata, and RAG-ready chunks. Static-first with optional browser fallback.",
    "version": "0.1",
    "x-build-id": "FJaOWmKcVKhWNB0w2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fxosie-create~article-to-clean-markdown-jsonl/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fxosie-create-article-to-clean-markdown-jsonl",
        "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/fxosie-create~article-to-clean-markdown-jsonl/runs": {
      "post": {
        "operationId": "runs-sync-fxosie-create-article-to-clean-markdown-jsonl",
        "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/fxosie-create~article-to-clean-markdown-jsonl/run-sync": {
      "post": {
        "operationId": "run-sync-fxosie-create-article-to-clean-markdown-jsonl",
        "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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Public HTTP(S) article or listing URLs.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxPages": {
            "title": "Maximum pages",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of pages processed in one run.",
            "default": 20
          },
          "renderMode": {
            "title": "Render mode",
            "enum": [
              "auto",
              "static",
              "browser"
            ],
            "type": "string",
            "description": "auto: Static extraction first. Browser rendering is used only when necessary and can incur the browser surcharge. static: Lowest-cost option. JavaScript-only content may not be extracted. browser: Uses browser rendering and incurs the browser surcharge for each successful article.",
            "default": "auto"
          },
          "outputFormats": {
            "title": "Output formats",
            "type": "array",
            "description": "JSON is always stored in the dataset.",
            "items": {
              "type": "string",
              "enum": [
                "json",
                "jsonl",
                "markdown",
                "cleanText",
                "html"
              ]
            },
            "default": [
              "json",
              "jsonl",
              "markdown"
            ]
          },
          "generateChunks": {
            "title": "Generate RAG chunks",
            "type": "boolean",
            "description": "Generate Japanese-aware text and Markdown chunks for downstream RAG use.",
            "default": true
          },
          "chunkSize": {
            "title": "Chunk size (characters)",
            "minimum": 200,
            "maximum": 10000,
            "type": "integer",
            "description": "Approximate maximum number of characters in each generated chunk.",
            "default": 1400
          },
          "sameDomainOnly": {
            "title": "Same domain only",
            "type": "boolean",
            "description": "Only enqueue links on the start URL's registered domain.",
            "default": true
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Enabled by default. Disabling this does not waive site terms, copyright, or legal obligations.",
            "default": true
          },
          "maxDepth": {
            "title": "Maximum crawl depth",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum link depth from each start URL.",
            "default": 1
          },
          "includeSubdomains": {
            "title": "Include subdomains",
            "type": "boolean",
            "description": "Allow subdomains when same-domain crawling is enabled.",
            "default": false
          },
          "minArticleWords": {
            "title": "Minimum article words",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Minimum extracted word or Japanese character-unit count for a usable article.",
            "default": 80
          },
          "removeNavigation": {
            "title": "Remove navigation",
            "type": "boolean",
            "description": "Remove common navigation and breadcrumb elements before extraction.",
            "default": true
          },
          "removeAdvertisements": {
            "title": "Remove advertisements",
            "type": "boolean",
            "description": "Remove common advertisement elements before extraction.",
            "default": true
          },
          "removeRelatedArticles": {
            "title": "Remove related/recommended articles",
            "type": "boolean",
            "description": "Remove common related and recommended article blocks before extraction.",
            "default": true
          },
          "includeImages": {
            "title": "Include images",
            "type": "boolean",
            "description": "Include article image metadata in each result.",
            "default": true
          },
          "includeLinks": {
            "title": "Include outbound links",
            "type": "boolean",
            "description": "Include normalized outbound links found in the extracted article.",
            "default": true
          },
          "includeJsonLd": {
            "title": "Include JSON-LD",
            "type": "boolean",
            "description": "Include parsed JSON-LD objects found in the page.",
            "default": true
          },
          "chunkOverlap": {
            "title": "Chunk overlap (characters)",
            "minimum": 0,
            "maximum": 2000,
            "type": "integer",
            "description": "Approximate number of characters repeated between adjacent chunks.",
            "default": 150
          },
          "languageHint": {
            "title": "Language hint",
            "type": "string",
            "description": "Optional BCP-47-style hint such as ja or en.",
            "default": ""
          },
          "requestTimeoutSeconds": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Per-request timeout for static and browser retrieval.",
            "default": 30
          },
          "maxConcurrency": {
            "title": "Maximum concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum simultaneous page tasks. URL count alone does not increase memory. Keep this low and use the request interval to avoid target-site load.",
            "default": 3
          },
          "maxBrowserConcurrency": {
            "title": "Maximum browser concurrency",
            "minimum": 1,
            "maximum": 4,
            "type": "integer",
            "description": "Maximum simultaneous browser renderers for auto/browser mode. Effective browser concurrency is the lowest of this value, maxConcurrency, and expected browser work. One or two uses 2048 MB; three or four selects 4096 MB. Ignored by static extraction at runtime.",
            "default": 2
          },
          "expectedBrowserFallbacks": {
            "title": "Expected browser fallbacks",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Planning estimate used only for memory selection. Use 0 for static, estimate auto fallbacks, and use the planned page count for browser mode. A large URL list stays at 2048 MB when browser concurrency is 1-2.",
            "default": 1
          },
          "maxHtmlBytes": {
            "title": "Maximum HTML bytes per page",
            "minimum": 250000,
            "maximum": 12000000,
            "type": "integer",
            "description": "Maximum accepted HTML response size. Up to 6,000,000 bytes uses 2048 MB; a higher limit selects 4096 MB.",
            "default": 6000000
          },
          "minRequestIntervalMillis": {
            "title": "Minimum interval per website (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "Minimum delay between page requests to the same origin. Use a larger value when a site's policy requires it.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}