{
  "openapi": "3.0.1",
  "info": {
    "title": "Niche Schools Scraper - K-12 Grades, Rankings & Tuition",
    "description": "Scrape Niche.com school rankings: K-12 public, private and charter schools, districts and colleges by state, city or ZIP. Grades, rank, students, ratio, tuition, SAT/ACT, website, rating. Full profile add-on: phone, address, all grades, rankings, stats. Filters, monitor mode. No login.",
    "version": "0.1",
    "x-build-id": "LtpbtEk6fHqzlBT9t"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapersdelight~niche-schools-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapersdelight-niche-schools-scraper",
        "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/scrapersdelight~niche-schools-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapersdelight-niche-schools-scraper",
        "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/scrapersdelight~niche-schools-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapersdelight-niche-schools-scraper",
        "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": {
          "list": {
            "title": "Ranking list",
            "enum": [
              "best-schools",
              "most-diverse-schools",
              "best-teachers-schools",
              "college-prep-schools",
              "largest-schools",
              "best-for-stem-schools",
              "best-for-arts-schools",
              "best-sports-schools",
              "standout-schools",
              "best-school-districts",
              "best-colleges",
              "top-public-universities",
              "best-value-colleges"
            ],
            "type": "string",
            "description": "Which Niche ranking to read. School lists cover public, private, charter and magnet K-12 schools; districts and colleges have their own lists.",
            "default": "best-schools"
          },
          "locations": {
            "title": "Locations",
            "type": "array",
            "description": "One search per location: a state (\"Texas\", \"TX\"), a city (\"Austin, TX\"), a county (\"Travis County, TX\"), a school district (\"Austin ISD\") or a ZIP code (\"10024\"). Empty = the whole United States.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Niche URLs",
            "type": "array",
            "description": "Niche search pages (filters kept), e.g. https://www.niche.com/k12/search/best-private-high-schools/s/california/, or profiles: /k12/<school>/, /k12/d/<district>/, /colleges/<college>/.",
            "items": {
              "type": "string"
            }
          },
          "gradeLevels": {
            "title": "Grade levels",
            "type": "array",
            "description": "Niche's grade-level filter (school lists only). Several = any of them.",
            "items": {
              "type": "string",
              "enum": [
                "pk",
                "elementary",
                "middle",
                "high",
                "k8",
                "k12"
              ],
              "enumTitles": [
                "Pre-K",
                "Elementary",
                "Middle",
                "High school",
                "K-8 only",
                "K-12 only"
              ]
            }
          },
          "schoolTypes": {
            "title": "School types",
            "type": "array",
            "description": "Public, charter, magnet or private. Empty = every type.",
            "items": {
              "type": "string",
              "enum": [
                "public",
                "traditional",
                "charter",
                "magnet",
                "private"
              ],
              "enumTitles": [
                "Public (all)",
                "Public - traditional",
                "Public - charter",
                "Public - magnet",
                "Private"
              ]
            }
          },
          "religions": {
            "title": "Religion",
            "type": "array",
            "description": "Religious affiliation (private schools).",
            "items": {
              "type": "string",
              "enum": [
                "catholic",
                "christian",
                "jewish",
                "islamic"
              ],
              "enumTitles": [
                "Catholic",
                "Christian",
                "Jewish",
                "Islamic"
              ]
            }
          },
          "boardingOnly": {
            "title": "Offers boarding",
            "type": "boolean",
            "description": "Only schools that offer boarding.",
            "default": false
          },
          "coed": {
            "title": "Coed status",
            "enum": [
              "any",
              "coed",
              "all-girls",
              "all-boys"
            ],
            "type": "string",
            "description": "Coed, all-girls or all-boys schools.",
            "default": "any"
          },
          "specialties": {
            "title": "Specialty",
            "type": "array",
            "description": "Online, special-education, Montessori or therapeutic schools.",
            "items": {
              "type": "string",
              "enum": [
                "online",
                "special-education",
                "montessori",
                "therapeutic"
              ],
              "enumTitles": [
                "Online",
                "Special education",
                "Montessori",
                "Therapeutic"
              ]
            }
          },
          "programs": {
            "title": "Academic programs",
            "type": "array",
            "description": "Schools offering AP, IB or gifted/talented programs.",
            "items": {
              "type": "string",
              "enum": [
                "ap",
                "ib",
                "gifted"
              ],
              "enumTitles": [
                "AP program",
                "IB program",
                "Gifted/talented program"
              ]
            }
          },
          "organization": {
            "title": "Organization",
            "enum": [
              "any",
              "nais",
              "tabs",
              "ncea",
              "acsi",
              "csi"
            ],
            "type": "string",
            "description": "Member schools of one association.",
            "default": "any"
          },
          "highestGrade": {
            "title": "Highest grade offered",
            "enum": [
              "any",
              "pk",
              "k",
              "1",
              "2",
              "3",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              "10",
              "11",
              "12"
            ],
            "type": "string",
            "description": "Leave out schools that teach grades above this one (e.g. Grade 8 = no high schools).",
            "default": "any"
          },
          "maxTuition": {
            "title": "Max tuition (USD/year)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Private schools at or under this yearly tuition (Niche's slider runs $2,000-$60,000). Empty = no limit."
          },
          "maxStudentTeacherRatio": {
            "title": "Max student-teacher ratio",
            "minimum": 2,
            "maximum": 50,
            "type": "integer",
            "description": "e.g. 12 = 12 students per teacher or fewer. Empty = no limit."
          },
          "minAcademicsGrade": {
            "title": "Academics grade",
            "enum": [
              "any",
              "a",
              "b",
              "c",
              "d"
            ],
            "type": "string",
            "description": "Niche's Academics grade at or above this letter.",
            "default": "any"
          },
          "minTeachersGrade": {
            "title": "Teachers grade",
            "enum": [
              "any",
              "a",
              "b",
              "c",
              "d"
            ],
            "type": "string",
            "description": "Niche's Teachers grade at or above this letter.",
            "default": "any"
          },
          "minDiversityGrade": {
            "title": "Diversity grade",
            "enum": [
              "any",
              "a",
              "b",
              "c",
              "d"
            ],
            "type": "string",
            "description": "Niche's Diversity grade at or above this letter.",
            "default": "any"
          },
          "minSportsGrade": {
            "title": "Sports grade",
            "enum": [
              "any",
              "a",
              "b",
              "c",
              "d"
            ],
            "type": "string",
            "description": "Niche's Sports grade at or above this letter.",
            "default": "any"
          },
          "nameContains": {
            "title": "Name contains",
            "type": "array",
            "description": "Keep schools whose name contains any of these words, e.g. \"Academy\", \"Prep\". Checked before anything is charged.",
            "items": {
              "type": "string"
            }
          },
          "minReviews": {
            "title": "Min reviews",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Only schools with at least this many Niche reviews. 0 = any.",
            "default": 0
          },
          "minRating": {
            "title": "Min star rating",
            "minimum": 0,
            "maximum": 5,
            "type": "number",
            "description": "Only schools whose average review rating is at least this (1-5). 0 = any.",
            "default": 0
          },
          "withWebsiteOnly": {
            "title": "With website only",
            "type": "boolean",
            "description": "Only schools whose website Niche publishes (needs School stats on).",
            "default": false
          },
          "includeStats": {
            "title": "School stats",
            "type": "boolean",
            "description": "Academics, diversity and teachers grades, website, tuition, graduation rate, SAT/ACT, AP and proficiency (colleges: tuition, earnings, application URL). Read 25 schools at a time; no extra charge.",
            "default": true
          },
          "includeProfile": {
            "title": "Full profile (add-on)",
            "type": "boolean",
            "description": "Reads each school's Niche profile page: phone, street address, ZIP, every subject grade, all rankings, the stats table with national figures, survey results, star histogram and latest reviews. Charged per school as school-profile.",
            "default": false
          },
          "maxReviewsPerSchool": {
            "title": "Latest reviews per school",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "How many of the newest reviews to keep from the profile page (0-3; the profile shows 3). Needs Full profile.",
            "default": 3
          },
          "monitorMode": {
            "title": "Monitor mode",
            "type": "boolean",
            "description": "Deliver only schools that are new since the last run, or whose rank or overall grade changed (with the previous values). Pairs with a schedule.",
            "default": false
          },
          "monitorStoreName": {
            "title": "Monitor store name",
            "type": "string",
            "description": "Name of the key-value store that remembers delivered schools. Use one name per search you monitor."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "maximum": 200000,
            "type": "integer",
            "description": "Most rows to deliver in this run (0 = no limit). Niche lists every school it ranks: 126,000+ schools nationally.",
            "default": 50
          },
          "maxResultsPerSearch": {
            "title": "Max results per location",
            "minimum": 0,
            "maximum": 200000,
            "type": "integer",
            "description": "Cap for each location or pasted search URL (0 = no cap).",
            "default": 0
          },
          "compact": {
            "title": "Compact output",
            "type": "boolean",
            "description": "Core columns only (name, type, location, grade, rank, size, tuition, website, phone, rating) - for spreadsheets and AI agents.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Leave as is: the Actor starts on a direct connection and switches routes by itself when Niche refuses one. Your own proxy URLs are used first when given.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}