# HTTP Status Code Lookup API

> HTTP Status Code Lookup decodes any HTTP status code by returning its standard name and detailed description. Provide a numeric code to inspect its meaning and response behavior across standard ranges, and add details=true for a link to the defining RFC section, plus on paid plans its retry and caching behavior and the headers that go with it.

**Endpoint:** `GET https://api.apiverve.com/v1/httpstatuslookup`  
**Category:** Reference Data  
**Cost:** 1 credit per call  
**Canonical page:** https://apiverve.com/marketplace/httpstatuslookup

## Overview

HTTP Status Code Lookup works by querying the HTTP status codes registered with IANA and defined across RFCs 9110, 6585, 4918 and others. Returns the status code name, description, category and boolean flags; with details=true it also returns a link to the defining RFC section, and on paid plans the current registry name, the RFC section itself, whether the code is safe to retry, whether RFC 9110 lets caches store it by default, and the headers the spec pairs with it (Location, Retry-After, WWW-Authenticate, Allow and so on).

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/httpstatuslookup?code=404&details=true" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | integer | Yes | HTTP status code to lookup. range 100-599 |
| `details` | boolean | No | Also return the registry name, defining RFC section and link, retry and default-caching flags, and related headers. default false |

## Response fields

- `code` — number · HTTP status code number
- `name` — string · Standard name of the status code
- `description` — string · Detailed description of the status code
- `category` — string · The classification of the status code by its leading digit: Informational, Success, Redirection, Client Error, or Server Error · (premium)
- `is_error` — boolean · Whether the status code represents a client or server error (4xx or 5xx) · (premium)
- `is_success` — boolean · Whether the status code represents a successful response (2xx)
- `is_redirect` — boolean · Whether the status code represents a redirection (3xx)
- `is_informational` — boolean · Whether the status code represents an informational response (1xx)
- `registry_name` — string · Current name in the IANA HTTP status code registry, which can differ from the common name (413 is now Content Too Large). Returned with details=true · (premium)
- `spec` — string · The RFC, and section where the registry gives one, that defines the code. Returned with details=true · (premium)
- `spec_url` — string · Link to the defining RFC section on rfc-editor.org. Returned with details=true
- `is_retryable` — boolean · Whether the code signals a transient condition, so the same request may succeed later (408, 425, 429, 500, 502, 503, 504). Returned with details=true · (premium)
- `is_cacheable_by_default` — boolean · Whether RFC 9110 Section 15.1 lets a cache store this response without explicit freshness information. Returned with details=true · (premium)
- `related_headers` — array · Headers the defining spec pairs with this code, such as Location for redirects or Retry-After for 429 and 503. Empty when there are none. Returned with details=true · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "code": 404,
    "name": "Not Found",
    "description": "The requested resource could not be found",
    "category": "Client Error",
    "is_error": true,
    "is_success": false,
    "is_redirect": false,
    "is_informational": false,
    "registry_name": "Not Found",
    "spec": "RFC 9110, Section 15.5.5",
    "spec_url": "https://www.rfc-editor.org/rfc/rfc9110#section-15.5.5",
    "is_retryable": false,
    "is_cacheable_by_default": true,
    "related_headers": []
  }
}
```

## Use cases

- **API Development** — Quickly reference HTTP status codes while developing and debugging APIs
- **Error Handling** — Understand status codes when implementing error handling and response logic
- **Documentation** — Generate status code documentation and error message templates for APIs
- **Troubleshooting** — Diagnose HTTP errors and understand response codes during debugging

## SDKs

- **npm** — `npm install @apiverve/httpstatuslookup` (https://www.npmjs.com/package/@apiverve/httpstatuslookup)
- **NuGet** — `dotnet add package APIVerve.API.HTTPStatusCodeLookup` (https://www.nuget.org/packages/APIVerve.API.HTTPStatusCodeLookup)
- **Source** — https://github.com/apiverve/httpstatuslookup-api

## More

- Full reference: https://docs.apiverve.com/ref/httpstatuslookup
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
