> For the complete documentation index see https://domscan.net/llms.txt. Markdown versions of every docs page are available by appending .md to the page URL.

Source: https://domscan.net/pt/docs/scoring

# Pontuação de Domínio

API da DomScan: Calcule uma pontuação geral de qualidade de domínio com base em múltiplos fatores.

Calcule uma pontuação geral de qualidade de domínio com base em múltiplos fatores.

GET /v1/score

#### Parâmetros de consulta

| Parâmetro | Tipo | Descrição |
| --- | --- | --- |
| name obrigatório | string | Domínio para calcular pontuação |
| domain opcional | string | Alias para name. O parâmetro name prevalece quando ambos são fornecidos. Passe apenas o rótulo, sem TLD. |

#### Exemplo de resposta

```json
{
                "success": true,
                "data": {
                "name": "startup",
                "overall_score": 82,
                "grade": "B+",
                "scores": {
                "length": 86,
                "pronounceability": 78,
                "memorability": 80,
                "spelling": 84,
                "uniqueness": 75,
                "brandability": 88
                },
                "analysis": {
                "length": 7,
                "syllable_count": 2,
                "has_vowels": true,
                "has_numbers": false,
                "has_hyphens": false
                }
                },
                "meta": {
                "requestId": "req_demo"
                }
                }
```

#### Campos da resposta

| Campo | Tipo |
| --- | --- |
| `name` | string |
| `input` | string |
| `scored_label` | string |
| `tld` | string |
| `overall_score` | integer |
| `grade` | string |
| `scores` | object |
| `scores.length` | integer |
| `scores.pronounceability` | number |
| `scores.memorability` | integer |
| `scores.spelling` | integer |
| `scores.uniqueness` | integer |
| `scores.brandability` | integer |
| `score_explanation` | object |
| `score_explanation.score_band` | string |
| `score_explanation.top_strengths[]` | object[] |
| `score_explanation.top_strengths[]` | object |
| `score_explanation.top_strengths[].dimension` | string |
| `score_explanation.top_strengths[].score` | number |
| `score_explanation.top_strengths[].weight` | number |
| `score_explanation.top_blockers[]` | object[] |
| `score_explanation.top_blockers[]` | object |
| `score_explanation.top_blockers[].dimension` | string |
| `score_explanation.top_blockers[].score` | number |
| `score_explanation.top_blockers[].weight` | number |
| `score_explanation.weighted_dimensions` | object |
| `score_explanation.most_sensitive_dimension` | string |
| `score_explanation.points_to_next_grade` | integer \| null |
| `analysis` | object |
| `analysis.syllable_count` | integer |
| `analysis.character_count` | integer |
| `analysis.has_vowels` | boolean |
| `analysis.has_numbers` | boolean |
| `analysis.has_hyphens` | boolean |
| `analysis.is_dictionary_word` | boolean |
| `analysis.is_premium_word` | boolean |
| `analysis.is_too_generic` | boolean |
| `analysis.starts_with_vowel` | boolean |
| `analysis.ends_with_vowel` | boolean |
| `analysis.has_repeated_letters` | boolean |
| `analysis.vowel_ratio` | number |
| `recommendations[]` | string[] |
| `available_tlds[]` | string[] |
| `feedback[]` | string[] |
| `meta` | object |
| `meta.methodology` | string |
| `meta.disclaimer` | string |

POST /v1/score/compare Créditos: 2

#### Parâmetros de consulta

| Parâmetro | Tipo | obrigatório |
| --- | --- | --- |
| dry_run | string Valores permitidos `true` | opcional |

#### Parâmetros do corpo

| Parâmetro | Tipo | obrigatório |
| --- | --- | --- |
| names | string[] | obrigatório |

#### Campos da resposta

| Campo | Tipo |
| --- | --- |
| `names[]` | object[] |
| `names[]` | object |
| `best` | string \| null |
| `ranking[]` | object[] |
| `ranking[]` | object |
| `ranking[].name` | string |
| `ranking[].score` | number |
| `ranking[].rank` | integer |
| `decision_summary` | object |
| `decision_summary.compared_count` | integer |
| `decision_summary.best` | string \| null |
| `decision_summary.runner_up` | string \| null |
| `decision_summary.score_margin` | integer \| null |
| `decision_summary.score_spread` | integer |
| `decision_summary.tie_breaker` | string \| null |
| `decision_summary.winning_dimension` | string \| null |
| `meta` | object |
| `meta.total_compared` | integer |
| `meta.valid_scores` | integer |
| `meta.duplicates_removed` | integer |

#### Exemplo de requisição

```bash
curl -X POST "https://domscan.net/v1/score/compare" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $DOMSCAN_API_KEY" \
  -d '{
  "names": [
    "brandpilot",
    "launchly",
    "nimbus"
  ]
}'
```

```javascript
const response = await fetch("https://domscan.net/v1/score/compare", {
  method: "POST",
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY, "Content-Type": "application/json" },
  body: JSON.stringify({
    "names": [
      "brandpilot",
      "launchly",
      "nimbus"
    ]
  }),
});
const data = await response.json();
console.log(data);
```

```python
import os
import requests

response = requests.post(
    "https://domscan.net/v1/score/compare",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
    json={
        "names": [
            "brandpilot",
            "launchly",
            "nimbus",
        ],
    },
)
print(response.json())
```

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
	"strings"
)

func main() {
	body := strings.NewReader(`{
	  "names": [
	    "brandpilot",
	    "launchly",
	    "nimbus"
	  ]
	}`)
	req, err := http.NewRequest(http.MethodPost, "https://domscan.net/v1/score/compare", body)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))
	req.Header.Set("Content-Type", "application/json")

```ruby
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/score/compare")
request = Net::HTTP::Post.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")
request["Content-Type"] = "application/json"
request.body = JSON.generate({
  "names" => [
    "brandpilot",
    "launchly",
    "nimbus"
  ]
})

#### Exemplo de resposta

```json
{
  "names": [
    {
      "name": "brandify",
      "score": 88,
      "grade": "A",
      "verdict": "Strong"
    },
    {
      "name": "brandpilot",
      "score": 82,
      "grade": "B+",
      "verdict": "Promising"
    }
  ],
  "best": "brandify",
  "ranking": [
    {
      "name": "brandify",
      "score": 88,
      "rank": 1
    },
    {
      "name": "brandpilot",
      "score": 82,
      "rank": 2
    }
  ],
  "decision_summary": {
    "compared_count": 2,
    "best": "brandify",
    "runner_up": "brandpilot",
    "score_margin": 6,
    "score_spread": 6,
    "tie_breaker": "higher_brandability",
    "winning_dimension": "brandability"
  },
  "meta": {
    "total_compared": 2,
    "valid_scores": 2
  }
}
```

#### Códigos de status HTTP

- `200` OK
- `400` Pedido inválido
- `401` Não autorizado
- `402` Pagamento necessário
- `409` HTTP 409
- `422` HTTP 422
- `429` Demasiados pedidos

GET /v1/score/info Créditos: 0

#### Campos da resposta

| Campo | Tipo |
| --- | --- |
| `scoring_dimensions` | object |
| `grade_scale` | object |
| `endpoints` | object |

#### Exemplo de requisição

```bash
curl -H "X-API-Key: $DOMSCAN_API_KEY" "https://domscan.net/v1/score/info"
```

```javascript
const response = await fetch("https://domscan.net/v1/score/info", {
  headers: { "X-API-Key": process.env.DOMSCAN_API_KEY },
});
const data = await response.json();
console.log(data);
```

```python
import os
import requests

response = requests.get(
    "https://domscan.net/v1/score/info",
    headers={"X-API-Key": os.environ["DOMSCAN_API_KEY"]},
)
print(response.json())
```

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
)

func main() {
	req, err := http.NewRequest(http.MethodGet, "https://domscan.net/v1/score/info", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("X-API-Key", os.Getenv("DOMSCAN_API_KEY"))

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	data, err := io.ReadAll(resp.Body)
	if err != nil {
		panic(err)
	}
	fmt.Println(resp.Status, string(data))
}
```

```ruby
require "json"
require "net/http"

uri = URI("https://domscan.net/v1/score/info")
request = Net::HTTP::Get.new(uri)
request["X-API-Key"] = ENV.fetch("DOMSCAN_API_KEY")

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
  http.request(request)
end
puts JSON.pretty_generate(JSON.parse(response.body))
```

#### Exemplo de resposta

```json
{
  "scoring_dimensions": {
    "length": {
      "weight": 0.12,
      "description": "Rewards concise names"
    },
    "pronounceability": {
      "weight": 0.18,
      "description": "Rewards names that are easy to say"
    }
  },
  "grade_scale": {
    "A+": "Exceptional",
    "A": "Excellent",
    "B": "Good",
    "C": "Average",
    "D": "Weak",
    "F": "Poor"
  },
  "endpoints": {
    "GET /v1/score?name=<name>": "Score a single name",
    "POST /v1/score/compare": "Compare multiple names",
    "GET /v1/score/info": "Get scoring methodology"
  }
}
```

#### Códigos de status HTTP

- `200` OK
- `401` Não autorizado
- `429` Demasiados pedidos
