Integration Guide

Add SDF to Your Website

SDF Protocol converts your web pages into structured, machine-readable JSON. AI agents, search engines, and tools can read your .well-known/sdf/ directory to understand your content — no scraping required.

How It Works

Your sitemapSDF Protocol fetches it every 6h
New URLsAI models classify & extract structured data
Sync scriptPulls results to .well-known/sdf/ on your server
AI agentsRead your SDF files directly — no API needed
1

Create an account & add your site

Sign up at sdfprotocol.com, then add your domain in the dashboard. You'll verify ownership with either a DNS TXT record or an HTTP file — similar to Google Search Console.

2

Set your sitemap URL

In your site settings, enter your sitemap URL (e.g., https://example.com/sitemap.xml). We'll automatically fetch it every 6 hours to discover new and updated pages — just like search engines do.

3

Generate an API key

Go to Dashboard → API Keys and create a key. You'll need this for the sync script on your server. The key is shown once — save it securely.

4

Install the sync script on your server

Download our lightweight bash script to your web root. It pulls processed SDF documents and creates the .well-known/sdf/ directory with your structured data files.

5

Set up automatic syncing

Add a cron job to run the sync script every 30 minutes. New pages from your sitemap get processed automatically and synced to your server.

Quick Setup (2 minutes)

Download the sync script:

curl -sLO https://sdfprotocol.com/sync.sh
chmod +x sync.sh

Initialize with your API key and domain:

./sync.sh init --api-key sdf_your_api_key_here --site example.com

Pull your SDF documents:

./sync.sh pull

Set up automatic syncing (cron):

# Run every 30 minutes
*/30 * * * * cd /var/www/html && ./sync.sh pull >> /var/log/sdf-sync.log 2>&1

Requirements: curl and jq (pre-installed on most servers).

What Gets Created

your-webroot/
  .well-known/
    sdf-sitemap.json          # Index of all SDF documents
    sdf/
      /blog/my-post.json      # SDF for /blog/my-post
      /products/widget.json   # SDF for /products/widget
      /about.json             # SDF for /about

File paths mirror your URL structure. AI agents check .well-known/sdf-sitemap.json to discover all available SDF documents for your site.

sdf-sitemap.json Format

{
  "version": "0.2",
  "generated": "2026-02-11T06:30:00.000Z",
  "documents": [
    {
      "url": "https://example.com/blog/my-post",
      "sdf": "/.well-known/sdf/blog/my-post.json",
      "parent_type": "article",
      "type": "blog",
      "quality_score": 0.92,
      "updated": "2026-02-11T06:25:00.000Z"
    }
  ]
}

API Access (Alternative)

If you prefer to integrate programmatically instead of using the sync script, you can fetch SDF documents directly via our API:

# Get SDF for a specific URL
curl -H "x-api-key: sdf_your_key" \
  "https://api.sdfprotocol.com/v1/sdf?url=https://example.com/blog/post"

# Pull all documents since last sync
curl -H "x-api-key: sdf_your_key" \
  "https://api.sdfprotocol.com/v1/sync?site=example.com&since=2026-02-10T00:00:00Z"
Get Started Free

Free plan: 5 URLs/day, 3 sites. No credit card required.