---
title: "Publish each page's data as a file · Agent Wranglers"
url: https://agentwranglers.se/playbook/agents-as-users/ready-for-ai-agents/structured-data-for-agents
id: AGT-58
level: Optional
updated: 2026-10-27
build: a2a6bdfed830
tokens: 690
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Publish each page's data as a file

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Ready for AI agents](https://agentwranglers.se/playbook/agents-as-users/ready-for-ai-agents.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: AGT-58
- Level: Optional
- Chapter: [Ready for AI agents](https://agentwranglers.se/playbook/agents-as-users/ready-for-ai-agents.md)
- Rule: Publish each page's JSON-LD (structured facts) in the page and as its own file. Then agents can read the facts without parsing HTML.
- Check: A test parses the embedded graph and the file for every page. They are identical, and both pass a validator such as validator.schema.org.
- How: Write each page's JSON-LD graph to a file at build time. Serve it at `/page.jsonld` with `application/ld+json`. Link it with `<link rel="alternate" type="application/ld+json">`. No published measurement yet shows a search engine or AI crawler fetching these files, so the JSON-LD inside the page is what counts. List the files as [Index every page's data file](https://agentwranglers.se/playbook/agents-as-users/ready-for-ai-agents/schemamap.md) says.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### HTML example

```html
<link rel="alternate" type="application/ld+json" href="/services.jsonld">
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"Service","name":"Roof repair","provider":{"@type":"Organization","name":"Example Co","url":"https://example.com/"}}
</script>
```

## Sources

- [W3C JSON-LD 1.1](https://www.w3.org/TR/json-ld11/)

## Related rules

- AGT-70 [Index every page's data file](https://agentwranglers.se/playbook/agents-as-users/ready-for-ai-agents/schemamap.md) in Agents as users

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/agents-as-users/ready-for-ai-agents/structured-data-for-agents">Agent Wranglers agents as users playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Explain how agents sign up](https://agentwranglers.se/playbook/agents-as-users/ready-for-ai-agents/auth-md.md)
- Next: [Offer content machines can read](https://agentwranglers.se/playbook/agents-as-users/ready-for-ai-agents/machine-readable-formats.md)
- [Ready for AI agents](https://agentwranglers.se/playbook/agents-as-users/ready-for-ai-agents.md)
