$ show marcelscruz/public-apis
This repository is a curated directory of public APIs, maintained as a human-readable Markdown table in `README.md` and automatically transformed into structured JSON files (`db/resources.json`, `db/categories.json`) via a Node.js generator. The primary data flow is: community contributions (PRs) update the README table → a GitHub Actions workflow runs `scripts/db/update-db.js` on every push to `main` → the script parses the Markdown using `remark-parse`, extracts categories and API entries, normalizes auth and CORS fields, and writes the JSON output back to the repository. The generated JSON serves as a machine-consumable API catalog for developers and tools (e.g., the companion website publicapis.dev). The repository is fundamentally a data_research project: its core value is the curated dataset of 1,800+ APIs with metadata (name, description, auth type, CORS support, category). The only 'application' component is the lightweight generator script and its utility modules, which are well-structured but tightly coupled to the specific Markdown format. There are no tests, no runtime services, and no external data sources beyond the README itself. The dataset is manually curated via pull requests, which introduces maintenance risks (stale links, incomplete metadata) but also ensures human oversight of quality. For reproducibility, an analyst can clone the repo, run `npm install` (dependencies are locked via `package-lock.json`), and execute `npm run build` to regenerate the JSON from the README. The entire pipeline is self-contained and does not require external credentials or data. However, the lack of unit tests means that changes to the parsing logic could silently break the output.
The LLM identified 3 files worth highlighting for reuse:
Converts category names (e.g., 'Art & Design') into URL-friendly slugs (e.g., 'art-design') by replacing special characters with hyphens and lowercasing. This is a reusable pattern for any project that needs to normalize human-readable labels into machine-friendly identifiers, and it is isolated enough to extract into a standalone utility.
Parses the Markdown AST (produced by `remark-parse`) to extract pairs of `<h3>` headings and their immediately following `<table>` elements. This pattern is reusable for any Markdown document that uses a consistent heading-table structure (e.g., documentation with code examples, changelogs). The function is pure and only depends on the AST node structure, making it adaptable to other Markdown-to-data pipelines.
Transforms raw table row data (parsed from Markdown cells) into structured API entry objects with fields like `API`, `Description`, `Auth`, `Cors`, `Link`, and `Category`. It handles edge cases such as multi-cell descriptions (via `group-row-content.js`) and normalizes auth and CORS values. This pattern is reusable for any project that needs to convert tabular data into a consistent schema, especially when the source data has inconsistent formatting.