{
  "openapi": "3.1.0",
  "info": {
    "title": "FewerJobs Public API",
    "version": "0.1.0",
    "description": "Read-only public API for FewerJobs.com — curated remote jobs at companies with verified family-friendly benefits. No authentication required. AI-friendly.",
    "contact": {
      "email": "hello@fewerjobs.com",
      "url": "https://fewerjobs.com"
    },
    "license": {
      "name": "Site content © FewerJobs; underlying job postings remain employer-owned."
    }
  },
  "servers": [
    {
      "url": "https://fewerjobs.com"
    }
  ],
  "paths": {
    "/api/jobs.json": {
      "get": {
        "summary": "List or search jobs",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Keyword search"
          },
          {
            "name": "remote",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 2
            }
          },
          {
            "name": "salary_min",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "parental_leave_min",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "non_birth_parent_leave_min",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "posted_within_days",
            "in": "query",
            "schema": {
              "type": "integer",
              "enum": [
                7,
                14,
                30
              ]
            }
          },
          {
            "name": "seniority",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "entry",
                "mid",
                "senior",
                "staff_plus"
              ]
            }
          },
          {
            "name": "family_friendly",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "visa_sponsorship",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "include_unknown_benefits",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 24
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "recent",
                "leave_weeks",
                "salary",
                "relevance"
              ],
              "default": "recent"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Job listing page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobPage"
                }
              }
            }
          }
        }
      }
    },
    "/api/jobs/{id}.json": {
      "get": {
        "summary": "Get a single job by ID",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Job",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          },
          "410": {
            "description": "Removed (apply URL went dead)"
          }
        }
      }
    },
    "/api/employers.json": {
      "get": {
        "summary": "List employer profiles",
        "responses": {
          "200": {
            "description": "Employers"
          }
        }
      }
    },
    "/api/employers/{slug}.json": {
      "get": {
        "summary": "Get an employer profile",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Employer"
          }
        }
      }
    },
    "/api/feedback": {
      "post": {
        "summary": "Report a data error or suggestion",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "kind",
                  "message"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "data_error",
                      "feature",
                      "takedown",
                      "other"
                    ]
                  },
                  "job_id": {
                    "type": "string"
                  },
                  "employer_slug": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  },
                  "contact_email": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted"
          }
        }
      }
    },
    "/api/waitlist": {
      "post": {
        "summary": "Subscribe to the weekly digest",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "interests": {
                    "type": "string"
                  },
                  "eu_waitlist": {
                    "type": "boolean",
                    "default": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Job": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "employer_name": {
            "type": "string"
          },
          "employer_slug": {
            "type": "string"
          },
          "employer_url": {
            "type": "string",
            "format": "uri"
          },
          "location_text": {
            "type": "string"
          },
          "remote_status": {
            "type": "string",
            "enum": [
              "remote",
              "hybrid",
              "onsite"
            ]
          },
          "salary_min": {
            "type": "integer",
            "nullable": true
          },
          "salary_max": {
            "type": "integer",
            "nullable": true
          },
          "salary_disclosed": {
            "type": "boolean"
          },
          "posted_at": {
            "type": "string",
            "format": "date-time"
          },
          "apply_url": {
            "type": "string",
            "format": "uri"
          },
          "url_last_checked_alive": {
            "type": "string",
            "format": "date-time"
          },
          "description_excerpt": {
            "type": "string",
            "description": "~25-word excerpt; full text at apply_url"
          },
          "fewerjobs:parental_leave_weeks": {
            "type": "integer",
            "nullable": true
          },
          "fewerjobs:non_birth_parent_leave_weeks": {
            "type": "integer",
            "nullable": true
          },
          "fewerjobs:parental_leave_source_url": {
            "type": "string",
            "format": "uri",
            "nullable": true
          },
          "fewerjobs:benefit_verified": {
            "type": "boolean"
          },
          "fewerjobs:benefit_last_verified": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "fewerjobs:hire_states_allowed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "JobPage": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Job"
            }
          },
          "total": {
            "type": "integer"
          },
          "page": {
            "type": "integer"
          },
          "per_page": {
            "type": "integer"
          },
          "applied_filters": {
            "type": "object",
            "additionalProperties": true
          },
          "hidden_unknown_benefits_count": {
            "type": "integer",
            "description": "Jobs hidden because benefit policy is unverified. Set include_unknown_benefits=true to include them."
          }
        }
      }
    }
  }
}