databasestringwymagane
Regional Semrush database, e.g. "us", "uk", "de".
https://api.sandbase.ai/v1/api/semrush/domain-vs-domainKeyword gap between domains: shared and unique keywords with each domain's ranking position.
Twój wynik pojawi się tutaj
Uzupełnij dane wejściowe, a następnie kliknij Uruchom.
Returns a keyword gap report for the domains you compare on a Semrush regional database. It needs a database code and a domains string in Semrush syntax. The response is semicolon-separated text with a header line and one line per keyword.
curl -X POST "https://api.sandbase.ai/v1/api/semrush/domain-vs-domain" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"database": "us", "domains": "*|or|nike.com|*|or|adidas.com"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
database | string | Yes | Regional Semrush database, e.g. "us", "uk", "de". |
domains | string | Yes | Domains to compare in Semrush syntax, e.g. "/or/nike.com//or/adidas.com". |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
"Keyword;nike.com\r\nsoccer;31\r\nrunning;7\r\nrunning shoes;1\r\nbasketball shoes;1\r\nsoc…"
| Field | Meaning |
|---|---|
[0] | The header line. It names each column, starting with Keyword, followed by one column per domain, such as nike.com. |
[] | One line per keyword. Split the text on \r\n to get the lines. |
[][0] | The search keyword for that line, such as running shoes. |
[][1] | The ranking position of the domain named in the second header column. For example, running shoes;1 means that domain ranks at position 1 for running shoes. |
\r\n for lines and on ; for columns. The paths above refer to the lines and columns after that split.domains value uses Semrush syntax. Each domain is written as *|or|domain.com, and the entries are joined with |. For example, *|or|nike.com|*|or|adidas.com.Billed at the actual cost of each call, about $0.16 for the request above. Failed calls are not charged.
Zacznij tworzyć
Punkt końcowy API platformy z jednolitym uwierzytelnianiem i śledzeniem użycia.
curl -X POST "https://api.sandbase.ai/v1/api/semrush/domain-vs-domain" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"domains": "*|or|nike.com|*|or|adidas.com",
"database": "us"
}'Ustaw klucz API SandBase w środowisku serwera. Żądania używają uwierzytelniania Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Przechowuj klucz na serwerze. Nie ujawniaj go w kodzie przeglądarkowym.
databasestringwymaganeRegional Semrush database, e.g. "us", "uk", "de".
domainsstringwymaganeDomains to compare in Semrush syntax, e.g. "*|or|nike.com|*|or|adidas.com".
Zapisany przykładowy response dla tego API; podczas wyświetlania nie jest wykonywane żadne żądanie na żywo.
Nie opublikowano zapisanego response. Uruchom API w Playground, aby sprawdzić jego odpowiedź.
Odkryj więcej
| API | Cena | Odpowiedź |
|---|---|---|
Semrush Domain vs DomainTo API Semrush | Od $0.16 za wywołanie | JSON |
Semrush | Od $0.08 za wywołanie | JSON |
Semrush | Od $0.08 za wywołanie | JSON |
Semrush | Od $0.08 za wywołanie | JSON |
Semrush | $0.004 za wywołanie | JSON |
Semrush | Od $0.04 za wywołanie | JSON |
Pytania
Wyślij żądanie POST do https://api.sandbase.ai/v1/api/semrush/domain-vs-domain z kluczem API SandBase w nagłówku Authorization (Bearer) oraz parametrami w treści JSON. Możesz też wypróbować je w Playground na tej stronie bez pisania kodu.
Od $0.16 za wywołanie, rozliczane z salda SandBase. Płacisz tylko za wykonane wywołania; nie ma subskrypcji.
Wymagane: database (string) i domains (string). Tabela Parameters oraz Playground na tej stronie zawierają wszystkie pola.
Odpowiedź JSON zwrócona w tym samym żądaniu HTTP (synchronicznie). README na tej stronie zawiera przykładową odpowiedź.
Nie. Semrush Domain vs Domain działa przez SandBase, więc jeden klucz API SandBase obejmuje ten endpoint i każde inne API oraz model w katalogu. Nie musisz osobno ubiegać się o dostęp do API Semrush.