{"id":14156022,"url":"https://github.com/httptoolkit/openapi-directory-js","last_synced_at":"2025-07-27T13:12:28.117Z","repository":{"id":34146395,"uuid":"170318480","full_name":"httptoolkit/openapi-directory-js","owner":"httptoolkit","description":"Building \u0026 bundling https://github.com/APIs-guru/openapi-directory for easy use from JS","archived":false,"fork":false,"pushed_at":"2025-06-15T13:47:01.000Z","size":407,"stargazers_count":23,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-15T14:12:34.237Z","etag":null,"topics":["collection","openapi","openapi3","searchable","swagger"],"latest_commit_sha":null,"homepage":"https://httptoolkit.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/httptoolkit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-02-12T12:59:30.000Z","updated_at":"2025-06-15T13:47:04.000Z","dependencies_parsed_at":"2024-06-21T07:10:35.566Z","dependency_job_id":"0a4f5049-8de9-407e-aa6a-27c4d35505ee","html_url":"https://github.com/httptoolkit/openapi-directory-js","commit_stats":{"total_commits":82,"total_committers":2,"mean_commits":41.0,"dds":0.1585365853658537,"last_synced_commit":"253f07790f8fac264103b8778463cd1796d6e0c4"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/httptoolkit/openapi-directory-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httptoolkit%2Fopenapi-directory-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httptoolkit%2Fopenapi-directory-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httptoolkit%2Fopenapi-directory-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httptoolkit%2Fopenapi-directory-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/httptoolkit","download_url":"https://codeload.github.com/httptoolkit/openapi-directory-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httptoolkit%2Fopenapi-directory-js/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265200538,"owners_count":23726846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["collection","openapi","openapi3","searchable","swagger"],"created_at":"2024-08-17T08:05:09.795Z","updated_at":"2025-07-13T20:35:40.024Z","avatar_url":"https://github.com/httptoolkit.png","language":"TypeScript","funding_links":[],"categories":["others"],"sub_categories":[],"readme":"# An OpenAPI Directory for JS [![Build Status](https://github.com/httptoolkit/openapi-directory-js/workflows/CI/badge.svg)](https://github.com/httptoolkit/openapi-directory-js/actions) [![npm version](https://badge.fury.io/js/openapi-directory.svg)](https://badge.fury.io/js/openapi-directory)\n\n\u003e _Part of [HTTP Toolkit](https://httptoolkit.com): powerful tools for building, testing \u0026 debugging HTTP(S)_\n\nThis repo builds \u0026 bundles the [OpenAPI Directory](https://github.com/APIs-guru/openapi-directory), so you can easily find, require and use any OpenAPI spec from the directory in your JS projects.\n\nIt provides files that can be individually required or remotely downloaded (via https://unpkg.com/openapi-directory/) for every API in the collection, and an index to quickly find the relevant OpenAPI spec for a given URL.\n\nAll specs are:\n\n* Pre-parsed and exposed as JavaScript objects (not YAML strings).\n* Converted to OpenAPI v3.\n* Pre-bundled with all external $refs.\n\nThat means you can import them, and immediately \u0026 consistently start using them.\n\n## How to use it\n\nFirst up, install it with:\n\n```bash\nnpm install openapi-directory\n```\n\nAll OpenAPI specs can be now required with:\n\n```js\nconst spec = require('openapi-directory/api/\u003cspec-id\u003e.json');\n```\n\n(or read from `https://unpkg.com/openapi-directory/api/\u003cspec-id\u003e.json`)\n\nThe easiest way to obtain a spec id is to use the index. You can look up a URL in the index with:\n\n```js\nconst { findApi } = require('openapi-directory');\n\nfindApi('wikimedia.org/api/rest_v1/feed/availability');\n```\n\n`findApi` takes a URL (host and path, _without_ the protocol) within any API, and will return either:\n\n* Undefined, if there is no matching APIs.\n* A string spec id, if there is exactly one API that's relevant to that URL.\n* A list of spec ids, in rare cases where multiple specs may cover the same URL.\n\nAlternatively if you know in advance which spec you want you can require it directly. The id for every spec in the directory is made up of the provider name, followed by a slash and the service name if a service name exists. Some example ids:\n\n* `xkcd.com` (provider is xkcd.com, no service name)\n* `amazonaws.com/acm` (provider is amazonaws.com, service name is acm).\n\nYou can find the provider and service name in the spec itself (under `info`, `x-providerName` and `x-serviceName`), and you can browse the raw specs directly at https://github.com/APIs-guru/openapi-directory.\n\n## License\n\nThis repo/npm module is licensed as MIT.\n\nThe license for API definitions varies by spec, see https://github.com/APIs-guru/openapi-directory#licenses for more information.\n\nIn general it's very likely that your use of any API definition is covered either by CC0 (for specs submitted directly to the directory), the spec's own license (check `info.license`) or by Fair Use provisions when communicating with the corresponding service. This is not formal legal advice though, its your responsibility to confirm this for yourself for the specs you're using.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhttptoolkit%2Fopenapi-directory-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhttptoolkit%2Fopenapi-directory-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhttptoolkit%2Fopenapi-directory-js/lists"}