# How to Index 226,379 API Endpoints

DevFeed: [How to Index 226,379 API Endpoints](<https://devfeed.tech/articles/how-to-index-226-379-api-endpoints-19066.md>)

Original publisher: [Read original article](<https://httptoolkit.com/blog/how-to-index-200000-apis/>)

Author: HTTP Toolkit; Tim Perry

Published: 2021-02-11T13:00:00Z

Content type: tutorial

Language: en

Sources: [HTTP Toolkit](<https://devfeed.tech/sources/http-toolkit.md>)

Topics: [API](<https://devfeed.tech/topics/api.md>), [OpenAPI Specification](<https://devfeed.tech/topics/openapi.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [SDKs](<https://devfeed.tech/topics/sdks.md>), [Documentation](<https://devfeed.tech/topics/documentation.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [api-documentation](<https://devfeed.tech/tags/api-documentation.md>), [apis](<https://devfeed.tech/tags/apis.md>), [demo](<https://devfeed.tech/tags/demo.md>), [generate](<https://devfeed.tech/tags/generate.md>), [http](<https://devfeed.tech/tags/http.md>), [openapi](<https://devfeed.tech/tags/openapi.md>), [sdks](<https://devfeed.tech/tags/sdks.md>)

## AI overview

This article explains how an index was built for 226,379 API endpoints from the OpenAPI Directory. It describes how HTTP Toolkit uses the index to provide validation, metadata, and documentation links when inspecting known API requests, and introduces the algorithmic and data-structure challenges involved.

## Source excerpt

Wouldn't it be neat if you could take any HTTP request URL, and immediately find the matching API documentation, along with a detailed specification of the endpoint you're talking to? I thought that would be very neat, so I built an index to do it. More specifically, I've taken the OpenAPI Directory - an amazing project that has collected the OpenAPI specifications for thousands of popular APIs, from AWS to Stripe to GitHub - and built a tiny & fast index to query it, for every single API endpoint listed (all 226,379 of them) This was fun, but it's also useful: HTTP Toolkit uses this to automatically provide validation, metadata and links to documentation, so that when you intercept & inspect a request to a known API you can tell exactly what it's doing (and what it's doing wrong, if anything). If you want to give this a quick test yourself, you can play with a demo directly at runkit.com/pimterry/openapi-directory-js-demo. If you want to know how this works, read on. This gets pretty complicated, but it's a really interesting set of algorithmic challenges and neat datastructures that solve some concrete problems. Why is this useful? API specifications have been a growing field a long time, but they're really coming to maturity now. For a time we had fighting standards for this, but in the last few years one standard has reached widespread use and become the clear choice: OpenAPI. API specifications allow tools and automated systems to automatically understand API interactions. That opens a whole world of options: Documentation generated from specifications, staying automatically up to date, with tools like ReDoc. APIs that can be automatically tested against their own specification to guarantee a single source of truth. Interactive HTTP clients that can suggest the endpoints or query parameters you're looking for, and spot mistakes automatically. SDKs that can be generated directly from API specifications for 40+ languages with tools like Swagger-CodeGen. Error rep