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

# Get URL Content Diff

> Compare two stored content versions of a source URL. Without version numbers, compares the newest version with the one before it. Use List URL Content Versions to see which versions exist. Returns 404 when the URL has only one version.



## OpenAPI

````yaml https://api.peec.ai/customer/v1/openapi/json post /sources/urls/content/diff
openapi: 3.0.3
info:
  title: Peec AI Customer API
  description: Development documentation
  version: 1.0.0
  contact:
    name: Peec AI Team
    email: support@peec.ai
servers:
  - url: https://api.peec.ai/customer/v1
security: []
paths:
  /sources/urls/content/diff:
    post:
      tags:
        - Reports
      summary: Get URL Content Diff
      description: >-
        Compare two stored content versions of a source URL. Without version
        numbers, compares the newest version with the one before it. Use List
        URL Content Versions to see which versions exist. Returns 404 when the
        URL has only one version.
      operationId: postSourcesUrlsContentDiff
      parameters:
        - name: project_id
          in: query
          required: false
          schema:
            description: Required if using a company api key
            example: or_f45b94ba-5e35-4982-93ed-285e72ee14eb
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project_id:
                  description: Required if using a company api key
                  example: or_f45b94ba-5e35-4982-93ed-285e72ee14eb
                  type: string
                url:
                  type: string
                  format: uri
                  description: >-
                    Full URL of a source, as returned by the URLs report or Get
                    URL Content.
                  example: https://example.com/blog/page1
                from_version:
                  description: >-
                    Older version to compare from. Defaults to the version
                    before to_version.
                  example: 2
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  maximum: 2147483647
                to_version:
                  description: Newer version to compare to. Defaults to the newest version.
                  example: 3
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  maximum: 2147483647
              required:
                - url
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                project_id:
                  description: Required if using a company api key
                  example: or_f45b94ba-5e35-4982-93ed-285e72ee14eb
                  type: string
                url:
                  type: string
                  format: uri
                  description: >-
                    Full URL of a source, as returned by the URLs report or Get
                    URL Content.
                  example: https://example.com/blog/page1
                from_version:
                  description: >-
                    Older version to compare from. Defaults to the version
                    before to_version.
                  example: 2
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  maximum: 2147483647
                to_version:
                  description: Newer version to compare to. Defaults to the newest version.
                  example: 3
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  maximum: 2147483647
              required:
                - url
          multipart/form-data:
            schema:
              type: object
              properties:
                project_id:
                  description: Required if using a company api key
                  example: or_f45b94ba-5e35-4982-93ed-285e72ee14eb
                  type: string
                url:
                  type: string
                  format: uri
                  description: >-
                    Full URL of a source, as returned by the URLs report or Get
                    URL Content.
                  example: https://example.com/blog/page1
                from_version:
                  description: >-
                    Older version to compare from. Defaults to the version
                    before to_version.
                  example: 2
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  maximum: 2147483647
                to_version:
                  description: Newer version to compare to. Defaults to the newest version.
                  example: 3
                  type: integer
                  minimum: 0
                  exclusiveMinimum: true
                  maximum: 2147483647
              required:
                - url
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      from_version:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                        description: The older version compared.
                        example: 2
                      to_version:
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                        description: The newer version compared.
                        example: 3
                      diff:
                        type: string
                        description: >-
                          Unified diff of the page's markdown, from_version to
                          to_version.
                      from_content:
                        type: string
                        description: Markdown content of from_version.
                      to_content:
                        type: string
                        description: Markdown content of to_version.
                    required:
                      - from_version
                      - to_version
                      - diff
                      - from_content
                      - to_content
                required:
                  - data
                description: Success
        '404':
          description: Response for status 404
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
      security:
        - APIKeyHeader: []
        - APIKeyQuery: []
        - BearerAuth: []
components:
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    APIKeyQuery:
      type: apiKey
      in: query
      name: api_key
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.