# Httpbin API

> A Simple HTTP Request & Response Service.

Httpbin is a development API from httpbin.org. It needs no API key. It is served over HTTPS and allows browser requests (CORS). Its OpenAPI description documents 73 endpoints.

## At a glance

- Category: [Development](https://www.openparable.com/apis/category/development)
- Provider: httpbin.org
- Authentication: None (no API key)
- HTTPS: Yes
- CORS: Yes
- Base URL: https://httpbin.org
- Documentation: https://httpbin.org/
- OpenAPI description: https://api.apis.guru/v2/specs/httpbin.org/0.9.2/openapi.json
- Version: 0.9.2
- Specification updated: 2021-06-21

## Example request

```bash
curl -X GET "https://httpbin.org/anything" \
  -H "Accept: application/json"
```

## Endpoints

- `GET /absolute-redirect/{n}` — Absolutely 302 Redirects n times.
- `GET /anything` — Returns anything passed in request data.
- `POST /anything` — Returns anything passed in request data.
- `PUT /anything` — Returns anything passed in request data.
- `PATCH /anything` — Returns anything passed in request data.
- `DELETE /anything` — Returns anything passed in request data.
- `GET /anything/{anything}` — Returns anything passed in request data.
- `POST /anything/{anything}` — Returns anything passed in request data.
- `PUT /anything/{anything}` — Returns anything passed in request data.
- `PATCH /anything/{anything}` — Returns anything passed in request data.
- `DELETE /anything/{anything}` — Returns anything passed in request data.
- `GET /base64/{value}` — Decodes base64url-encoded string.
- `GET /basic-auth/{user}/{passwd}` — Prompts the user for authorization using HTTP Basic Auth.
- `GET /bearer` — Prompts the user for authorization using bearer authentication.
- `GET /brotli` — Returns Brotli-encoded data.
- `GET /bytes/{n}` — Returns n random bytes generated with given seed
- `GET /cache` — Returns a 304 if an If-Modified-Since header or If-None-Match is present. Returns the same as a GET otherwise.
- `GET /cache/{value}` — Sets a Cache-Control header for n seconds.
- `GET /cookies` — Returns cookie data.
- `GET /cookies/delete` — Deletes cookie(s) as provided by the query string and redirects to cookie list.
- `GET /cookies/set` — Sets cookie(s) as provided by the query string and redirects to cookie list.
- `GET /cookies/set/{name}/{value}` — Sets a cookie and redirects to cookie list.
- `GET /deflate` — Returns Deflate-encoded data.
- `GET /delay/{delay}` — Returns a delayed response (max of 10 seconds).
- `POST /delay/{delay}` — Returns a delayed response (max of 10 seconds).
- `PUT /delay/{delay}` — Returns a delayed response (max of 10 seconds).
- `PATCH /delay/{delay}` — Returns a delayed response (max of 10 seconds).
- `DELETE /delay/{delay}` — Returns a delayed response (max of 10 seconds).
- `DELETE /delete` — The request's DELETE parameters.
- `GET /deny` — Returns page denied by robots.txt rules.
- `GET /digest-auth/{qop}/{user}/{passwd}` — Prompts the user for authorization using Digest Auth.
- `GET /digest-auth/{qop}/{user}/{passwd}/{algorithm}` — Prompts the user for authorization using Digest Auth + Algorithm.
- `GET /digest-auth/{qop}/{user}/{passwd}/{algorithm}/{stale_after}` — Prompts the user for authorization using Digest Auth + Algorithm.
- `GET /drip` — Drips data over a duration after an optional initial delay.
- `GET /encoding/utf8` — Returns a UTF-8 encoded body.
- `GET /etag/{etag}` — Assumes the resource has the given etag and responds to If-None-Match and If-Match headers appropriately.
- `GET /get` — The request's query parameters.
- `GET /gzip` — Returns GZip-encoded data.
- `GET /headers` — Return the incoming request's HTTP headers.
- `GET /hidden-basic-auth/{user}/{passwd}` — Prompts the user for authorization using HTTP Basic Auth.
- `GET /html` — Returns a simple HTML document.
- `GET /image` — Returns a simple image of the type suggest by the Accept header.
- `GET /image/jpeg` — Returns a simple JPEG image.
- `GET /image/png` — Returns a simple PNG image.
- `GET /image/svg` — Returns a simple SVG image.
- `GET /image/webp` — Returns a simple WEBP image.
- `GET /ip` — Returns the requester's IP Address.
- `GET /json` — Returns a simple JSON document.
- `GET /links/{n}/{offset}` — Generate a page containing n links to other pages which do the same.
- `PATCH /patch` — The request's PATCH parameters.
- `POST /post` — The request's POST parameters.
- `PUT /put` — The request's PUT parameters.
- `GET /range/{numbytes}` — Streams n random bytes generated with given seed, at given chunk size per packet.
- `GET /redirect-to` — 302/3XX Redirects to the given URL.
- `POST /redirect-to` — 302/3XX Redirects to the given URL.
- `PUT /redirect-to` — 302/3XX Redirects to the given URL.
- `PATCH /redirect-to` — 302/3XX Redirects to the given URL.
- `DELETE /redirect-to` — 302/3XX Redirects to the given URL.
- `GET /redirect/{n}` — 302 Redirects n times.
- `GET /relative-redirect/{n}` — Relatively 302 Redirects n times.
- `GET /response-headers` — Returns a set of response headers from the query string.
- `POST /response-headers` — Returns a set of response headers from the query string.
- `GET /robots.txt` — Returns some robots.txt rules.
- `GET /status/{codes}` — Return status code or random status code if more than one are given
- `POST /status/{codes}` — Return status code or random status code if more than one are given
- `PUT /status/{codes}` — Return status code or random status code if more than one are given
- `PATCH /status/{codes}` — Return status code or random status code if more than one are given
- `DELETE /status/{codes}` — Return status code or random status code if more than one are given
- `GET /stream-bytes/{n}` — Streams n random bytes generated with given seed, at given chunk size per packet.
- `GET /stream/{n}` — Stream n JSON responses
- `GET /user-agent` — Return the incoming requests's User-Agent header.
- `GET /uuid` — Return a UUID4.
- `GET /xml` — Returns a simple XML document.

## Questions

### Does the Httpbin API need an API key?

No. The Httpbin API can be called without an API key or sign-up, which makes it handy for prototypes and front-end demos.

### Can I call the Httpbin API from the browser?

Yes. The Httpbin API sends CORS headers, so a web page can call it directly with fetch().

### Does the Httpbin API support HTTPS?

Yes, the Httpbin API is served over HTTPS.

### How many endpoints does the Httpbin API have?

Its OpenAPI description lists 73 endpoints in version 0.9.2. All of them are shown on this page.

### What are alternatives to the Httpbin API?

Other Development APIs include Cloudflare, Azure DevOps, IPify, App Store Connect API, StackExchange.

## Similar development APIs

- [Cloudflare](https://www.openparable.com/apis/cloudflare): Manage DNS, CDN, Workers and other services; documented with an official OpenAPI 3.0 spec
- [Azure DevOps](https://www.openparable.com/apis/azure-devops): The Azure DevOps basic components of a REST API request/response pair
- [IPify](https://www.openparable.com/apis/ipify): A simple IP Address API
- [App Store Connect API](https://www.openparable.com/apis/app-store-connect): The data structure that represents an app store connect api resource.
- [StackExchange](https://www.openparable.com/apis/stackexchange): Q&A forum for developers
- [IPinfo](https://www.openparable.com/apis/ipinfo): Another simple IP Address API
- [IBM Text to Speech](https://www.openparable.com/apis/ibm-text-to-speech): Convert text to speech
- [SiteIntel](https://www.openparable.com/apis/siteintel): Extract metadata, tech stack, emails, and screenshots from any URL
- [DigitalOcean Status](https://www.openparable.com/apis/digitalocean-status): Status of all DigitalOcean services
- [Netlify](https://www.openparable.com/apis/netlify): Netlify is a hosting service for the programmable web
- [Docker Hub](https://www.openparable.com/apis/docker-hub): Interact with Docker Hub
- [MineSkin API](https://www.openparable.com/apis/mineskin): Client implementations: Java: https://github.com/InventivetalentDev/MineskinClient NodeJS: https://github.com/InventivetalentDev/mineskin-client Examples: https://github.com/MineSkin/examples

Listed from: public-apis (MIT), public-apis database (MIT), APIs.guru (CC0). Check the provider's terms before use.

---

Source: https://www.openparable.com/apis/httpbin (OpenParable). Cite the canonical URL above.
