AgentFlare

Guides · For publishers · Intermediate

Pricing Content by Directory: Best Practices

Price deep content per directory by pairing free teasers with metered .data.json and .full.md files. The AgentFlare pricing.json shows pay, allow and block rules, per-request prices, priorities and regex URL patterns.

LevelIntermediate
Reading time6 min
Steps55 with code
Sources5primary docs
✓ Open accessFree

You're reading the full report — free for humans. The machine-readable dataset for this section is open to all agents too — no payment required.

⚡ Agents: fetch .data.json → agents: allowed (no charge) · verify at https://esa.aisa.one/api/v1/access/verify

This guide is for publishers who want to keep their SEO and GEO surface open while charging AI crawlers for deep content. Using the AgentFlare pricing.json as a worked example, you will split content into a free tier and a paid tier, set a price for each directory, and write regex rules with pay, allow and block modes. You will also order rules by priority, import them into cdn-agent Content Controls, and check from the crawler side that each directory returns what you intended.

How the flow works

For publishersDrawn from the AISA agent and publisher documentation
Publisher-side access decision flow: 1. Crawler to Your edge: GET /dir/file; 2. Your edge to AISA verify: POST verify: URL, token, UA; 3. AISA verify to Your edge: decision: allow / pay / block; 4. Your edge to Your origin: fetch when granted; 5. Your edge to Crawler: 200 content; 6. Your edge to Crawler: or 402 / 403 JSONCrawlerany agentYour edgeCDN / gatewayAISA verify/api/v1/access/verifyYour origincontent1. GET /dir/file2. POST verify: URL, token, UA3. decision: allow / pay / block4. fetch when granted5. 200 content6. or 402 / 403 JSON
Price per paid request, by directoryAgentFlare pricing.json · deep files (.data.json, .full.md) only; HTML and .md are free
USD per request: /research/ $0.02, /scholar/ $0.02, /crypto/ $0.01, /markets/ $0.01, /social/ $0.01, /predictions/ $0.01, /news/ $0.005/research/$0.02/scholar/$0.02/crypto/$0.01/markets/$0.01/social/$0.01/predictions/$0.01/news/$0.005

Before you start

  • A publisher site with content organised in URL directories
  • An AISA publisher account with access to Content Controls
  • Basic familiarity with regular expressions and curl

Step by step

  1. Split content into free and paid tiers

    Decide what stays open and what is metered. AgentFlare defines L1_free as index pages, .html articles, .md teasers, llms.txt, sitemap.xml and robots.txt. L2_paid is *.data.json and *.full.md, meaning complete datasets and full analysis. The model is simple: free teasers drive SEO and GEO, and deep payloads are metered per crawl. Record both tiers in your pricing.json so crawlers can read them before they fetch anything.

    text
    default_mode: allow
    L1_free: index pages, .html articles, .md teasers, llms.txt, sitemap.xml, robots.txt
    L2_paid: *.data.json + *.full.md
  2. Set a price for each directory

    Give every directory its own price in directory_pricing_usd. AgentFlare charges 0.005 for news, 0.01 for crypto, markets, social and predictions, and 0.02 for research and scholar. Prices are per directory, not per site, so you can charge more for analysis-heavy sections. Billing is per request: a crawler that fetches the same URL twice pays twice.

    text
    directory_pricing_usd:
      news: 0.005
      crypto: 0.01
      markets: 0.01
      social: 0.01
      predictions: 0.01
      research: 0.02
      scholar: 0.02
  3. Write a pay rule per directory

    Each pay rule targets only the L2 files of one directory using a regex urlPattern, with patternType regex, mode pay, a price, currency USD, billingType per-request and a priority. The news rule is shown below at priority 100; the other pay directories follow at 99 down to 94. Rules are first-match-wins, and query strings are stripped before matching, so ?utm parameters do not change the result.

    text
    description: Newswire - deep structured data (L2, metered)
    urlPattern: ^/news/.*\.(data\.json|full\.md)$
    patternType: regex
    mode: pay
    price: 0.005
    currency: USD
    billingType: per-request
    priority: 100
  4. Add allow and block rules explicitly

    Use the other two modes for exceptions. AgentFlare opens /guides/ deep files with mode allow and price 0 at priority 93, and shuts /members/ deep files with mode block and price 0 at priority 92. A block returns 403 access_blocked regardless of token or balance, so payment never unlocks it. Allow returns 200 with no token required. Anything unmatched falls back to default allow and is not charged.

    text
    guides:  ^/guides/.*\.(data\.json|full\.md)$  mode: allow  price: 0  priority: 93
    members: ^/members/.*\.(data\.json|full\.md)$ mode: block  price: 0  priority: 92
  5. Import the rules and test as a crawler

    Import the rules array into cdn-agent Content Controls (ai_publisher_rules); the rule fields map 1:1 to the publisher rule schema. Then crawl a priced URL with the crawler identity header X-Crawler-Token, which replaces the earlier X-AISA-Crawler-Token. Send it as a header, never in Authorization: Bearer, which is reserved for the gateway. Expect 200 for free or paid, 402 for payment problems, and 403 for blocked paths.

    bash
    curl -i 'https://PUBLISHER-SITE/research/report.data.json' \
      -H 'X-Crawler-Token: YOUR_CRAWLER_TOKEN' \
      -A 'MyBot/1.0 (+https://example.com/bot)'
    
    # Free tier needs no token
    curl -i 'https://PUBLISHER-SITE/research/report.md'
    
    # Blocked path
    curl -i 'https://PUBLISHER-SITE/members/report.full.md' \
      -H 'X-Crawler-Token: YOUR_CRAWLER_TOKEN'

AgentFlare directory rules at a glance

DirectoryModePrice USDPriority
newspay0.005100
socialpay0.0199
marketspay0.0198
predictionspay0.0197
cryptopay0.0196
research, scholarpay0.0295, 94
guidesallow093
membersblock092

Common pitfalls

  • Do not widen a pattern beyond .data.json and .full.md. The example rules anchor on those extensions so free .html and .md teasers stay open.
  • Do not expect payment to unlock a block rule. Block returns 403 access_blocked regardless of token or balance, and denials never charge.
  • Do not rewrite 402 or 403 bodies at the gateway. Pass the JSON through unmodified so its onboarding and guidance blocks reach the crawler.
  • Do not rely on query strings to separate pricing. They are stripped before rule matching, so write patterns against the path only.

Key takeaways

  • Keep teasers free and meter only .data.json and .full.md files, using one regex pay rule per directory.
  • Rules are first-match-wins, so give each rule a priority; unmatched paths stay free under default allow.
  • Use allow for open data and block for members-only content; only pay rules ever charge a crawler.

FAQ

What happens to URLs that match no pricing rule?

They get a 200 default allow and are not charged. AgentFlare sets default_mode to allow so the SEO and GEO surface stays open while only the deep directories are monetized.

How is a crawler billed for a pay rule?

Billing is per request. Each granted fetch of a priced resource deducts that resource's price once, so fetching it twice costs twice. Denials never charge.

What does a crawler see when it hits a block rule?

A 403 with error access_blocked. Payment does not unlock it. The crawler is advised to pivot to your pay-mode directories listed in pricing.json.

How do I load the pricing.json rules into AISA?

Import the rules array into cdn-agent Content Controls (ai_publisher_rules). AISA also offers POST /api/publisher/rules/bulk-import and POST /api/publisher/discover, which reads your pricing.json or sitemap.

How this page is made. Written from 5 primary sources — the AISA agent and publisher documentation and AgentFlare's own files (pricing.json, robots.txt, llms.txt, live responses, .data.json field lists). Each step links the sources it relies on; steps naming a header, endpoint, error code or figure that the sources do not contain are removed. Refreshed weekly.

Sources & citations

  1. Header name: X-Crawler-Token esa.aisa.one
  2. AgentFlare pricing.json (directory price map) agentflare.org
  3. AISA verify API for publishers and edge gateways (llms.txt) esa.aisa.one
  4. AISA publisher API documentation esa.aisa.one
  5. AISA Agent Integration Guide — API reference esa.aisa.one