AY Rank Page size API

Measure a URL's transferred and uncompressed size against Googlebot's 2 MB limit, with what sits past the cut. No score.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 2

GET /api/v1/page-size-checker Measure a URL's size against Googlebot's 2 MB limit #
POST /api/v1/page-size-checker Measure a URL's size against Googlebot's 2 MB limit #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ayrank-com:ayrank-com-page-size-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ayrank-com-page-size-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AY Rank Free Tools Page size API
  version: 1.0.0
  summary: Free JSON API for AY Rank SEO and GEO tools.
  description: 'Public JSON versions of the free tools at https://www.ayrank.com/tools. Every endpoint takes GET with query parameters or POST with a JSON body (max 32768 bytes). Free, no key. Rate limit: 30 requests per 60 seconds per IP, shared across all /api/v1 tools. Each success response includes a poweredBy link back to the tool page.'
  termsOfService: https://www.ayrank.com/terms
  contact:
    name: AY Rank
    url: https://www.ayrank.com
servers:
- url: https://www.ayrank.com
tags:
- name: Page size
  description: Measure a URL's transferred and uncompressed size against Googlebot's 2 MB limit, with what sits past the cut. No score.
paths:
  /api/v1/page-size-checker:
    get:
      tags:
      - Page size
      summary: Measure a URL's size against Googlebot's 2 MB limit
      description: 'Downloads one URL (redirects followed by hand, each hop checked) with Accept-Encoding: gzip, deflate, br, the encodings Google''s crawlers advertise, and counts the body twice: transferredBytes (as sent, compressed when Content-Encoding is set) and decodedBytes (after decompression). Google''s Googlebot page: "Googlebot crawls the first 2MB of a supported file type, and the first 64MB of a PDF file" and "The file size limit is applied on the uncompressed data", so the verdict uses decodedBytes. 1 MB is counted as 1,048,576 bytes (Google does not say), so the limit is 2,097,152 bytes (67,108,864 for PDF). verdict: under, borderline (over 2,000,000 bytes but not over 2,097,152, which is over the limit if 1MB means 1,000,000 bytes), over, unknown (the read stopped before the end and the size so far is under the limit), not-applicable (images and video, which Google says may have different limits; they are not downloaded). overCrawlerDefault compares with the 15MB default for Google''s crawlers and fetchers. For HTML (only the first 4 MB is analysed): pastCut counts the headings, links (a with href) and visible text characters after byte 2,097,152 and gives the first heading whose tag starts after it; parts splits the bytes into inline script, JSON (JSON-LD, __NEXT_DATA__), Next.js RSC payload (self.__next_f scripts, grouped), style, inline svg, data: URIs, comments and the rest (markup and text); blocks lists the 10 biggest. Byte positions inside the HTML are counted as UTF-8. No score and no ranking claim. Caps: 16 MB read (compressed or not), 6 s for each request to answer, 20 s per call including the download, 5 redirects. JavaScript is not run and linked files (CSS, scripts, images) are not fetched. Public http(s) URLs on ports 80 and 443 only; a blocked or invalid URL returns 400. A URL that answers 4xx or 5xx returns 200 with status set and report null. Free, no key. Rate limit: 30 requests per 60 seconds per IP, shared across all /api/v1 tools.'
      externalDocs:
        description: Use the tool in a browser
        url: https://www.ayrank.com/tools/page-size-checker
      operationId: pageSizeCheckerGet
      parameters:
      - name: url
        in: query
        required: true
        description: The page or file to measure, like https://example.com/page.
        schema:
          type: string
      responses:
        '200':
          description: Result
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageSizeResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/RateLimited'
    post:
      tags:
      - Page size
      summary: Measure a URL's size against Googlebot's 2 MB limit
      description: 'Downloads one URL (redirects followed by hand, each hop checked) with Accept-Encoding: gzip, deflate, br, the encodings Google''s crawlers advertise, and counts the body twice: transferredBytes (as sent, compressed when Content-Encoding is set) and decodedBytes (after decompression). Google''s Googlebot page: "Googlebot crawls the first 2MB of a supported file type, and the first 64MB of a PDF file" and "The file size limit is applied on the uncompressed data", so the verdict uses decodedBytes. 1 MB is counted as 1,048,576 bytes (Google does not say), so the limit is 2,097,152 bytes (67,108,864 for PDF). verdict: under, borderline (over 2,000,000 bytes but not over 2,097,152, which is over the limit if 1MB means 1,000,000 bytes), over, unknown (the read stopped before the end and the size so far is under the limit), not-applicable (images and video, which Google says may have different limits; they are not downloaded). overCrawlerDefault compares with the 15MB default for Google''s crawlers and fetchers. For HTML (only the first 4 MB is analysed): pastCut counts the headings, links (a with href) and visible text characters after byte 2,097,152 and gives the first heading whose tag starts after it; parts splits the bytes into inline script, JSON (JSON-LD, __NEXT_DATA__), Next.js RSC payload (self.__next_f scripts, grouped), style, inline svg, data: URIs, comments and the rest (markup and text); blocks lists the 10 biggest. Byte positions inside the HTML are counted as UTF-8. No score and no ranking claim. Caps: 16 MB read (compressed or not), 6 s for each request to answer, 20 s per call including the download, 5 redirects. JavaScript is not run and linked files (CSS, scripts, images) are not fetched. Public http(s) URLs on ports 80 and 443 only; a blocked or invalid URL returns 400. A URL that answers 4xx or 5xx returns 200 with status set and report null. Free, no key. Rate limit: 30 requests per 60 seconds per IP, shared across all /api/v1 tools.'
      externalDocs:
        description: Use the tool in a browser
        url: https://www.ayrank.com/tools/page-size-checker
      operationId: pageSizeCheckerPost
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PageSizeRequest'
      responses:
        '200':
          description: Result
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageSizeResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  headers:
    Retry-After:
      description: Seconds to wait before retrying.
      schema:
        type: integer
    X-RateLimit-Reset:
      description: Seconds until the window resets.
      schema:
        type: integer
    X-RateLimit-Remaining:
      description: Requests left in the current window.
      schema:
        type: integer
    X-RateLimit-Limit:
      description: Requests allowed per window.
      schema:
        type: integer
  responses:
    BadRequest:
      description: 'Invalid input: unknown field, wrong type, missing required field, value too long, or bad JSON.'
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Rate limit hit. Wait Retry-After seconds.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
      - error
      - docs
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              enum:
              - invalid_input
              - rate_limited
            message:
              type: string
        docs:
          type: string
          format: uri
    PageSizeRequest:
      type: object
      required:
      - url
      additionalProperties: false
      properties:
        url:
          type: string
          maxLength: 2000
          description: The page or file to measure.
      examples:
      - url: https://www.ayrank.com/
    PageSizeResponse:
      type: object
      required:
      - input
      - finalUrl
      - status
      - redirects
      - error
      - report
      - limits
      - checkedAt
      - poweredBy
      properties:
        input:
          type: string
        finalUrl:
          type: string
          description: URL that answered after redirects.
        status:
          type:
          - integer
          - 'null'
        redirects:
          type: integer
        error:
          type:
          - string
          - 'null'
          description: timeout, network, too-many-redirects or null. A read that stops during the download is reported in report.stopped instead.
        contentType:
          type: string
        contentEncoding:
          type:
          - string
          - 'null'
          description: Content-Encoding as sent, like br or gzip.
        contentLength:
          type:
          - integer
          - 'null'
          description: Content-Length as sent, if any.
        report:
          type:
          - object
          - 'null'
          description: 'Null unless the final answer was 2xx. { kind (html, pdf, image, video, other), limit, limitDecimal, transferredBytes, decodedBytes, exact (whole body read), stopped (cap, timeout, network, decode or null), encoding, ratio, verdict (under, borderline, over, unknown, not-applicable), percent (decodedBytes / limit * 100), headroom (limit minus decodedBytes; negative when over), overCrawlerDefault, transferredOver, html }. html is null unless kind is html: { analysedBytes, partial, total { headings, links, textChars }, pastCut (null unless over 2,097,152 bytes) { bytes, headings, links, textChars, firstHeading { level, text, start } or null, partial, analysedBytes }, parts { script, json, rsc, style, svg, data-uri, comment, rest }, blocks [{ kind, label, bytes, share, start, count }] }. There is no score field.'
        limits:
          type: object
          description: The caps used for this call.
        checkedAt:
          type: string
          format: date-time
        poweredBy:
          $ref: '#/components/schemas/PoweredBy'
    PoweredBy:
      type: object
      required:
      - text
      - url
      properties:
        text:
          type: string
          const: Powered by AY Rank
        url:
          type: string
          format: uri