This project is not covered by Drupal’s security advisory policy.
Export Drupal content, Layout Builder pages and navigation as normalized JSON for RAG, AI assistants, semantic search, headless applications and portal synchronization.
Portal Export is a decoupled export layer that serializes Drupal content into normalized JSON, including pages built entirely with Layout Builder. It provides both file-based exports and live HTTP endpoints, with incremental regeneration designed for enterprise-scale sites.
What it does
Portal Export produces a complete representation of your Drupal content so external systems never need to understand Drupal internals.
- Full Layout Builder serialization.
- Recursive entity expansion.
- Navigation export.
- Content type export.
- AI and RAG optimized exports.
- Global site index generation.
- Live JSON endpoints.
- Pagination support.
- Incremental regeneration.
Why use Portal Export?
Modern organizations increasingly need Drupal content outside Drupal itself.
- RAG (Retrieval Augmented Generation)
- AI assistants
- Semantic search
- OpenSearch
- Elasticsearch
- Vector databases
- Headless front-ends
- Portal synchronization
- Open data initiatives
Portal Export reconstructs content at the semantic level, including Layout Builder structures that traditional export tools often ignore.
Key Features
- Full Layout Builder support
- Recursive entity serialization
- Navigation export
- Content-type export
- RAG and AI-ready exports
- Knowledge graph generation
- Live JSON endpoints
- Pagination support
- Incremental regeneration
- Drush integration
- Built for enterprise-scale sites
Export Types
- Navigation Export
- Page Export
- Content Type Export
- Site Index Export
- RAG Export
- Knowledge Graph Export
Output Options
Portal Export supports two complementary delivery methods:
- JSON Files generated on disk for indexing, synchronization, backups and bulk consumption.
- Live JSON Endpoints for real-time access from external applications and services.
Both representations expose the same normalized content model, allowing consumers to choose the integration approach that best fits their needs.
JSON Endpoints
Portal Export can expose exported content through live JSON endpoints, making integration with external systems straightforward.
/portal-export/site-index /portal-export/navigation/main /portal-export/content-type/article /portal-export/page/123 /portal-export/rag/123
Additional endpoints are available depending on the enabled export types and site configuration.
Pagination Support
Endpoints returning large datasets support pagination to efficiently consume content from enterprise-scale sites.
/portal-export/content-type/article?page=0&limit=100
AI and RAG Support
Portal Export can generate a second representation optimized for AI, Retrieval-Augmented Generation (RAG), semantic search and vector databases.
- RAG-ready documents
- Semantic chunk generation
- Knowledge graph export
- HTML normalization
- Metadata enrichment
Drush Commands
drush portal-export:all drush portal-export:page {nid} drush portal-export:menu {menu} drush portal-export:content-type {type} drush portal-export:rag drush portal-export:rebuild
Built for Scale
Designed for large enterprise portals with tens of thousands of content items, using Queue API, Batch API, Cache Tags, Lock API and incremental regeneration.
Requirements
- Drupal 10.2+ or Drupal 11
- PHP 8.2+
Recommended modules:
- Layout Builder
- Media
- Taxonomy
- Menu Link Content
- Block Content
- Paragraphs
Permissions
- Administer Portal Export
- Run Portal Export
- Access Portal Export JSON endpoints
Installation
composer require drupal/portal_export drush en portal_export -y
Configure at:
/admin/config/portal-export
Project Goal
Portal Export enables Drupal sites to become a structured content source for AI assistants, RAG pipelines, semantic search, OpenSearch, Elasticsearch, vector databases, headless architectures and content synchronization without requiring external systems to understand Drupal internals, Layout Builder structures or entity relationships.
Project information
- Project categories: Artificial Intelligence (AI), Import and export, Integrations
- Created by leandromesa on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.




