Skip to content

Repository files navigation

FlyWeb

SEO for the AI era. Make your website visible, readable, and cited by every AI agent.

npmFlyWeb enabled

An open protocol that lets every website describe its content in a structured way machines can understand. One file. Universal discovery. Enforced attribution.

robots.txt tells machines where not to go. flyweb.json tells them what you have — and how to credit you.

How It Works

Every website publishes /.well-known/flyweb.json:

{
"flyweb": "1.0",
"entity": "TechCrunch",
"type": "news",
"attribution": {
"required": true,
"license": "CC-BY-4.0",
"must_link": true
},
"resources": {
"articles": {
"path": "/.flyweb/articles",
"format": "jsonl",
"fields": ["title", "author", "date", "content"],
"access": "free",
"query": "?tag={tag}"
}
}
}

AI agents check this file first — no scraping, no guessing. Your content, your credit, your terms.

Packages

PackageDescriptionnpm
flywebCore types, validation, CLI, and client SDKnpm
next-flywebNext.js integrationnpm
astro-flywebAstro integrationnpm
sveltekit-flywebSvelteKit integrationnpm
nuxt-flywebNuxt/Vue integrationnpm
express-flywebExpress/Node.js middlewarenpm

CLI

npx flyweb check https://example.com # check any website
npx flyweb check ./flyweb.json # validate local file
npx flyweb discover https://example.com # discover & fetch structured data
npx flyweb init # generate starter config

Client SDK

For AI agents and developers consuming FlyWeb-enabled sites:

import{discover,fetchResource}from'flyweb/client';constsite=awaitdiscover('https://example.com');console.log(site.config.entity);// "TechCrunch"constarticles=awaitfetchResource('https://example.com',site.config.resources.articles,{params: {tag: 'ai'},limit: 10});

Quick Start

Next.js:

npm install next-flyweb
// app/.well-known/flyweb.json/route.tsimport{createHandler}from'next-flyweb';exportconstGET=createHandler({flyweb: '1.0',entity: 'My Blog',type: 'blog',attribution: {required: true,license: 'CC-BY-4.0',must_link: true},resources: {posts: {path: '/.flyweb/posts',format: 'jsonl',fields: ['title','author','date','content'],access: 'free',},},});

SvelteKit:

npm install sveltekit-flyweb
// src/routes/.well-known/flyweb.json/+server.tsimport{createHandler}from'sveltekit-flyweb';exportconstGET=createHandler({flyweb: '1.0',entity: 'My Blog',type: 'blog',resources: {posts: {path: '/.flyweb/posts',format: 'jsonl',fields: ['title','content']}},});

Express:

npm install express-flyweb
importexpressfrom'express';import{flyweb}from'express-flyweb';constapp=express();app.use(flyweb({flyweb: '1.0',entity: 'My API',type: 'api',resources: {items: {path: '/.flyweb/items',format: 'json',fields: ['id','name']}},}));

Astro / Nuxt / Any site:

npm install astro-flyweb # Astro
npm install nuxt-flyweb # Nuxt
npx flyweb init # Any site — generates flyweb.json

Badge

Add to your README to show your site supports FlyWeb:

[![FlyWeb enabled](https://raw.githubusercontent.com/flywebprotocol/flyweb/master/badge.svg)](https://flyweb.io)

The Three Layers

  1. Discovery/.well-known/flyweb.json tells machines what data you have
  2. Structure — Resources served as clean JSON/JSONL, not HTML
  3. Query — Standard URL params for filtering: ?tag=ai&limit=10

Attribution

FlyWeb enforces attribution at the protocol level. Even on the free tier, AI agents must credit the source:

"attribution": {
"required": true,
"format": "Source: {entity} — {url}",
"license": "CC-BY-4.0",
"must_link": true
}

You can set price to zero. You can never set attribution to zero.

Spec

Read the full protocol specification: SPEC.md

Framework RFCs

We've proposed native FlyWeb support in major frameworks:

Links

License

MIT

About

FlyWeb — Make the internet machine-readable. Core types + Next.js integration.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages