{
  "openapi": "3.0.1",
  "info": {
    "title": "Proxy Page to Markdown scraper",
    "description": "Fetches pages through Apify proxy in your chosen country (residential or datacenter). Returns clean markdown per URL; optional unique outbound domains or CTA for brand checks. Cheerio first, Playwright fallback. Social URLs → blocked_social.",
    "version": "0.0",
    "x-build-id": "iIE6yEvYQCNzUbzNh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/morph_coder~proxy-page-to-markdown/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-morph_coder-proxy-page-to-markdown",
        "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/morph_coder~proxy-page-to-markdown/runs": {
      "post": {
        "operationId": "runs-sync-morph_coder-proxy-page-to-markdown",
        "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/morph_coder~proxy-page-to-markdown/run-sync": {
      "post": {
        "operationId": "run-sync-morph_coder-proxy-page-to-markdown",
        "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": [
          "country",
          "urls"
        ],
        "properties": {
          "country": {
            "title": "Proxy country (ISO code)",
            "type": "string",
            "description": "Two-letter country code for Apify proxy geolocation (e.g. US, DE, UA). Use for geo-specific landing and affiliate redirect checks.",
            "default": "US"
          },
          "urls": {
            "title": "URLs to scrape",
            "type": "array",
            "description": "List of direct page URLs. Social network URLs are returned as blocked_social without scraping.",
            "items": {
              "type": "string"
            }
          },
          "contentFormat": {
            "title": "Content format",
            "enum": [
              "markdown",
              "html",
              "text"
            ],
            "type": "string",
            "description": "Primary content field in output: markdown (default), html (Readability article fragment), or plain text.",
            "default": "markdown"
          },
          "extractSeo": {
            "title": "Extract SEO metadata",
            "type": "boolean",
            "description": "Return seo object with title, meta description, canonical, Open Graph fields, and Readability metadata.",
            "default": true
          },
          "extractCtaLinks": {
            "title": "Extract CTA links",
            "type": "boolean",
            "description": "Detect outbound call-to-action links for brand/leak checks. Excludes internal, social, and technical domains.",
            "default": false
          },
          "maxCtaLinks": {
            "title": "Max CTA links per page",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Cap on scored CTA links when extractCtaLinks is true.",
            "default": 20
          },
          "ctaScope": {
            "title": "CTA scan scope",
            "enum": [
              "article",
              "full_page"
            ],
            "type": "string",
            "description": "article = Readability main content only; full_page = entire page (excludes nav/footer/comments).",
            "default": "article"
          },
          "ctaDomainAllowlist": {
            "title": "CTA domain allowlist",
            "type": "array",
            "description": "When set, only outbound links to these registrable domains are returned as CTA.",
            "items": {
              "type": "string"
            }
          },
          "ctaDomainBlocklist": {
            "title": "CTA domain blocklist",
            "type": "array",
            "description": "Additional domains to exclude from CTA results.",
            "items": {
              "type": "string"
            }
          },
          "batchSize": {
            "title": "Internal batch size",
            "minimum": 10,
            "maximum": 100,
            "type": "integer",
            "description": "Number of URLs processed per wave (memory control).",
            "default": 50
          },
          "maxUrls": {
            "title": "Maximum URLs",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard cap on URLs accepted per run.",
            "default": 1000
          },
          "extractExternalLinks": {
            "title": "Extract external links",
            "type": "boolean",
            "description": "One sample URL per external domain, filtered for brand/leak checks — noisy on blogs/news. Prefer extractCtaLinks for landing pages.",
            "default": false
          },
          "maxExternalLinks": {
            "title": "Max external domains per page",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on unique outbound domains when extractExternalLinks is true (one URL per domain).",
            "default": 100
          },
          "usePlaywrightFallback": {
            "title": "Use Playwright fallback",
            "type": "boolean",
            "description": "Retry thin/empty Cheerio results with headless Chrome.",
            "default": true
          },
          "minContentLength": {
            "title": "Minimum content length",
            "minimum": 50,
            "type": "integer",
            "description": "Active content format shorter than this triggers Playwright fallback (if enabled).",
            "default": 200
          },
          "proxyType": {
            "title": "Proxy type",
            "enum": [
              "RESIDENTIAL",
              "DATACENTER"
            ],
            "type": "string",
            "description": "Apify proxy group: RESIDENTIAL for geo-accurate checks, DATACENTER for lower cost.",
            "default": "RESIDENTIAL"
          },
          "blockHeavyResources": {
            "title": "Block heavy Playwright resources",
            "type": "boolean",
            "description": "When Playwright fallback runs, block images and web fonts via Firefox prefs to cut residential proxy bandwidth. Scripts, XHR, CSS, and documents still load (needed for antibot). Does not use page.route (which can trip WAFs on Camoufox). Turn off if a site fails only with this enabled.",
            "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}