{
  "openapi": "3.0.1",
  "info": {
    "title": "Readability Score Calculator & Word Frequency Counter",
    "description": "Readability score calculator and word frequency counter for texts, web pages and dataset fields in bulk. Flesch Reading Ease, Flesch-Kincaid, Gunning Fog, SMOG, Coleman-Liau, ARI, consensus grade, word count, reading time, top words and lexical diversity.",
    "version": "0.1",
    "x-build-id": "oT1RzKfZHS563fcaX"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-done-right~readability-score-calculator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-done-right-readability-score-calculator",
        "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/data-done-right~readability-score-calculator/runs": {
      "post": {
        "operationId": "runs-sync-data-done-right-readability-score-calculator",
        "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/data-done-right~readability-score-calculator/run-sync": {
      "post": {
        "operationId": "run-sync-data-done-right-readability-score-calculator",
        "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": {
          "texts": {
            "title": "Texts",
            "type": "array",
            "description": "Texts to analyse, one per line. Each entry is one result row. Example: The cat sat on the mat. It was a sunny day.",
            "items": {
              "type": "string"
            }
          },
          "urls": {
            "title": "Page URLs (optional)",
            "type": "array",
            "description": "Web pages whose main text should be analysed (extracted with trafilatura). Public pages only, no logins. Example: https://en.wikipedia.org/wiki/Readability.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset with texts (optional)",
            "type": "string",
            "description": "Optional. Pick an Apify dataset (for example the output of a scraper) and the field below is analysed for every item. Example: a dataset ID such as aBcD1234eFgH5678i."
          },
          "datasetField": {
            "title": "Dataset field",
            "type": "string",
            "description": "Field of each dataset item that holds the text (or a list of texts). Dotted paths work. Example: review.text or comments.0. Default: text.",
            "default": "text"
          },
          "topWords": {
            "title": "Top words per text",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "How many of the most frequent words to return for each text, with counts and percentages. 0 turns word frequency off. Example: 20.",
            "default": 20
          },
          "removeStopwords": {
            "title": "Remove stopwords",
            "type": "boolean",
            "description": "Skip common English words (the, and, of, to) in the word frequency list so meaningful words come first. The built-in list is English only. Example: true.",
            "default": true
          },
          "customStopwords": {
            "title": "Extra stopwords",
            "type": "array",
            "description": "Optional extra words to leave out of the frequency list, in any language. Example: said, also, www.",
            "items": {
              "type": "string"
            }
          },
          "minWordLength": {
            "title": "Minimum word length",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Words shorter than this many letters are left out of the frequency list. Example: 3.",
            "default": 2
          },
          "longestSentences": {
            "title": "Longest sentences to return",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "How many of the longest sentences to list per text (with their word counts), useful for finding what to shorten. 0 turns it off. Example: 3.",
            "default": 3
          },
          "includeDaleChall": {
            "title": "Add Dale-Chall (lite)",
            "type": "boolean",
            "description": "Also compute an approximate Dale-Chall score. It uses a rare-word proxy, not the official 3,000-word list, so treat it as indicative. Example: false.",
            "default": false
          },
          "language": {
            "title": "Text language",
            "enum": [
              "auto",
              "en",
              "other"
            ],
            "type": "string",
            "description": "auto guesses whether each text is English. Choose en to trust that texts are English, or other to flag every grade as English-only. Counts and word frequencies work in any language. Example: auto.",
            "default": "auto"
          },
          "readingWordsPerMinute": {
            "title": "Reading speed (words per minute)",
            "minimum": 50,
            "maximum": 1000,
            "type": "number",
            "description": "Used for readingTimeMinutes. 238 is the average silent reading speed of adults. Example: 238.",
            "default": 238
          },
          "speakingWordsPerMinute": {
            "title": "Speaking speed (words per minute)",
            "minimum": 50,
            "maximum": 400,
            "type": "number",
            "description": "Used for speakingTimeMinutes (speeches, voice-over, video scripts). 150 is a typical presentation pace. Example: 150.",
            "default": 150
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum texts and pages to process in this run. Items beyond the limit are listed as skipped and not charged. Example: 1000.",
            "default": 1000
          },
          "maxCharsPerText": {
            "title": "Max characters analysed per text",
            "minimum": 100,
            "maximum": 2000000,
            "type": "integer",
            "description": "Longer texts are cut to this length (charCount shows the analysed length and a note is added). Example: 200000.",
            "default": 200000
          },
          "concurrency": {
            "title": "Parallel page downloads",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "How many page URLs are downloaded at the same time. Example: 4.",
            "default": 4
          },
          "timeoutSecs": {
            "title": "Page timeout (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "number",
            "description": "Give up on a page URL after this many seconds. Example: 30.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy (optional, for page URLs)",
            "type": "object",
            "description": "Only used for page URLs. Leave empty to download pages directly."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}