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

# Get content by URL, IDs, or handles

> Used to fetch views by a single URL and/or multiple IDs or handles in a single request. 

*Note: The maximum url length is 4096 characters*




## OpenAPI

````yaml /enterspeed/enterspeedv1Api.yaml get /v2
openapi: 3.0.0
info:
  version: 0.4.0
  title: API documentation
  description: >-
    The Enterspeed API are based on REST principles.


    Before you start you will need to [create an
    Enterspeed-account](https://app.enterspeed.com) and set up a tenant (a
    property for your website). Here you can create

    - A data source (provides you with an API key for the **Ingest API**).

    - An environment client (provides you with an API key for the **Delivery
    API** and **Query API**).

    - A domain (ensure the correct data gets fetched).


    🎉 Have fun using our API. Make sure to [contact
    us](https://www.enterspeed.com/contact) if you need any help. We're happy
    assist!
  x-logo:
    url: https://docs.enterspeed.com/img/logo.svg
    altText: Enterspeed Logo
  license:
    name: See Enterspeed Terms of service
    url: https://www.enterspeed.com/terms-of-service
servers:
  - url: https://api.enterspeed.com
    description: General API
security: []
tags:
  - name: Delivery
    description: >-
      The Delivery API is what you use to `GET` your data from Enterspeed to
      your frontend project. Before you can fetch your content from Enterspeed,
      you first need to create an **Environment client** which generates an API
      key. This is done under *Settings --> Environment settings*.


      You can find an example of how to fetch data [Umbraco & Next.js
      tutorial](https://docs.enterspeed.com/tutorials/umbraco-nextjs/fetching-data-in-nextjs).
  - name: Ingest
    description: >-
      The Ingest API is used to `POST` your current data sources into
      Enterspeed. Before you can start ingesting data, you'll need to create a
      **Data source** inside Enterspeed, which generates an API key. This is
      done under *Settings --> Data sources*.


      The Ingest API can also be used to `DELETE` already ingested data from
      Enterspeed.
  - name: Routes
    description: >-
      The Routes API is what you use to `GET` all available URL routes for a
      specific environment, which can be helpful for SSG (Static Site
      Generation) or creating a sitemap.


      Before you can fetch your routes from Enterspeed, you first need to create
      an **Environment client** which generates an API key. This is done under
      *Settings --> Environment settings*.


      **ℹ NOTE:** The `first` or `last` parameter is required and must be set
      between 100 - 500 (e.g. `first=250`). Both are not allowed at the same
      time.
  - name: Query
    description: >-
      The Query API is what you use to query items from your indexes.


      Before you can query your indexes from Enterspeed, you first need to
      create an **Environment client** which generates an API key. This is done
      under *Settings --> Environment settings*.
paths:
  /v2:
    servers:
      - url: https://delivery.enterspeed.com
        description: Delivery API
    get:
      tags:
        - Delivery
      summary: Get content by URL, IDs, or handles
      description: >
        Used to fetch views by a single URL and/or multiple IDs or handles in a
        single request. 


        *Note: The maximum url length is 4096 characters*
      operationId: getContent
      parameters:
        - name: url
          in: query
          description: |
            The URL to get data from.
            **Maximum**: 1   **Required**: false
          example: https://enterspeed.com/about-us/
          required: false
          schema:
            type: string
            default: ''
        - name: id
          in: query
          description: |
            Specific view ids to get data from.

            **Maximum**: unlimited  
            **Required**: false
          example: >-
            gid://Environment/f0edd7b7-23dd-4177-a98a-313127601e97/Source/32ebdcab-ae19-4a71-a09e-a93257b807b7/Entity/4573/ContentPage
          required: false
          schema:
            type: string
            default: ''
        - name: handle
          in: query
          description: >
            Specific handles to get data from. Handles will be returned in the
            __views__ object and must be unique.


            **Maximum**: unlimited  

            **Required**: false
          example: Navigation
          required: false
          schema:
            type: string
            default: ''
        - name: includeDuplicateViews
          in: query
          description: >
            By default, each view is returned only once. However, if you set
            includeDuplicateViews to true, the view will be returned for each
            matching requested handle
          example: 'true'
          schema:
            type: boolean
            default: false
          required: false
        - name: X-Api-Key
          required: true
          in: header
          description: Api key to validate your environment.
          schema:
            type: string
            example: environment-1637c4d0-e878-4738-b866-152106a4f88c
      responses:
        '200':
          description: Valid request.
          content:
            application/json:
              schema:
                type: object
                oneOf:
                  - $ref: '#/components/schemas/RouteResponse'
                  - $ref: '#/components/schemas/NoRouteFoundResponse'
        '401':
          description: Unauthorized. Missing X-Api-Key header or the X-Api-Key is invalid.
        '403':
          description: >-
            Forbidden. The X-Api-Key is valid but does not have the necessary
            permissions.
        '422':
          description: >-
            Invalid request. Server responded but the request was in an invalid
            format.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/TooManyUrlsResponse'
                  - $ref: '#/components/schemas/NoParametersResponse'
components:
  schemas:
    RouteResponse:
      type: object
      properties:
        meta:
          type: object
          properties:
            status:
              type: number
              example: 200
              description: Returns code 200
        route:
          $ref: '#/components/schemas/ViewProperties'
          type: object
        views:
          type: object
          example:
            gid://Environment/f0edd7b7-23dd-4177-a98a-313127601e97/Source/32ebdcab-ae19-4a71-a09e-a93257b807b7/Entity/4573/BlogPostTile:
              title: How to increase performance
              image: /media-path/performance.jpg
              url: /blog/how-to-increase-performance/
            Navigation:
              items:
                - text: Contact us
                  link: /contact-us/
    NoRouteFoundResponse:
      type: object
      properties:
        meta:
          type: object
          properties:
            status:
              type: number
              example: 404
              description: Returns code 404
        route:
          type: object
          example: null
          description: no route returned
        views:
          type: object
          example:
            gid://Environment/f0edd7b7-23dd-4177-a98a-313127601e97/Source/32ebdcab-ae19-4a71-a09e-a93257b807b7/Entity/4573/Navigation:
              items:
                - title: How to increase performance
                  url: /how-to-increase-performance/
    TooManyUrlsResponse:
      type: object
      properties:
        meta:
          type: object
          properties:
            status:
              type: number
              description: HttpStatus code 422
              example: 422
        message:
          type: string
          description: Request contains xxx url parameters. Maximum is 1.
    NoParametersResponse:
      type: object
      properties:
        meta:
          type: object
          properties:
            status:
              type: number
              description: HttpStatus code 422
              example: 422
        message:
          type: string
          description: Missing id, handle or url query parameter.
    ViewProperties:
      type: object
      example:
        title: Enterspeed
        logo: /media-path/enterspeed.svg

````