diff --git a/redfish-core/include/utils/query_param.hpp b/redfish-core/include/utils/query_param.hpp
index b4a18a3..5c43255 100644
--- a/redfish-core/include/utils/query_param.hpp
+++ b/redfish-core/include/utils/query_param.hpp
@@ -494,9 +494,49 @@
     std::shared_ptr<bmcweb::AsyncResp> finalRes;
 };
 
+inline void processTopAndSkip(const Query& query, crow::Response& res)
+{
+    nlohmann::json::object_t* obj =
+        res.jsonValue.get_ptr<nlohmann::json::object_t*>();
+    if (obj == nullptr)
+    {
+        // Shouldn't be possible.  All responses should be objects.
+        messages::internalError(res);
+        return;
+    }
+
+    BMCWEB_LOG_DEBUG << "Handling top/skip";
+    nlohmann::json::object_t::iterator members = obj->find("Members");
+    if (members == obj->end())
+    {
+        // From the Redfish specification 7.3.1
+        // ... the HTTP 400 Bad Request status code with the
+        // QueryNotSupportedOnResource message from the Base Message Registry
+        // for any supported query parameters that apply only to resource
+        // collections but are used on singular resources.
+        messages::queryNotSupportedOnResource(res);
+        return;
+    }
+
+    nlohmann::json::array_t* arr =
+        members->second.get_ptr<nlohmann::json::array_t*>();
+    if (arr == nullptr)
+    {
+        messages::internalError(res);
+        return;
+    }
+
+    // Per section 7.3.1 of the Redfish specification, $skip is run before $top
+    // Can only skip as many values as we have
+    size_t skip = std::min(arr->size(), query.skip);
+    arr->erase(arr->begin(), arr->begin() + static_cast<ssize_t>(skip));
+
+    size_t top = std::min(arr->size(), query.top);
+    arr->erase(arr->begin() + static_cast<ssize_t>(top), arr->end());
+}
+
 inline void
     processAllParams(crow::App& app, const Query query,
-
                      std::function<void(crow::Response&)>& completionHandler,
                      crow::Response& intermediateResponse)
 {
@@ -520,6 +560,12 @@
         processOnly(app, intermediateResponse, completionHandler);
         return;
     }
+
+    if (query.top != std::numeric_limits<size_t>::max() || query.skip != 0)
+    {
+        processTopAndSkip(query, intermediateResponse);
+    }
+
     if (query.expandType != ExpandType::None)
     {
         BMCWEB_LOG_DEBUG << "Executing expand query";
diff --git a/redfish-core/include/utils/query_param_test.cpp b/redfish-core/include/utils/query_param_test.cpp
index e5d8de7..93013c2 100644
--- a/redfish-core/include/utils/query_param_test.cpp
+++ b/redfish-core/include/utils/query_param_test.cpp
@@ -150,6 +150,73 @@
     }
 }
 
+TEST(QueryParams, ParseParametersTop)
+{
+    auto ret = boost::urls::parse_relative_ref("/redfish/v1?$top=1");
+    ASSERT_TRUE(ret);
+
+    crow::Response res;
+
+    using redfish::query_param::parseParameters;
+    using redfish::query_param::Query;
+    std::optional<Query> query = parseParameters(ret->params(), res);
+    ASSERT_TRUE(query != std::nullopt);
+    EXPECT_EQ(query->top, 1);
+}
+
+TEST(QueryParams, ParseParametersTopOutOfRangeNegative)
+{
+    auto ret = boost::urls::parse_relative_ref("/redfish/v1?$top=-1");
+    ASSERT_TRUE(ret);
+
+    crow::Response res;
+
+    using redfish::query_param::parseParameters;
+    using redfish::query_param::Query;
+    std::optional<Query> query = parseParameters(ret->params(), res);
+    ASSERT_TRUE(query == std::nullopt);
+}
+
+TEST(QueryParams, ParseParametersTopOutOfRangePositive)
+{
+    auto ret = boost::urls::parse_relative_ref("/redfish/v1?$top=1001");
+    ASSERT_TRUE(ret);
+
+    crow::Response res;
+
+    using redfish::query_param::parseParameters;
+    using redfish::query_param::Query;
+    std::optional<Query> query = parseParameters(ret->params(), res);
+    ASSERT_TRUE(query == std::nullopt);
+}
+
+TEST(QueryParams, ParseParametersSkip)
+{
+    auto ret = boost::urls::parse_relative_ref("/redfish/v1?$skip=1");
+    ASSERT_TRUE(ret);
+
+    crow::Response res;
+
+    using redfish::query_param::parseParameters;
+    using redfish::query_param::Query;
+    std::optional<Query> query = parseParameters(ret->params(), res);
+    ASSERT_TRUE(query != std::nullopt);
+    EXPECT_EQ(query->skip, 1);
+}
+TEST(QueryParams, ParseParametersSkipOutOfRange)
+{
+    auto ret = boost::urls::parse_relative_ref(
+        "/redfish/v1?$skip=99999999999999999999");
+    ASSERT_TRUE(ret);
+
+    crow::Response res;
+
+    using redfish::query_param::parseParameters;
+    using redfish::query_param::Query;
+    std::optional<Query> query = parseParameters(ret->params(), res);
+    ASSERT_EQ(query, std::nullopt);
+}
+
 TEST(QueryParams, ParseParametersUnexpectedGetsIgnored)
 {
     auto ret = boost::urls::parse_relative_ref("/redfish/v1?unexpected_param");
