---
updatedAt: 2026-04-16T09:29:31.000Z
agentTools:
  siteIndex: https://docs.jfrog.com/llms.txt
  projectIndex: https://docs.jfrog.com/artifactory/llms.txt
---

# Artifacts With Date in Date Range

Get all artifacts with specified dates within the given range. Search can be limited to specific repositories (local or caches).

The `dateFields` parameter dictates which fields will be added to the JSON returned. If any of the specified date fields of an artifact is within the specified range, the artifact will be returned.

**Since:** 3.2.1

**Security:** Requires a privileged non-anonymous user


# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "JFrog Artifactory Searches API",
    "description": "REST API for searching artifacts, builds, and other items in JFrog Artifactory using various search methods including AQL, GAVC, property search, checksum search, and more.\n\n> **Important Note on Search Result Limits**\n>\n> All searches return limited results for internal and anonymous users (same limits as in the user interface).\n> To modify the default limit results, edit the `artifactory.system.properties` file with:\n> - `artifactory.search.limitAnonymousUsersOnly=false` (default is `true`)\n> - `artifactory.search.userQueryLimit` (default is `1000`)\n>\n> This applies to the following search APIs: Artifact Search, Archive Entries Search, GAVC Search, Property Search, Checksum Search (limited by UI max results),\n> Artifacts Not Downloaded Since, Artifacts With Date in Date Range, Artifacts Created in Date Range\n",
    "version": "1.0.0",
    "contact": {
      "name": "JFrog Support"
    }
  },
  "servers": [
    {
      "url": "https://{jfrog_url}/artifactory/api",
      "description": "JFrog Platform",
      "variables": {
        "jfrog_url": {
          "default": "myserver.jfrog.io",
          "description": "Your JFrog Platform hostname (e.g., mycompany.jfrog.io)"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Searches",
      "description": "Search operations for artifacts and builds"
    }
  ],
  "paths": {
    "/search/dates": {
      "get": {
        "tags": [
          "Searches"
        ],
        "summary": "Artifacts With Date in Date Range",
        "operationId": "searchDates",
        "description": "Get all artifacts with specified dates within the given range. Search can be limited to specific repositories (local or caches).\n\nThe `dateFields` parameter dictates which fields will be added to the JSON returned. If any of the specified date fields of an artifact is within the specified range, the artifact will be returned.\n\n**Since:** 3.2.1\n\n**Security:** Requires a privileged non-anonymous user\n",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "oneOf": [
                {
                  "type": "integer",
                  "format": "int64"
                },
                {
                  "type": "string",
                  "format": "date-time"
                }
              ]
            },
            "description": "The `from` parameter can be either a long value for the java epoch (milliseconds since the epoch), or an ISO8601 string value.\n"
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "oneOf": [
                {
                  "type": "integer",
                  "format": "int64"
                },
                {
                  "type": "string",
                  "format": "date-time"
                }
              ]
            },
            "description": "The `to` parameter can be either a long value for the java epoch (milliseconds since the epoch), or an ISO8601 string value. If `to` is not provided, `now()` will be used instead. If both parameters are omitted, 400 bad request is returned.\n"
          },
          {
            "$ref": "#/components/parameters/Repos"
          },
          {
            "name": "dateFields",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Comma-separated list of date fields that specify which fields the `from` and `to` values should be applied to.\nSupported date fields: `created`, `lastModified`, `lastDownloaded`.\n"
          }
        ],
        "responses": {
          "200": {
            "description": "Returns matching artifacts with the requested date fields (`created`, `lastModified`, and/or `lastDownloaded`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DatesSearchResult"
                },
                "examples": {
                  "datesSearchResult": {
                    "summary": "Date range search results",
                    "value": {
                      "results": [
                        {
                          "uri": "https://myserver.jfrog.io/artifactory/api/storage/libs-release-local/org/acme/lib/1.0/lib-1.0.jar",
                          "created": "2024-02-28T12:07:46.485Z",
                          "lastModified": "2024-02-28T12:07:46.326Z"
                        },
                        {
                          "uri": "https://myserver.jfrog.io/artifactory/api/storage/libs-release-local/org/acme/lib/2.0/lib-2.0.jar",
                          "created": "2024-02-29T09:58:15.882Z",
                          "lastModified": "2024-02-29T09:58:15.795Z"
                        }
                      ]
                    }
                  }
                }
              },
              "application/vnd.org.jfrog.artifactory.search.ArtifactResult+json": {
                "schema": {
                  "$ref": "#/components/schemas/DatesSearchResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    }
  },
  "security": [
    {
      "BasicAuth": []
    },
    {
      "ApiKeyAuth": []
    },
    {
      "BearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "BasicAuth": {
        "type": "http",
        "scheme": "basic",
        "description": "Username and password or username and API key."
      },
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-JFrog-Art-Api",
        "description": "JFrog API key passed in the `X-JFrog-Art-Api` header."
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Access token obtained from JFrog Platform."
      }
    },
    "parameters": {
      "Repos": {
        "name": "repos",
        "in": "query",
        "schema": {
          "type": "string"
        },
        "description": "Comma-separated list of repository keys to limit search to"
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request is invalid. Check the error message for details.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "errors": [
                {
                  "status": 400,
                  "message": "Missing required parameters or invalid query."
                }
              ]
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Authentication credentials are missing or invalid.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "errors": [
                {
                  "status": 401,
                  "message": "Bad credentials"
                }
              ]
            }
          }
        }
      },
      "Forbidden": {
        "description": "The authenticated user does not have the required permissions.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "errors": [
                {
                  "status": 403,
                  "message": "User is not an admin"
                }
              ]
            }
          }
        }
      },
      "InternalServerError": {
        "description": "An unexpected server error occurred. If this persists, contact [JFrog Support](https://jfrog.com/help).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "errors": [
                {
                  "status": 500,
                  "message": "An unexpected error occurred"
                }
              ]
            }
          }
        }
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "description": "Standard JFrog Platform error response envelope.",
        "required": [
          "errors"
        ],
        "properties": {
          "errors": {
            "type": "array",
            "description": "One or more error details.",
            "items": {
              "$ref": "#/components/schemas/ErrorDetail"
            }
          }
        },
        "example": {
          "errors": [
            {
              "status": 400,
              "message": "Invalid request"
            }
          ]
        }
      },
      "ErrorDetail": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "status": {
            "type": "integer",
            "description": "HTTP status code.",
            "example": 400
          },
          "message": {
            "type": "string",
            "description": "Human-readable error description.",
            "minLength": 1,
            "example": "Invalid request"
          }
        }
      },
      "DatesSearchResult": {
        "type": "object",
        "description": "Search result for artifacts matching a date range on specified date fields.",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "uri": {
                  "type": "string",
                  "description": "URI of the artifact"
                },
                "created": {
                  "type": "string",
                  "format": "date-time"
                },
                "lastModified": {
                  "type": "string",
                  "format": "date-time"
                },
                "lastDownloaded": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false
  }
}
```