Working with domain data in our API

We'll assume you've already got the API authentication settled, and you have our API key with you (this is the Authorization header in all the examples used below).

Retrieving domain information for a site

To retrieve domain information of a site, you'll need the website ID first.

The /api/sites/{$siteId}/domain endpoint displays domain related information we retrieved for your domain.

$ OHDEAR_TOKEN="your API token"
$ curl https://ohdear.app/api/sites/1/domain \
    -H "Authorization: Bearer $OHDEAR_TOKEN" \
    -H 'Accept: application/json' \
    -H 'Content-Type: application/json'

The response contains the most important dates of the domain, and the domain status. In the rdap_domain_response key, you'll find the raw response we got from RDAP about your domain. The created_at key contains the date on which we queried RDAP.

Here's example output when monitoring google.com:

{
    "expires_at": "2028-09-14 04:00:00",
    "registered_at": "1997-09-15 04:00:00",
    "last_changed_at": "2019-09-09 15:39:04",
    "last_updated_in_rdap_db_at": "2022-06-11 00:32:59",
    "domain_statuses": {
        "client delete prohibited": true,
        "client transfer prohibited": true,
        "client update prohibited": true,
        "server delete prohibited": true,
        "server transfer prohibited": true,
        "server update prohibited": true
    },
    "rdap_domain_response": {
        "links": [
            {
                "rel": "self",
                "href": "https:\/\/rdap.verisign.com\/com\/v1\/domain\/GOOGLE.COM",
                "type": "application\/rdap+json",
                "value": "https:\/\/rdap.verisign.com\/com\/v1\/domain\/GOOGLE.COM"
            },
            {
                "rel": "related",
                "href": "https:\/\/rdap.markmonitor.com\/rdap\/domain\/GOOGLE.COM",
                "type": "application\/rdap+json",
                "value": "https:\/\/rdap.markmonitor.com\/rdap\/domain\/GOOGLE.COM"
            }
        ],
        "events": [
            {
                "eventDate": "1997-09-15T04:00:00Z",
                "eventAction": "registration"
            },
            {
                "eventDate": "2028-09-14T04:00:00Z",
                "eventAction": "expiration"
            },
            {
                "eventDate": "2019-09-09T15:39:04Z",
                "eventAction": "last changed"
            },
            {
                "eventDate": "2022-06-11T00:32:59Z",
                "eventAction": "last update of RDAP database"
            }
        ],
        "handle": "2138514_DOMAIN_COM-VRSN",
        "status": [
            "client delete prohibited",
            "client transfer prohibited",
            "client update prohibited",
            "server delete prohibited",
            "server transfer prohibited",
            "server update prohibited"
        ],
        "ldhName": "GOOGLE.COM",
        "notices": [
            {
                "links": [
                    {
                        "href": "https:\/\/www.verisign.com\/domain-names\/registration-data-access-protocol\/terms-service\/index.xhtml",
                        "type": "text\/html"
                    }
                ],
                "title": "Terms of Use",
                "description": [
                    "Service subject to Terms of Use."
                ]
            },
            {
                "links": [
                    {
                        "href": "https:\/\/icann.org\/epp",
                        "type": "text\/html"
                    }
                ],
                "title": "Status Codes",
                "description": [
                    "For more information on domain status codes, please visit https:\/\/icann.org\/epp"
                ]
            },
            {
                "links": [
                    {
                        "href": "https:\/\/icann.org\/wicf",
                        "type": "text\/html"
                    }
                ],
                "title": "RDDS Inaccuracy Complaint Form",
                "description": [
                    "URL of the ICANN RDDS Inaccuracy Complaint Form: https:\/\/icann.org\/wicf"
                ]
            }
        ],
        "entities": [
            {
                "roles": [
                    "registrar"
                ],
                "handle": "292",
                "entities": [
                    {
                        "roles": [
                            "abuse"
                        ],
                        "vcardArray": [
                            "vcard",
                            [
                                [
                                    "version",
                                    [],
                                    "text",
                                    "4.0"
                                ],
                                [
                                    "fn",
                                    [],
                                    "text",
                                    ""
                                ],
                                [
                                    "tel",
                                    {
                                        "type": "voice"
                                    },
                                    "uri",
                                    "tel:+1.2086851750"
                                ],
                                [
                                    "email",
                                    [],
                                    "text",
                                    "abusecomplaints@markmonitor.com"
                                ]
                            ]
                        ],
                        "objectClassName": "entity"
                    }
                ],
                "publicIds": [
                    {
                        "type": "IANA Registrar ID",
                        "identifier": "292"
                    }
                ],
                "vcardArray": [
                    "vcard",
                    [
                        [
                            "version",
                            [],
                            "text",
                            "4.0"
                        ],
                        [
                            "fn",
                            [],
                            "text",
                            "MarkMonitor Inc."
                        ]
                    ]
                ],
                "objectClassName": "entity"
            }
        ],
        "secureDNS": {
            "delegationSigned": false
        },
        "nameservers": [
            {
                "ldhName": "NS1.GOOGLE.COM",
                "objectClassName": "nameserver"
            },
            {
                "ldhName": "NS2.GOOGLE.COM",
                "objectClassName": "nameserver"
            },
            {
                "ldhName": "NS3.GOOGLE.COM",
                "objectClassName": "nameserver"
            },
            {
                "ldhName": "NS4.GOOGLE.COM",
                "objectClassName": "nameserver"
            }
        ],
        "objectClassName": "domain",
        "rdapConformance": [
            "rdap_level_0",
            "icann_rdap_technical_implementation_guide_0",
            "icann_rdap_response_profile_0"
        ]
    },
    "created_at": "2022-06-10 20:33:06"
}

Was this page helpful to you? Feel free to reach out via support@ohdear.app or on Twitter via @OhDearApp if you have any other questions. We'd love to help!