# Website Contacts API Documentation

Reads the homepage and the best contact, imprint, about, team and support pages of a website (one level deep) and returns the emails, phone numbers and social profile links it publishes, each with the page and method that found it. Reads plain text, mailto and tel links, obfuscated emails like name [at] site [dot] com, Cloudflare protected emails, JSON-LD and microdata. Third-party emails are flagged with domain_match false. Nothing is guessed. Phone numbers with a country prefix are returned as +E.164, others as digits. Cost: 1 credit per page that was fetched (1 to 8 per request). Pages that fail, and robots, sitemap and security.txt reads, are free. A request that fetches no page returns 503 and costs nothing. Sites behind strict bot protection (for example booking.com) cannot be read.

- **Documentation:** [https://scrappa.co/docs/contacts-api/contacts_website](https://scrappa.co/docs/contacts-api/contacts_website)
- **API group:** Contacts API
- **Endpoint:** `GET https://scrappa.co/api/contacts/website`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `domain` | string | Yes | Website host or URL, for example example.com. Public hosts only. |
| `max_pages` | integer | No | Most pages to fetch, 1 to 8. Defaults to 5. Each fetched page costs 1 credit. |
| `match_email_domain` | boolean | No | Set to true to return only emails on the site's own domain. Defaults to false. |
| `include_external` | boolean | No | Set to true to also follow contact and imprint links to other domains, for example a parent company. Defaults to false. |

## Example response

```json
{
    "meta": {
        "credits": 2,
        "duration_ms": 3100,
        "pages_fetched": 2,
        "upstream_calls": 6
    },
    "pages": [
        {
            "url": "https://example.com/",
            "reason": null,
            "status": 200,
            "charged": true,
            "fetched": true
        },
        {
            "url": "https://example.com/contact",
            "reason": null,
            "status": 200,
            "charged": true,
            "fetched": true
        },
        {
            "url": "https://example.com/team",
            "reason": "status_404",
            "status": 404,
            "charged": false,
            "fetched": false
        }
    ],
    "domain": "example.com",
    "emails": [
        {
            "value": "hello@example.com",
            "sources": [
                {
                    "url": "https://example.com/contact",
                    "method": "mailto"
                }
            ],
            "domain_match": true
        }
    ],
    "phones": [
        {
            "raw": "+49 30 123456",
            "value": "+4930123456",
            "sources": [
                {
                    "url": "https://example.com/contact",
                    "method": "text"
                }
            ]
        }
    ],
    "socials": {
        "linkedin": [
            {
                "url": "https://www.linkedin.com/company/example",
                "handle": "example",
                "sources": [
                    {
                        "url": "https://example.com/",
                        "method": "link"
                    }
                ]
            }
        ]
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | Returned when a required parameter is missing or a value is out of range. No credits are charged. |
| 503 | Service Unavailable | Returned when no page could be fetched or the search returned no results. Failed requests are not charged. Try again. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
