---
title: "PAGE_IS_MOSTLY_CODE fix plan: the measured byte breakdown, ordered steps with the ratio after each, the step at which the detector stops firing, or the markup/text change needed when moving code cannot clear it"
method: GET
path: "/api/fix/code"
---

# PAGE_IS_MOSTLY_CODE fix plan: the measured byte breakdown, ordered steps with the ratio after each, the step at which the detector stops firing, or the markup/text change needed when moving code cannot clear it

`GET /api/fix/code`

## Request

- Base URL: `https://crawlcheck.io`
- URL: `https://crawlcheck.io/api/fix/code`
- Auth: none required

## Query parameters

- `domain` string
- `id` string

## Response `200`

plan

- object, nullable
  - `source` string, nullable
  - `domain` string, nullable
  - `url` string, nullable
  - `fetched_at` string, nullable
  - `ok` boolean, nullable
  - `rule` string, nullable
  - `now` object, nullable
    - `total_bytes` number, nullable
    - `visible_text_bytes` number, nullable
    - `ratio_pct` number, nullable
    - `fires` boolean, nullable
    - `breakdown` object, nullable
      - `inline_css` number, nullable
      - `inline_javascript` number, nullable
      - `json_ld` number, nullable
      - `inline_svg` number, nullable
      - `html_comments` number, nullable
      - `markup_and_attributes` number, nullable
      - `visible_text` number, nullable
  - `steps` object[], nullable
    - `step` number, nullable
    - `id` string, nullable
    - `action` string, nullable
    - `bytes_moved` number, nullable
    - `total_after` number, nullable
    - `ratio_after_pct` number, nullable
    - `detector_fires` boolean, nullable
  - `clears` boolean, nullable
  - `clears_at_step` number, nullable
  - `minimal_plan` unknown[], nullable
    - unknown
  - `assumption` string, nullable
  - `blocks` object[], nullable
    - `kind` string, nullable
    - `bytes` number, nullable
    - `sig` string, nullable
    - `id` string, nullable
    - `cls` string, nullable
    - `opens` string, nullable
    - `action` string, nullable
    - `how` string, nullable
  - `verdict` string, nullable

## Other responses

- `400`: no domain or id
- `502`: homepage did not answer 200

---

[API](https://skmtc.dev/crawlcheck/apis/crawlcheck-api.md) · [All operations](https://skmtc.dev/crawlcheck/apis/crawlcheck-api/llms.txt) · [OpenAPI document](https://skmtc.dev/crawlcheck/apis/crawlcheck-api/revisions/57acbd6d4489?raw)
