# Create backlinks

URL: https://docs.hanzo.ai/docs/openapi/seo/seobacklink

> Summarises who links to a target.

`POST /v1/seo/backlinks`

> [SEO →](https://docs.hanzo.ai/docs/openapi/seo) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                         |
| ------------- | --------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/seo/backlinks` |
| **Method**    | `POST`                                  |
| **Operation** | `seoBacklink`                           |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`  |

Summarises who links to a target.

It returns the authority score, how many links point at it and from how many
distinct sites, how many of those are broken, and how much of the profile reads
as spam. Distinct sites is the number to read: a thousand links from one domain
is one endorsement, and a profile that grew fast in links and not in domains is
usually a profile somebody bought.

The target can be a whole domain, a subdomain, or one page URL — the summary is
scoped to whatever is named. It is priced per request, so a domain with ten
million links costs the same as one with ten.

## Request

1 field, body `application/json` (required).

| Field    | In   | Type   | Required | Description                                           |
| -------- | ---- | ------ | -------- | ----------------------------------------------------- |
| `target` | body | string | —        | Target is a domain, a subdomain or a single page URL. |

## Response

| Status    | Body               | Meaning |
| --------- | ------------------ | ------- |
| `200`     | seo.seoBacklinkOut | ok      |
| `default` | problem-details    | refused |

`200` body — 9 fields.

| Field       | In   | Type            | Always | Description                                                                                                                           |
| ----------- | ---- | --------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| `backlinks` | body | integer (int64) | —      | Backlinks is how many links point at it.                                                                                              |
| `broken`    | body | integer (int64) | —      | Broken is how many of those links point at something that no longer answers.                                                          |
| `cost`      | body | string          | —      | Cost is what this call cost, in USD, as an exact decimal string.                                                                      |
| `domains`   | body | integer (int64) | —      | Domains is how many distinct sites those links come from — the number that matters, since a thousand links from one site is one site. |
| `firstSeen` | body | string          | —      | FirstSeen is when the upstream first saw a link to this target, RFC 3339.                                                             |
| `pages`     | body | integer (int64) | —      | Pages is how many distinct pages link in.                                                                                             |
| `rank`      | body | integer (int64) | —      | Rank is the upstream's authority score for the target, 0 to 1000.                                                                     |
| `spam`      | body | integer (int64) | —      | Spam is the share of the profile judged spam, 0 to 100.                                                                               |
| `target`    | body | string          | —      | Target is the target as the upstream resolved it.                                                                                     |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo seo backlinks
```

**SDK**

**.ts**

```ts
import { Configuration, SeoApi } from 'hanzoai';

const api = new SeoApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.seoBacklink({ target: "<target>" });
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import SeoApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = SeoApi(client).seo_backlink(target="<target>")
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.SeoAPI.SeoBacklink(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, seo_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = seo_api::seo_backlink(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.SeoApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new SeoApi(client).seoBacklink();
```

**HTTP**

```bash
curl -X POST https://api.hanzo.ai/v1/seo/backlinks \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "target": "<target>"
     }'
```

**MCP**

Tool `seo`, op `seoBacklink` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "seo",
         "arguments": {
           "op": "seoBacklink",
           "input": {
             "target": "<target>"
           }
         }
       }
     }'
```

---

[SEO API](https://docs.hanzo.ai/docs/openapi/seo) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
