{
  "openapi": "3.0.1",
  "info": {
    "title": "NPM Package Scraper — Downloads, Maintainers, Deps & SBOM",
    "description": "Export every NPM package by keyword, maintainer, scope or name. Get version, license, repo URL, maintainers, daily/weekly/monthly downloads, dependents, deprecation, full deps, version history. Official NPM registry + stats API. For devtool intel, SBOM and OSS outreach.",
    "version": "1.0",
    "x-build-id": "5EBzSWjmDjh6u8abS"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/logiover~npm-package-intelligence-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-logiover-npm-package-intelligence-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/logiover~npm-package-intelligence-scraper/runs": {
      "post": {
        "operationId": "runs-sync-logiover-npm-package-intelligence-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/logiover~npm-package-intelligence-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-logiover-npm-package-intelligence-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",
        "properties": {
          "searchTerms": {
            "title": "Search Terms",
            "type": "array",
            "description": "Free-text search queries against the NPM registry (`https://registry.npmjs.org/-/v1/search`). Each term paginates 250 results per page. Examples: ['scraper', 'crawler'], ['react component library'], ['stripe webhook']. Leave empty if you supply package names directly.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "packageNames": {
            "title": "Package Names",
            "type": "array",
            "description": "Direct NPM package names to fetch. Includes scoped packages: `@apify/scraper-tools`, `react`, `next`, `@types/node`. Faster and more predictable than search.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maintainer": {
            "title": "Maintainer / Author Filter (search-only)",
            "type": "string",
            "description": "Restrict search results to packages maintained by a specific username. The NPM search syntax appends `author:<name>` or `maintainer:<name>` to the query.",
            "default": ""
          },
          "scope": {
            "title": "Scope Filter (search-only)",
            "type": "string",
            "description": "Restrict search to a specific scope (org). Pass without the leading `@`. Examples: 'apify', 'sentry', 'storybook'.",
            "default": ""
          },
          "keywords": {
            "title": "Keyword Filter (search-only)",
            "type": "array",
            "description": "Add `keywords:<tag>` filters to each search query. Useful to narrow noisy queries. Examples: ['typescript'], ['react', 'hooks'].",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxResultsPerSearch": {
            "title": "Max Results Per Search Term",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard cap per search term. NPM search returns up to 250 per page; the actor auto-paginates.",
            "default": 100
          },
          "fetchPackageDetails": {
            "title": "Fetch Full Package Details",
            "type": "boolean",
            "description": "When enabled, the actor calls `https://registry.npmjs.org/{pkg}` for each package to retrieve full metadata: maintainers list, dist-tags, repository URL, homepage, license, engines, exports map, deprecation status, README content, and per-version publish times.",
            "default": true
          },
          "fetchDownloadsStats": {
            "title": "Fetch Downloads Stats",
            "type": "boolean",
            "description": "When enabled, the actor calls `https://api.npmjs.org/downloads/point/{period}/{pkg}` for each package and adds last-day, last-week, last-month and last-year download counts.",
            "default": true
          },
          "fetchDownloadsHistory": {
            "title": "Fetch Downloads History (per-day series)",
            "type": "boolean",
            "description": "When enabled (and `downloadsHistoryRange` is set), fetches the daily downloads time series from `https://api.npmjs.org/downloads/range/{range}/{pkg}`. Adds one record array per package with date + downloads pairs. Useful for trend analytics.",
            "default": false
          },
          "downloadsHistoryRange": {
            "title": "Downloads History Range",
            "type": "string",
            "description": "Range for `fetchDownloadsHistory`. Either preset (`last-week`, `last-month`, `last-year`) or explicit (`2026-01-01:2026-05-18`).",
            "default": "last-month"
          },
          "fetchReadme": {
            "title": "Include README Content",
            "type": "boolean",
            "description": "When enabled (requires `fetchPackageDetails`), the package's full README markdown content is included in the output record.",
            "default": false
          },
          "minMonthlyDownloads": {
            "title": "Minimum Monthly Downloads (client-side filter)",
            "minimum": 0,
            "type": "integer",
            "description": "Drop packages with fewer monthly downloads than this. Useful to filter out abandoned / experimental packages. Requires `fetchDownloadsStats`.",
            "default": 0
          },
          "includeDeprecated": {
            "title": "Include Deprecated Packages",
            "type": "boolean",
            "description": "When `false`, skips packages marked as deprecated by their maintainer.",
            "default": true
          },
          "minVersionPublishDate": {
            "title": "Minimum Latest-Version Publish Date (ISO)",
            "type": "string",
            "description": "Only keep packages whose latest version was published on or after this date. Useful for surfacing 'fresh' packages. Requires `fetchPackageDetails`.",
            "default": null
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}