Get the ID of 10 Latest Pages stored in a WordPress Category

Try the code below. This is the Reference: WP_Query

<?php

$args = array(
    'post_type' => 'page',
    'posts_per_page' => 10,
    'category_name' => 'mycat',
    'fields' => 'ids'
);
$data = get_posts($args);
print_r($data);