Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Parse robots.txt

web.parse_robots_txt

ProductionBounded custom (Class B)Deterministicverifiablefastv1.0.0
No network

Overview

You hand us the text of a robots.txt file and we split it into user-agent groups, work out whether one path is crawlable by one agent, and collect the Sitemap lines. Matching follows RFC 9309: the longest matching rule wins, and Allow beats Disallow when two rules tie on length. We only read the content you send, never the network, and the answer is crawl etiquette rather than an access control you can rely on.

Robots rules look simple and then bite: longest-match and tie-breaking are easy to get wrong by hand, and you want the same answer every time you ask.

Reliability

Same file, same agent, same path, same answer, every time, with nothing leaving the platform. A few behaviours are worth knowing before you trust the result: a rule matches as a prefix of your path, "*" matches any run of characters, and a trailing "$" anchors the end; an empty Disallow value matches nothing, so it leaves the path crawlable; a group is chosen because its token appears inside the agent name you sent, so a short token like "bot" can capture an agent you did not expect; and when no group matches and there is no "*" group, we answer allowed:true with no matchedRule. Bad input is rejected outright and retrying will not help — missing content, content over 2000000 characters, or, when strict is true, the first malformed or unrecognised directive line.

Context footprint

The response grows with the file: every group and rule comes back, so a very long robots.txt returns a correspondingly long groups array. A successful call costs 1 execution credit.

When to use it

Before you crawl a path, or when auditing crawl rules from a file you already hold. If the next step is an SEO robots check such as seo.simulate_robot_access, start from seo.parse_robots_txt instead — this twin also answers the path in the same call.

When the rules still need fetching, or when the answer would gate access to something that matters.

Scope

Note
We read robots.txt text you already hold and answer whether one agent may crawl one path.

Non-goals

  • Does not fetch robots.txt, or anything else, over the network
  • Does not crawl, queue, or schedule crawls
  • Does not percent-decode paths before matching them
  • Does not honour Crawl-delay, Host, or other non-standard lines
  • Is crawl etiquette, never an authorization or security control

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

analysisparsing

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input1.9 MB

How we handle your data

Sensitive input, safe output
What this means

This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response does not contain submitted content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
contentstringYesrobots.txt content to parse.
userAgentstringNoUser-agent token evaluated against the groups; omit it for *.
pathstringYesOrigin-relative path evaluated against rules.
baseUrlstringNoOptional absolute origin used to resolve sitemap values; omit it to keep them as written.
includeSitemapsbooleanNoWhether sitemap declarations are returned; omit it for true.
strictbooleanNoWhether malformed directives are errors; omit it for false.

Output schema

FieldTypeRequiredDescription
allowedbooleanYesWhether the selected path is allowed.
matchedRuleobjectNoClosed matched-rule receipt with directive, pattern, and source-order properties. Its documented web receipt properties are bounded to 128 entries — unconstrained RFC 8259 JSON items.
groupsarrayYesBounded array of parsed user-agent group receipts in source order. The item shape is defined by the nested schema and the array contains from 0 through 10000 items.
sitemapsarrayYesBounded array of sitemap locations in source order. The item shape is defined by the nested schema and the array contains from 0 through 10000 items.
warningsarrayNoBounded array of non-fatal safe warning strings. The item shape is defined by the nested schema and the array contains from 0 through 20000 items.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"web.parse_robots_txt","input":{"content":"User-agent: *\nDisallow: /private","path":"/private"}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("web.parse_robots_txt", {"path":"/private/page.html","content":"User-agent: *\nDisallow: /private\n","userAgent":"SquillifyBot"});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not fetch robots.txt, or anything else, over the network
  • Does not crawl, queue, or schedule crawls
  • Does not percent-decode paths before matching them
  • Does not honour Crawl-delay, Host, or other non-standard lines
  • Is crawl etiquette, never an authorization or security control
  • Fetching robots.txt for a domain — bring the text with you instead
  • Deciding who may reach a resource, which needs a real access control

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "web.parse_robots_txt",
  "input": {
    "path": "/private/page.html",
    "content": "User-agent: *\nDisallow: /private\n",
    "userAgent": "SquillifyBot"
  }
}

Examples

Disallow blocks a private path

Inputjson
{
  "path": "/private/page.html",
  "content": "User-agent: *\nDisallow: /private\n",
  "userAgent": "SquillifyBot"
}
Expected outputjson
{
  "warnings": [],
  "matchedRule": {
    "directive": "Disallow",
    "pattern": "/private",
    "line": 2
  },
  "sitemaps": [],
  "allowed": false,
  "groups": [
    {
      "rules": [
        {
          "directive": "Disallow",
          "line": 2,
          "value": "/private"
        }
      ],
      "userAgents": [
        "*"
      ]
    }
  ]
}

Longer Allow wins over shorter Disallow

Inputjson
{
  "path": "/private/public/page",
  "content": "User-agent: *\nDisallow: /private\nAllow: /private/public\n"
}
Expected outputjson
{
  "warnings": [],
  "matchedRule": {
    "directive": "Allow",
    "pattern": "/private/public",
    "line": 3
  },
  "sitemaps": [],
  "allowed": true,
  "groups": [
    {
      "rules": [
        {
          "directive": "Disallow",
          "line": 2,
          "value": "/private"
        },
        {
          "directive": "Allow",
          "line": 3,
          "value": "/private/public"
        }
      ],
      "userAgents": [
        "*"
      ]
    }
  ]
}
  • Check a path is crawlable before you queue it
  • Pull the sitemap URLs a site declares in its robots.txt
  • Audit the crawl rules in a saved robots.txt snapshot

Avoid for

  • Fetching robots.txt for a domain — bring the text with you instead
  • Deciding who may reach a resource, which needs a real access control

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

webseoparsingrobots