Sitemap URL Extractor
Pricing
Pay per usage
Go to Apify Store
Sitemap URL Extractor
Extract all URLs from website sitemaps. Finds sitemaps in robots.txt, follows sitemap indexes, and reads gzip, news, image, and video sitemaps.
Sitemap URL Extractor
Pricing
Pay per usage
Extract all URLs from website sitemaps. Finds sitemaps in robots.txt, follows sitemap indexes, and reads gzip, news, image, and video sitemaps.
You can access the Sitemap URL Extractor programmatically from your own applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in API & Integrations in Apify Console.
{ "openapi": "3.0.1", "info": { "version": "1.0", "x-build-id": "BngiQDudAnZiGg25z" }, "servers": [ { "url": "https://api.apify.com/v2" } ], "paths": { "/acts/appreciative_duct~sitemap-url-extractor/run-sync-get-dataset-items": { "post": { "operationId": "run-sync-get-dataset-items-appreciative_duct-sitemap-url-extractor", "x-openai-isConsequential": false, "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.", "tags": [ "Run Actor" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/inputSchema" } } } }, "parameters": [ { "name": "token", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Enter your Apify token here" } ], "responses": { "200": { "description": "OK" } } } }, "/acts/appreciative_duct~sitemap-url-extractor/runs": { "post": { "operationId": "runs-sync-appreciative_duct-sitemap-url-extractor", "x-openai-isConsequential": false, "summary": "Executes an Actor and returns information about the initiated run in response.", "tags": [ "Run Actor" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/inputSchema" } } } }, "parameters": [ { "name": "token", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Enter your Apify token here" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/runsResponseSchema" } } } } } } }, "/acts/appreciative_duct~sitemap-url-extractor/run-sync": { "post": { "operationId": "run-sync-appreciative_duct-sitemap-url-extractor", "x-openai-isConsequential": false, "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.", "tags": [ "Run Actor" ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/inputSchema" } } } }, "parameters": [ { "name": "token", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Enter your Apify token here" } ], "responses": { "200": { "description": "OK" } } } } }, "components": { "schemas": { "inputSchema": { "type": "object", "required": [ "startUrls" ], "properties": { "startUrls": { "title": "Website or sitemap URLs", "type": "array", "description": "One or more website addresses (https://example.com) or direct sitemap URLs (https://example.com/sitemap.xml). A website is expanded through robots.txt, common sitemap paths, and a homepage sitemap link.", "items": { "type": "object", "required": [ "url" ], "properties": { "url": { "type": "string", "title": "URL of a web page", "format": "uri" } } } }, "maxUrls": { "title": "Maximum URLs", "minimum": 1, "maximum": 2000000, "type": "integer", "description": "Stop after this many page URLs have been saved. The default is high enough for a normal site. Lower it for a sample.", "default": 20000 }, "includeUrlPatterns": { "title": "Include URL patterns", "type": "array", "description": "Optional JavaScript regular expressions, case-insensitive. A URL is kept when it matches at least one pattern. Leave empty to keep every URL.", "items": { "type": "string" } }, "excludeUrlPatterns": { "title": "Exclude URL patterns", "type": "array", "description": "Optional JavaScript regular expressions, case-insensitive. A URL that matches any pattern is dropped.", "items": { "type": "string" } }, "minLastmod": { "title": "Only URLs modified after", "type": "string", "description": "Optional ISO date, for example 2024-01-01. URLs whose lastmod is older are skipped. Child sitemaps with an older lastmod are not downloaded." }, "maxLastmod": { "title": "Only URLs modified before", "type": "string", "description": "Optional ISO date. URLs whose lastmod is newer are skipped." }, "includeUndated": { "title": "Include URLs with no lastmod", "type": "boolean", "description": "Used only when a modified-after or modified-before date is set. Off means undated URLs are skipped.", "default": false }, "deduplicate": { "title": "Deduplicate URLs", "type": "boolean", "description": "Keep the first copy of a URL when it appears in more than one sitemap. The fragment is ignored and the hostname is compared case-insensitively.", "default": true }, "includeImages": { "title": "Include image sitemap fields", "type": "boolean", "description": "Save image locations, titles, and captions from Google image sitemaps.", "default": true }, "includeVideos": { "title": "Include video sitemap fields", "type": "boolean", "description": "Save video title, description, thumbnail, and content or player URLs.", "default": true }, "includeNews": { "title": "Include news sitemap fields", "type": "boolean", "description": "Save the news title, publication name, language, and publication date.", "default": true }, "includeAlternates": { "title": "Include hreflang alternates", "type": "boolean", "description": "Save xhtml:link alternate URLs, including the language code.", "default": true }, "useRobotsTxt": { "title": "Read robots.txt", "type": "boolean", "description": "Read Sitemap directives from the website's robots.txt.", "default": true }, "probeCommonPaths": { "title": "Check common sitemap paths", "type": "boolean", "description": "Also request paths such as /sitemap.xml, /sitemap_index.xml, and /wp-sitemap.xml. This catches sitemaps that robots.txt forgot.", "default": true }, "maxIndexDepth": { "title": "Maximum sitemap index depth", "minimum": 0, "maximum": 10, "type": "integer", "description": "How many levels of sitemap indexes to follow. 1 is a normal index of URL files. The default 5 covers nested indexes.", "default": 5 }, "maxConcurrency": { "title": "Concurrent requests", "minimum": 1, "maximum": 20, "type": "integer", "description": "How many sitemaps to download at once.", "default": 8 }, "maxRetries": { "title": "Retries", "minimum": 0, "maximum": 6, "type": "integer", "description": "Retries for timeouts, connection errors, HTTP 429, and HTTP 5xx. Waits with exponential backoff.", "default": 3 }, "requestTimeoutSecs": { "title": "Request timeout (seconds)", "minimum": 5, "maximum": 120, "type": "integer", "description": "Time limit for one HTTP request, including its redirects.", "default": 30 }, "maxSitemapBytes": { "title": "Maximum sitemap size (bytes)", "minimum": 100000, "maximum": 52428800, "type": "integer", "description": "Refuse a single sitemap larger than this. The sitemap protocol limit is 50 MB uncompressed.", "default": 20000000 } } }, "runsResponseSchema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "actId": { "type": "string" }, "userId": { "type": "string" }, "startedAt": { "type": "string", "format": "date-time", "example": "2025-01-08T00:00:00.000Z" }, "finishedAt": { "type": "string", "format": "date-time", "example": "2025-01-08T00:00:00.000Z" }, "status": { "type": "string", "example": "READY" }, "meta": { "type": "object", "properties": { "origin": { "type": "string", "example": "API" }, "userAgent": { "type": "string" } } }, "stats": { "type": "object", "properties": { "inputBodyLen": { "type": "integer", "example": 2000 }, "rebootCount": { "type": "integer", "example": 0 }, "restartCount": { "type": "integer", "example": 0 }, "resurrectCount": { "type": "integer", "example": 0 }, "computeUnits": { "type": "integer", "example": 0 } } }, "options": { "type": "object", "properties": { "build": { "type": "string", "example": "latest" }, "timeoutSecs": { "type": "integer", "example": 300 }, "memoryMbytes": { "type": "integer", "example": 1024 }, "diskMbytes": { "type": "integer", "example": 2048 } } }, "buildId": { "type": "string" }, "defaultKeyValueStoreId": { "type": "string" }, "defaultDatasetId": { "type": "string" }, "defaultRequestQueueId": { "type": "string" }, "buildNumber": { "type": "string", "example": "1.0.0" }, "containerUrl": { "type": "string" }, "usage": { "type": "object", "properties": { "ACTOR_COMPUTE_UNITS": { "type": "integer", "example": 0 }, "DATASET_READS": { "type": "integer", "example": 0 }, "DATASET_WRITES": { "type": "integer", "example": 0 }, "KEY_VALUE_STORE_READS": { "type": "integer", "example": 0 }, "KEY_VALUE_STORE_WRITES": { "type": "integer", "example": 1 }, "KEY_VALUE_STORE_LISTS": { "type": "integer", "example": 0 }, "REQUEST_QUEUE_READS": { "type": "integer", "example": 0 }, "REQUEST_QUEUE_WRITES": { "type": "integer", "example": 0 }, "DATA_TRANSFER_INTERNAL_GBYTES": { "type": "integer", "example": 0 }, "DATA_TRANSFER_EXTERNAL_GBYTES": { "type": "integer", "example": 0 }, "PROXY_RESIDENTIAL_TRANSFER_GBYTES": { "type": "integer", "example": 0 }, "PROXY_SERPS": { "type": "integer", "example": 0 }, "PROXY_UNBLOCKER_UNITS": { "type": "integer", "example": 0 } } }, "usageTotalUsd": { "type": "number", "example": 0.00005 }, "usageUsd": { "type": "object", "properties": { "ACTOR_COMPUTE_UNITS": { "type": "integer", "example": 0 }, "DATASET_READS": { "type": "integer", "example": 0 }, "DATASET_WRITES": { "type": "integer", "example": 0 }, "KEY_VALUE_STORE_READS": { "type": "integer", "example": 0 }, "KEY_VALUE_STORE_WRITES": { "type": "number", "example": 0.00005 }, "KEY_VALUE_STORE_LISTS": { "type": "integer", "example": 0 }, "REQUEST_QUEUE_READS": { "type": "integer", "example": 0 }, "REQUEST_QUEUE_WRITES": { "type": "integer", "example": 0 }, "DATA_TRANSFER_INTERNAL_GBYTES": { "type": "integer", "example": 0 }, "DATA_TRANSFER_EXTERNAL_GBYTES": { "type": "integer", "example": 0 }, "PROXY_RESIDENTIAL_TRANSFER_GBYTES": { "type": "integer", "example": 0 }, "PROXY_SERPS": { "type": "integer", "example": 0 }, "PROXY_UNBLOCKER_UNITS": { "type": "integer", "example": 0 } } } } } } } } }}OpenAPI is a standard for designing and describing RESTful APIs, allowing developers to define API structure, endpoints, and data formats in a machine-readable way. It simplifies API development, integration, and documentation.
OpenAPI is effective when used with AI agents and GPTs by standardizing how these systems interact with various APIs, for reliable integrations and efficient communication.
By defining machine-readable API specifications, OpenAPI allows AI models like GPTs to understand and use varied data sources, improving accuracy. This accelerates development, reduces errors, and provides context-aware responses, making OpenAPI a core component for AI applications.
You can download the OpenAPI definitions for Sitemap URL Extractor from the options below:
If you’d like to learn more about how OpenAPI powers GPTs, read our blog post.
You can also check out our other API clients: