C# SDK engine
Google Scholar
Google Scholar results by query, cited-by id, or cluster id with publication info, authors, resources and inline links.
C# пример
Вызов через XylopSearchClient
using Xylop.Api.Client;
var client = new XylopSearchClient(new HttpClient(), "YOUR_API_KEY");
using var response = await client.SearchJsonAsync(
XylopSearchEngines.GoogleScholar,
new Dictionary<string, string?>
{
["q"] = "machine learning",
["cites"] = "cites id",
["cluster"] = "cluster id",
["as_ylo"] = "2020",
["as_yhi"] = "2026",
});
Для типизированного режима используйте `SearchAsync<TResponse>` и response-модель из `Xylop.Logic.SerpApiResponses.*`, которая входит в пакет C# SDK.
Endpoint
HTTP контракт
- URL
https://api.xylop.ru/search- Engine
google_scholar- API key
- Передается SDK автоматически из настроек клиента.
Входные параметры
Параметры запроса
| Параметр | Тип | Обязателен | Значение | Описание |
|---|---|---|---|---|
api_key
SDK
|
string | Да | — | Ключ Xylop API. В C# SDK задается один раз в XylopSearchClientOptions.ApiKey или в конструкторе клиента. |
engine
SDK
|
string | Да |
google_scholar
|
Google Scholar engine. |
q
|
string | Нет | machine learning | Scholar search query. Required unless cites or cluster is provided. |
cites
|
string | Нет | cites id | Cited-by identifier. |
cluster
|
string | Нет | cluster id | Versions cluster identifier. |
as_ylo
|
number | Нет | 2020 | Lower publication year. |
as_yhi
|
number | Нет | 2026 | Upper publication year. |
hl
|
string | Нет |
en
|
Interface language. |
start
|
number | Нет | 0 | Pagination offset. |
num
|
number | Нет | 10 | Result count. |
Выходные параметры
Поля ответа
| Поле | Тип | Источник | Описание |
|---|---|---|---|
search_metadata |
object | пример ответа | Метаданные запроса: статус, идентификатор, время выполнения и служебная информация провайдера. |
search_parameters |
object | пример ответа | Нормализованные параметры, с которыми upstream-поиск выполнил запрос. |
organic_results |
array | пример ответа | Основные органические результаты выдачи: позиции, заголовки, ссылки и сниппеты. |
JSON
Пример ответа
{
"search_metadata": {
"status": "Success",
"google_scholar_url": "https://scholar.google.com/scholar?q=machine+learning"
},
"search_parameters": {
"engine": "google_scholar",
"q": "machine learning"
},
"organic_results": [
{
"position": 1,
"title": "A survey of machine learning",
"link": "https://example.com/paper",
"publication_info": {
"summary": "A Researcher - Journal, 2024",
"authors": [
{
"name": "A Researcher",
"author_id": "abc123"
}
]
},
"inline_links": {
"cited_by": {
"total": 128,
"cites_id": "1234567890"
}
}
}
]
}