{
  "openapi": "3.0.1",
  "info": {
    "title": "WordPress Plugin Stats API",
    "description": "Get WordPress.org plugin data from the official API: installs, ratings, days since update, support resolution rate, compatibility and recent reviews.",
    "version": "0.1",
    "x-build-id": "aIyV9PnMJiyWGN8LW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/thimbleroot~wordpress-plugin-intel/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-thimbleroot-wordpress-plugin-intel",
        "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/thimbleroot~wordpress-plugin-intel/runs": {
      "post": {
        "operationId": "runs-sync-thimbleroot-wordpress-plugin-intel",
        "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/thimbleroot~wordpress-plugin-intel/run-sync": {
      "post": {
        "operationId": "run-sync-thimbleroot-wordpress-plugin-intel",
        "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",
        "properties": {
          "plugins": {
            "title": "Plugins",
            "type": "array",
            "description": "WordPress.org plugin slugs or plugin page URLs to fetch, one per item. The slug is the last path segment of the plugin URL, e.g. 'akismet', 'contact-form-7', or 'https://wordpress.org/plugins/wordpress-seo/'. These are always included in addition to any search/tag/author/browse results. Leave empty if you only use search/tag/author/browse.",
            "default": [
              "akismet"
            ],
            "items": {
              "type": "string"
            }
          },
          "search": {
            "title": "Search term",
            "type": "string",
            "description": "Optional free-text query run against the WordPress.org plugin directory, e.g. 'backup' or 'contact form'. Matching plugins are added, up to 'maxPlugins'."
          },
          "tag": {
            "title": "Tag",
            "type": "string",
            "description": "Optional WordPress.org plugin tag (lowercase, hyphenated), e.g. 'seo', 'woocommerce', 'security', 'contact-form'. Plugins with this tag are added, up to 'maxPlugins'."
          },
          "author": {
            "title": "Author username",
            "type": "string",
            "description": "Optional WordPress.org username of a plugin author (from https://profiles.wordpress.org/<username>/), e.g. 'automattic'. All their plugins are added, up to 'maxPlugins'."
          },
          "browse": {
            "title": "Browse list",
            "enum": [
              "",
              "popular",
              "new",
              "updated",
              "top-rated"
            ],
            "type": "string",
            "description": "Optional WordPress.org browse list to add plugins from: 'popular', 'new', 'updated' (recently updated) or 'top-rated'. Leave empty to skip.",
            "default": ""
          },
          "maxPlugins": {
            "title": "Max plugins from search/tag/author/browse",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of plugins added from search, tag, author and browse combined (1-5000). Does not limit plugins listed explicitly in 'plugins'. Higher values mean longer runs and higher cost.",
            "default": 5
          },
          "includeReviews": {
            "title": "Include reviews",
            "type": "boolean",
            "description": "If true, also scrape each plugin's newest public reviews (output as 'review' records) and compute reviewInsights (reviews in the last 30/90 days, recent average rating, negative share, reply share). Set false for faster, cheaper runs with plugin stats only.",
            "default": true
          },
          "maxReviewsPerPlugin": {
            "title": "Max reviews per plugin",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of newest reviews to fetch per plugin when 'includeReviews' is true. 0 disables review records. Default 20.",
            "default": 20
          },
          "reviewsSince": {
            "title": "Only reviews since (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional cutoff date in YYYY-MM-DD format, e.g. '2026-01-01'. Review paging stops once reviews are older than this date."
          },
          "requestDelayMs": {
            "title": "Delay between requests (ms)",
            "minimum": 0,
            "type": "integer",
            "description": "Pause in milliseconds between requests to wordpress.org, to stay polite. Default 1000; lowering it is not recommended.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}