---
title: Search contents based on criteria
slug: cms-12/api/search-contents-based-on-criteria
docTags: 
createdAt: 2026-08-28T13:16:06.833Z
---

{
  "id": "HOnp2sKBrBCxlehL8ClHr",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "http://localhost:65349//api/episerver/v2.0/search/content",
    "servers": [
      {
        "url": "http://localhost:65349//api/episerver/v2.0/search/content"
      }
    ],
    "name": "Search contents based on criteria",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json",
            "text/json",
            "application/xml",
            "text/xml"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "required",
          "name": "languages",
          "type": "array",
          "description": "",
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        },
        {
          "kind": "optional",
          "name": "filter",
          "type": "string",
          "description": "Specify a filter string to be applied to the search. Filter strings utilize OData v4 filter syntax"
        },
        {
          "kind": "optional",
          "name": "orderby",
          "type": "string",
          "description": "Specify an orderby string to be applied to the search. Orderby strings utilize OData v4 sort syntax"
        },
        {
          "kind": "optional",
          "name": "query",
          "type": "string",
          "description": "Free text search to filter content. Supports query string syntax for searching in individual fields"
        },
        {
          "kind": "optional",
          "name": "skip",
          "type": "integer",
          "description": "<p>Specify number of items to skip in returned search results (used for pagination)</p>"
        },
        {
          "kind": "optional",
          "name": "top",
          "type": "integer",
          "description": "<p>Specify number of items to return in search results (used for pagination)</p>"
        },
        {
          "kind": "optional",
          "name": "personalize",
          "type": "boolean",
          "description": "<p>Determines if returned content will be personalized (via the Visitor Group system) when returned. By default, content will be fetched in the context of an anonymous user.</p>"
        },
        {
          "kind": "optional",
          "name": "expand",
          "type": "string",
          "description": "<p>Comma-separated list of reference properties (Content References, Content Areas) which should have their content fetched in the response. Passing ' * ' will load content in all reference properties in the return.</p>"
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Represents a search response sent back from the Content Api",
            "customType": "SearchResponse",
            "schema": [
              {
                "name": "TotalMatching",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "<p>Total number of matching results from the search request.  For use in calculating pagination on the client, this number may be bigger than the returned total of {EPiServer.ContentApi.Search.Internal.SearchResponse.Results}\r\nin a single request based on the provider {EPiServer.ContentApi.Search.Internal.SearchRequest.Top} value, as well as the {EPiServer.ContentApi.Search.ContentSearchApiOptions.MaximumSearchResults} configuration value.</p>",
                "format": "int32"
              },
              {
                "name": "Results",
                "kind": "optional",
                "type": "array",
                "description": "<p>Search Results in the form of {EPiServer.ContentApi.Core.Serialization.Models.ContentApiModel} instances</p>",
                "modelRef": "#/components/schemas/ContentApiModel",
                "customType": "ContentApiModel[]",
                "schema": [
                  {
                    "name": "ContentLink",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/ContentModelReference",
                    "customType": "ContentModelReference",
                    "schema": [
                      {
                        "name": "Id",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "",
                        "format": "int32"
                      },
                      {
                        "name": "WorkId",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "",
                        "format": "int32"
                      },
                      {
                        "name": "GuidValue",
                        "kind": "optional",
                        "type": "string<uuid>",
                        "description": "",
                        "example": "00000000-0000-0000-0000-000000000000",
                        "format": "uuid"
                      },
                      {
                        "name": "ProviderName",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "Url",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "Language",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "modelRef": "#/components/schemas/LanguageModel",
                        "customType": "LanguageModel",
                        "schema": [
                          {
                            "name": "DisplayName",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "Name",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          }
                        ]
                      },
                      {
                        "name": "Expanded",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "modelRef": "#/components/schemas/ContentApiModel",
                        "customType": "ContentApiModel",
                        "schema": [
                          {
                            "name": "",
                            "description": "",
                            "customType": "Circular-Reference"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "Name",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "Language",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/LanguageModel",
                    "customType": "LanguageModel",
                    "schema": [
                      {
                        "name": "DisplayName",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "Name",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      }
                    ]
                  },
                  {
                    "name": "ExistingLanguages",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/LanguageModel",
                    "customType": "LanguageModel[]",
                    "schema": [
                      {
                        "name": "DisplayName",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "Name",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      }
                    ]
                  },
                  {
                    "name": "MasterLanguage",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/LanguageModel",
                    "customType": "LanguageModel",
                    "schema": [
                      {
                        "name": "DisplayName",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "Name",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      }
                    ]
                  },
                  {
                    "name": "ContentType",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "ParentLink",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "modelRef": "#/components/schemas/ContentModelReference",
                    "customType": "ContentModelReference",
                    "schema": [
                      {
                        "name": "Id",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "",
                        "format": "int32"
                      },
                      {
                        "name": "WorkId",
                        "kind": "optional",
                        "type": "integer<int32>",
                        "description": "",
                        "format": "int32"
                      },
                      {
                        "name": "GuidValue",
                        "kind": "optional",
                        "type": "string<uuid>",
                        "description": "",
                        "example": "00000000-0000-0000-0000-000000000000",
                        "format": "uuid"
                      },
                      {
                        "name": "ProviderName",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "Url",
                        "kind": "optional",
                        "type": "string",
                        "description": ""
                      },
                      {
                        "name": "Language",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "modelRef": "#/components/schemas/LanguageModel",
                        "customType": "LanguageModel",
                        "schema": [
                          {
                            "name": "DisplayName",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          },
                          {
                            "name": "Name",
                            "kind": "optional",
                            "type": "string",
                            "description": ""
                          }
                        ]
                      },
                      {
                        "name": "Expanded",
                        "kind": "optional",
                        "type": "object",
                        "description": "",
                        "modelRef": "#/components/schemas/ContentApiModel",
                        "customType": "ContentApiModel",
                        "schema": [
                          {
                            "name": "",
                            "description": "",
                            "customType": "Circular-Reference"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "RouteSegment",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "Url",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "Changed",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "format": "date-time"
                  },
                  {
                    "name": "Created",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "format": "date-time"
                  },
                  {
                    "name": "StartPublish",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "format": "date-time"
                  },
                  {
                    "name": "StopPublish",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "format": "date-time"
                  },
                  {
                    "name": "Saved",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "description": "",
                    "format": "date-time"
                  },
                  {
                    "name": "Status",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/SearchResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "HdcKvLMzj2jwieWa-6aNn",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'http://localhost:65349//api/episerver/v2.0/search/content?languages=array' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "xs5FXuSv9tVOQMwKzWoPH",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"http://localhost:65349//api/episerver/v2.0/search/content?languages=array\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "CIe_beT1U-o2rgFCejMS_",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"http://localhost:65349//api/episerver/v2.0/search/content?languages=array\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "WESBkp6Brrfkr601KBqEk",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"http://localhost:65349//api/episerver/v2.0/search/content?languages=array\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "HdcKvLMzj2jwieWa-6aNn"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n{\n  \"TotalMatching\": \"\",\n  \"Results\": [\n    {\n      \"ContentLink\": {\n        \"Id\": \"\",\n        \"WorkId\": \"\",\n        \"GuidValue\": \"00000000-0000-0000-0000-000000000000\",\n        \"ProviderName\": \"\",\n        \"Url\": \"\",\n        \"Language\": {\n          \"DisplayName\": \"\",\n          \"Name\": \"\"\n        },\n        \"Expanded\": {\n          \"\": \"\"\n        }\n      },\n      \"Name\": \"\",\n      \"Language\": {\n        \"DisplayName\": \"\",\n        \"Name\": \"\"\n      },\n      \"ExistingLanguages\": [\n        {\n          \"DisplayName\": \"\",\n          \"Name\": \"\"\n        }\n      ],\n      \"MasterLanguage\": {\n        \"DisplayName\": \"\",\n        \"Name\": \"\"\n      },\n      \"ContentType\": [\n        \"\"\n      ],\n      \"ParentLink\": {\n        \"Id\": \"\",\n        \"WorkId\": \"\",\n        \"GuidValue\": \"00000000-0000-0000-0000-000000000000\",\n        \"ProviderName\": \"\",\n        \"Url\": \"\",\n        \"Language\": {\n          \"DisplayName\": \"\",\n          \"Name\": \"\"\n        },\n        \"Expanded\": {\n          \"\": \"\"\n        }\n      },\n      \"RouteSegment\": \"\",\n      \"Url\": \"\",\n      \"Changed\": \"\",\n      \"Created\": \"\",\n      \"StartPublish\": \"\",\n      \"StopPublish\": \"\",\n      \"Saved\": \"\",\n      \"Status\": \"\"\n    }\n  ]\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Bad Request\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}