databasestringobrigatório
Regional Semrush database, e.g. "us", "uk", "de".
https://api.sandbase.ai/v1/api/semrush/keyword-difficultyKeyword difficulty score (0-100) for a phrase in a regional Semrush database.
Sua saída aparecerá aqui
Preencha as entradas e clique em Executar.
Returns the Semrush keyword difficulty score for one phrase in one regional Semrush database. You send a phrase and a database code such as us. The response is a semicolon-separated text table with a header line and one data line.
us, uk and de databases to pick a market.curl -X POST "https://api.sandbase.ai/v1/api/semrush/keyword-difficulty" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phrase": "running shoes", "database": "us"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
database | string | Yes | Regional Semrush database, e.g. "us", "uk", "de". |
phrase | string | Yes | Keyword to analyze, e.g. "running shoes". |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
"Keyword;Keyword Difficulty Index\r\nrunning shoes;76"
| Field | Meaning |
|---|---|
[0][0] | Header of the first column. It labels the column that holds the phrase. |
[0][1] | Header of the second column. It labels the column that holds the difficulty score. |
[1][0] | The phrase you sent in the request, repeated in the data line. |
[1][1] | The keyword difficulty score for the phrase. The API description gives the range as 0 to 100. The example response returns 76. |
0 is the header, 1 is the data) and the second index is the column.\r\n and columns by ;. To read the score, split the text on \r\n, take the second line, split it on ;, and take the second value.phrase and database are required in the request schema, although the current README marks database as optional.Billed at the actual cost of each call, about $0.005 for the request above. Failed calls are not charged.
Comece a construir
Endpoint da API da plataforma com autenticação unificada e rastreamento de uso.
curl -X POST "https://api.sandbase.ai/v1/api/semrush/keyword-difficulty" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phrase": "running shoes",
"database": "us"
}'Defina sua chave da API SandBase no ambiente do seu servidor. As requisições usam autenticação Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Mantenha sua chave no servidor. Não a exponha em código do navegador.
databasestringobrigatórioRegional Semrush database, e.g. "us", "uk", "de".
phrasestringobrigatórioKeyword to analyze, e.g. "running shoes".
Resposta de exemplo salva para esta API; nenhuma requisição ao vivo é feita ao visualizá-la.
Nenhuma resposta salva foi publicada. Execute a API no Playground para inspecionar a resposta.
Explorar mais
| API | Preço | Resposta |
|---|---|---|
Semrush Keyword DifficultyEsta API Semrush | A partir de $0.005 por chamada | JSON |
Semrush | A partir de $0.08 por chamada | JSON |
Semrush | A partir de $0.08 por chamada | JSON |
Semrush | A partir de $0.08 por chamada | JSON |
Semrush | $0.004 por chamada | JSON |
Semrush | A partir de $0.04 por chamada | JSON |
Perguntas
Envie uma solicitação POST para https://api.sandbase.ai/v1/api/semrush/keyword-difficulty com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.
A partir de $0.005 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.
Obrigatórios: database (string) e phrase (string). A tabela de Parâmetros e o Playground nesta página listam todos os campos.
Uma resposta JSON retornada na mesma solicitação HTTP (síncrona). O README desta página inclui um exemplo de resposta.
Não. Semrush Keyword Difficulty funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do Semrush separadamente.