# Recently updated pages: URLs changed in the last 24 hours

**Use case:** 

Get only the pages a site added or changed recently, using the last-modified dates in its sitemaps. This example reads state.gov, which dates its 87 sitemaps, so the run skips the old ones: 101 URLs from 13 sitemaps in our weekday test. Change the site and the period, for example 7 days. Add Only new URLs and a schedule to monitor a site.

## Input

```json
{
  "startUrls": [
    "https://www.state.gov"
  ],
  "maxUrls": 300,
  "maxUrlsPerSite": 0,
  "modifiedAfter": "24 hours",
  "keepUrlsWithoutLastmod": false,
  "sameSiteOnly": false,
  "onlyNewUrls": false,
  "baselineOnFirstRun": true,
  "includeImageUrls": false,
  "includeAlternates": true,
  "maxSitemapDepth": 5,
  "maxConcurrency": 10,
  "requestTimeoutSecs": 30
}
```

## Output

```json
{
  "url": {
    "label": "URL",
    "format": "string"
  },
  "lastmod": {
    "label": "Last modified",
    "format": "string"
  },
  "changefreq": {
    "label": "Change frequency",
    "format": "string"
  },
  "priority": {
    "label": "Priority",
    "format": "number"
  },
  "imageCount": {
    "label": "Images",
    "format": "integer"
  },
  "sitemapUrl": {
    "label": "Found in sitemap",
    "format": "string"
  },
  "isNew": {
    "label": "New",
    "format": "boolean"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Sitemap Extractor & URL Finder Actor is ready to run with the inputs already set for "Recently updated pages: URLs changed in the last 24 hours". [Sign up or log in](https://console.apify.com/create-task-from-example/Y0Mea961GIkUIcz46) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Recently updated pages: URLs changed in the last 24 hours" task

The Sitemap Extractor & URL Finder Actor will start running based on the input automatically. You can also change all the input fields, like websites or sitemap urls, max urls per run, and more, to match your specific use case.

### 3. Receive the "Recently updated pages: URLs changed in the last 24 hours" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as URL, last modified, change frequency, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Recently updated pages: URLs changed in the last 24 hours" task via API](https://apify.com/urameshi7k/sitemap-extractor.md).

## FAQ

### What URLs does this task return?

Up to 300 URLs (Max URLs per run) whose last-modified date in the site's sitemaps is in the last 24 hours, in sitemap order. URLs without a date are left out. On state.gov that is about 50 to 100 pages on a weekday and almost none at weekends.

### What details accompany each URL in the output?

Each URL has its last-modified date, image count and the sitemap it came from. Change frequency and priority stay empty when the sitemap leaves them out, as state.gov's do. News sitemaps add a Google News title and date. Only new URLs adds isNew.

### How does the task handle larger websites?

When a sitemap index dates its sitemaps, those older than 24 hours are not downloaded. On state.gov that skips 74 of 87, so it reads 13 sitemaps and about 4,800 URLs. Undated sitemaps are always read, so sites that don't date them get no speed-up.

### Can this task monitor a site for new URLs automatically?

Yes. Turn on Only new URLs and schedule it at least daily. The first run returns nothing; it saves a baseline. Later runs return up to 300 recently changed URLs the previous run did not see, which can include old pages that were updated.

## About this Actor

This example demonstrates how to use [Sitemap Extractor & URL Finder](https://apify.com/urameshi7k/sitemap-extractor.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/urameshi7k/sitemap-extractor.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/urameshi7k/sitemap-extractor.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
