> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lyzr.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Train Neo4J Website

> Crawl websites and generate a knowledge graph using Neo4J based on the provided URLs and crawl settings.



## OpenAPI

````yaml post /knowledge_graph/neo4j/website/
openapi: 3.0.3
info:
  title: Lyzr Knowledge Graph - Train Neo4J (Website)
  version: 1.0.0
  description: >-
    Crawl and train a Knowledge Graph using Neo4J from website URLs under the
    specified RAG system.
servers:
  - url: https://rag-prod.studio.lyzr.ai/v4
security: []
paths:
  /knowledge_graph/neo4j/website/:
    post:
      summary: Train Neo4J Website
      description: >-
        Crawl websites and generate a knowledge graph using Neo4J based on the
        provided URLs and crawl settings.
      operationId: trainNeo4jWebsite
      parameters:
        - name: rag_id
          in: query
          required: true
          description: The ID of the RAG system to train
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - urls
                - source
                - max_crawl_pages
                - max_crawl_depth
                - dynamic_content_wait_secs
                - actor
                - crawler_type
              properties:
                urls:
                  type: array
                  items:
                    type: string
                  description: List of website URLs to crawl
                  example:
                    - https://example.com
                source:
                  type: string
                  description: Data source identifier
                  example: website
                max_crawl_pages:
                  type: integer
                  description: Maximum number of pages to crawl
                  example: 1
                max_crawl_depth:
                  type: integer
                  description: Maximum crawl depth
                  example: 0
                dynamic_content_wait_secs:
                  type: integer
                  description: Time to wait for dynamic content to load (in seconds)
                  example: 5
                actor:
                  type: string
                  description: Apify actor used for crawling
                  example: apify/website-content-crawler
                crawler_type:
                  type: string
                  description: Type of crawler used
                  example: cheerio
      responses:
        '200':
          description: Website successfully crawled and knowledge graph trained
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Website training complete
                  rag_id:
                    type: string
                    example: 6848ff3c4c291b4bef798e0c
                  pages_trained:
                    type: integer
                    example: 12
        '403':
          description: Forbidden - Invalid API key or permission
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    example: Invalid permission
        '422':
          description: Validation Error - Input format or missing fields
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: array
                    items:
                      type: object
                      properties:
                        loc:
                          type: array
                          items:
                            oneOf:
                              - type: string
                              - type: integer
                        msg:
                          type: string
                        type:
                          type: string
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````