Carbon API

Version 1.4.0


Carbon is a freely available HTTP Request & Response Service. It is an ongoing project designed by Corey Edwards as an experiment in developing a public-facing API in PHP.



Endpoint: /now

Returns the current time, in a variety of formats.

$ curl
    "request_time": 1507635156.020285,
    "now": {
        "epoch": 1507635156.022229,
        "slang_date": "today",
        "slang_time": "now",
        "iso8601": "2017-10-10T11:32:36+00:00",
        "rfc2822": "Tue, 10 Oct 2017 11:32:36 +0000",
        "rfc3339": "2017-10-10T11:32:36+00:00"

IP Address

Endpoint: /ip

Returns the IP address of the client.

$ curl
  "origin": ""

User agent

Endpoint: /user_agent

Returns the user-agent of the client.

$ curl
  "user-agent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:52.0) Gecko/20100101 Firefox/52.0"


Endpoint: /headers

Returns all HTTP request headers from the current request.

$ curl
    "headers": {
        "Host": "",
        "User-Agent": "Mozilla/5.0 (X11; Linux i586; rv:31.0) Gecko/20100101 Firefox/31.0",
        "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
        "Accept-Language": "en-US,en;q=0.5",
        "Accept-Encoding": "gzip, deflate",
        "Cookie": "_ga=GA1.1.1082408841.1496132797",
        "DNT": "1",
        "Connection": "keep-alive",
        "Upgrade-Insecure-Requests": "1",
        "Cache-Control": "max-age=0"


Endpoint: /download

Generates n megabytes of data where ?size=n. The data file consists of alternating 1's and 0's.

$ curl
HTTP/1.1 200 OK
Date: Tue, 10 Oct 2017 19:46:17 +0000
Connection: close
server: CarbonAPI
X-Powered-By: CarbonAPI
Content-Type: application/octet-stream
Content-Transfer-Encoding: Binary
Content-length: 104857600
Content-Disposition: attachment; filename=zero.bin

TOR Node

Endpoint: /tor

Returns whether or not the client is connecting through a TOR node.

$ curl
    "origin": "",
    "hostname": "",
    "tor_node": "true"

Host Location

Endpoint: /location

Returns the geographical information of the given host. If no host is specified, Carbon uses the client IP for the lookup.

Accepts fully-qualified domain names and IP (v4/v6) addresses as the host.

$ curl
  "location": {
    "ip": "",
    "hostname": "",
    "city": "Brisbane",
    "state_province": "Queensland",
    "country": "Australia",
    "ISO3166-1-alpha-2": "AU",
    "postal_code": 4000,
    "longitude": -27.4679,
    "latitude": 153.028,
    "google_maps": ",153.028"

Do Not Track

Endpoint: /dnt

Returns the status of the HTTP DNT header.

$ curl
    "DNT": "true"

HTTP Referer

Endpoint: /referer

Returns the contents of the HTTP Referer header.

$ curl
    "referer": ""


Endpoint: /delay

Delay the connection response for n seconds.

$ curl
    "HTTP Response Code": "HTTP/1.1 200 OK",
    "response_delay": "5s"


Endpoint: /uuid

Generate valid RFC 4122 v4 compliant Universally Unique IDentifiers (UUID).

$ curl
    "uuid": "244650e9-715a-4946-be98-43872ae6b067"


Endpoint: /opengraph

Return OpenGraph tags from url

$ curl
    "og": {
        "locale": "en_US",
        "type": "article",
        "title": "Carbon",
        "description": "Free HTTP Request & Response Service.",
        "url": "",
        "site_name": "Carbon",
        "image": "",
        "image:width": 512,
        "image:height": 1024,
        "updated_time": "2017-10-05T18:10:04+00:00"

HTTP Redirect

Endpoint: /go

Redirect client to url

$ curl

HTTP Status Code

Endpoint: /status

Return HTTP Status Code matching n. Also returns Warning header with confirmation that the status has actually been returned by Carbon API and not a legitimate server issue.

$ curl
    "Status": "HTTP/1.1 200 OK"

Feedback (currently disabled)

Endpoint: /feedback

Submit feedback on Carbon API. Currently disabled pending bug fixes.

$ curl -d name='John Doe' -d email='[email protected]' -d message='Hi Carbon!'
    "feedback": {
        "name": "John Doe",
        "email": "[email protected]",
        "message": "I love Carbon API!"
    "status": "submitted"