{
  "openapi": "3.0.1",
  "info": {
    "title": "WordPress Content Scraper",
    "description": "Scrapes any self-hosted WordPress site via its public REST API — posts, pages, media, categories, tags, comments, users, even custom post types. No login. Raw JSON passthrough, honest pagination, and a clear error row for sites that disable their REST API.",
    "version": "0.1",
    "x-build-id": "XDZNIgsZ353TnYx0H"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapyx~wordpress-content-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapyx-wordpress-content-scraper",
        "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/scrapyx~wordpress-content-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapyx-wordpress-content-scraper",
        "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/scrapyx~wordpress-content-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapyx-wordpress-content-scraper",
        "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": "WordPress site URLs",
            "type": "array",
            "description": "Base URL of each self-hosted WordPress site to scrape, e.g. `https://example.com` or `example.com/blog`. Every site is queried through its own public `/wp-json/wp/v2/` REST API -- the same one WordPress core exposes by default, with no login. A site that has disabled its REST API, or is not WordPress at all, gets a single ERROR row explaining why rather than stopping the whole run.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "resources": {
            "title": "Content types to fetch",
            "type": "array",
            "description": "Which built-in WordPress collections to pull from each site, in the SAME run -- these are independent resources sharing one client, not exclusive modes, so picking several is normal (e.g. posts + categories + tags together). Each gets its own SEARCH_SUMMARY row per site.",
            "items": {
              "type": "string",
              "enum": [
                "posts",
                "pages",
                "media",
                "comments",
                "categories",
                "tags",
                "users"
              ],
              "enumTitles": [
                "Posts",
                "Pages",
                "Media (images/files)",
                "Comments",
                "Categories",
                "Tags",
                "Users/authors"
              ]
            },
            "default": [
              "posts"
            ]
          },
          "customPostTypes": {
            "title": "Custom post type REST slugs",
            "type": "array",
            "description": "Extra REST base slugs for non-core content this site's theme/plugins registered with `show_in_rest` (e.g. a WooCommerce `product`, a portfolio `project`). Fetched exactly like the built-in resources above, under a `CUSTOM_<SLUG>` record type. A slug that is not actually registered on the site fails with a clear `not_found` ERROR row for just that resource, not the whole site -- check the site's `/wp-json/` route index first if unsure.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "search": {
            "title": "Search query",
            "type": "string",
            "description": "Full-text search applied to every selected resource on every site, using WordPress's own `search` parameter. Leave empty to fetch each resource's full listing (newest first) instead.",
            "default": ""
          },
          "after": {
            "title": "Published after",
            "type": "string",
            "description": "ISO 8601 datetime, e.g. `2026-01-01T00:00:00`. Only applies to date-bearing resources (posts, pages, media, comments, custom post types) -- silently skipped for categories/tags/users, which have no date field. Leave empty for no lower bound.",
            "default": ""
          },
          "before": {
            "title": "Published before",
            "type": "string",
            "description": "ISO 8601 datetime. Same scope as 'Published after'. Leave empty for no upper bound.",
            "default": ""
          },
          "embed": {
            "title": "Embed related objects (_embed)",
            "type": "boolean",
            "description": "Adds WordPress's own `_embed=true` flag, which inlines the author, featured image and taxonomy terms directly into each post/page/media/comment row under `_embedded` -- avoiding a separate request per related object. On by default; turn off only to shrink payload size.",
            "default": true
          },
          "perPage": {
            "title": "Items per request",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "WordPress's own `per_page` parameter. Hard-capped at 100 by the API -- any higher value fails that resource's fetch with a 400.",
            "default": 100
          },
          "maxItemsPerResource": {
            "title": "Max items per (site, resource) pair",
            "minimum": 0,
            "type": "integer",
            "description": "Stop paging one resource on one site after this many items. Set to 0 for unlimited (walks every page WordPress reports via X-WP-TotalPages). With multiple sites/resources selected, this cap applies separately to each pair.",
            "default": 200
          },
          "maxConcurrency": {
            "title": "Max concurrent requests",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Upper bound on requests in flight at once, across every site and resource this run touches.",
            "default": 5
          },
          "minRequestInterval": {
            "title": "Min seconds between request starts, per site",
            "minimum": 0,
            "type": "number",
            "description": "Pacing floor applied separately to each site (not shared globally across different sites), independent of 'Max concurrent requests'. No rate-limit or WAF gate was observed on any site tested, but inputs here are arbitrary user-supplied installs -- some may be small blogs on modest shared hosting, unlike this portfolio's usual large fixed targets. Set to 0 to disable.",
            "default": 0.5
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "The WordPress REST API is public by design and no bot-mitigation gate was observed on any site tested, including ones behind Cloudflare. Apify's automatic proxy is the cloud default; residential is not forced since this actor targets arbitrary sites worldwide rather than one region.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}