NeuralBridge
Sign in Download IDE

Web & Search

Web search, answer with citations, page in markdown, site crawling, data extraction and news from RSS/Atom.

Answer with links

Endpoints

POSThttps://api.neuralbridge.ru/v1/answerprimary
Answer — Answer a question with sources: search, page reading and synthesis.

Request example

Models neuralbridge/web-answer-00527. For another model, insert its identifier from the table below.

python
import requests

response = requests.post(
    "https://api.neuralbridge.ru/v1/answer",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"query": "Почему небо голубое?"},
    timeout=180,  # поиск, чтение страниц и ответ модели занимают до минуты
)
response.raise_for_status()
result = response.json()
print(result["answer"])
print()
for source in result["sources"]:
    print(f'[{source["index"]}] {source["title"]} — {source["url"]}')

1 model

Web AnswerNeuralBridge
neuralbridge/web-answer-00527
An answer to a question based on fresh information from the internet, with links to sources: search, page reading and a short answer in one request.

Scraping

Endpoints

POSThttps://api.neuralbridge.ru/v1/scrapeprimary
Scrape — Extract readable content of a page by URL. With "include_tables": true the response also has the page tables (markdown, field tables); with "include_data": true — records from the data the site fills the page with by script (field data: path, total, columns, records).

Request example

Models neuralbridge/web-scrape-06195. For another model, insert its identifier from the table below.

python
import requests

response = requests.post(
    "https://api.neuralbridge.ru/v1/scrape",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    # PAGE_URL — полный адрес страницы, например из результатов поиска
    json={"url": "PAGE_URL", "include_tables": True},
    timeout=90,
)
response.raise_for_status()
page = response.json()
print(page["content"][:2000])  # начало текста страницы
for table in page.get("tables", []):
    print(table)

1 model

Web ScrapeNeuralBridge
neuralbridge/web-scrape-06195
Web page text by link: the main content without menus and ads in Markdown, optionally with the page tables and data.

Site crawling

Endpoints

POSThttps://api.neuralbridge.ru/v1/crawlprimary
Crawl — Crawl a site by links. Starts a job and returns its id.
GEThttps://api.neuralbridge.ru/v1/crawl/{job_id}
Crawl — job status — State and result of a previously started crawl.

Request example

Models neuralbridge/web-crawl-00527. For another model, insert its identifier from the table below.

python
import time
import requests

BASE = "https://api.neuralbridge.ru"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}

# Шаг 1: запустить обход. PAGE_URL — адрес стартовой страницы.
job = requests.post(f"{BASE}/v1/crawl", headers=HEADERS,
                    json={"seed_url": "PAGE_URL", "max_pages": 5}, timeout=30)
job.raise_for_status()
job_id = job.json()["id"]

# Шаг 2: спрашивать состояние раз в 5 секунд, пока обход не закончится.
while True:
    state = requests.get(f"{BASE}/v1/crawl/{job_id}", headers=HEADERS, timeout=30)
    state.raise_for_status()
    data = state.json()
    if data["status"] in ("done", "error"):
        break
    time.sleep(5)

if data["status"] == "error":
    print("Обход не удался:", data["error"])
else:
    for page in data["pages"]:
        print(page["url"], "—", page["title"])
        print(page["content"][:500])
        print()

1 model

Web CrawlNeuralBridge
neuralbridge/web-crawl-00527
Site crawl by links: collects the text of several pages starting from a start page. Runs in the background — start a job, then check when it is ready.

Data extraction

Endpoints

POSThttps://api.neuralbridge.ru/v1/extractprimary
Extract — Extract structured data from pages using a given schema. The model sees not only the text but also the page tables and data (lists of products, prices, coins); to turn off — "include_tables": false, "include_data": false.

Request example

Models neuralbridge/web-extract-00527. For another model, insert its identifier from the table below.

python
import json
import requests

response = requests.post(
    "https://api.neuralbridge.ru/v1/extract",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "url": "PAGE_URL",  # полный адрес страницы
        "schema": {
            "title": "название товара",
            "price": "цена числом, без валюты",
            "in_stock": "есть ли в наличии: true или false",
        },
    },
    timeout=180,  # большая страница читается до минуты
)
response.raise_for_status()
result = response.json()
print(json.dumps(result["data"], ensure_ascii=False, indent=2))

1 model

Web ExtractNeuralBridge
neuralbridge/web-extract-00527
The details you need from a page as ready JSON data: list the fields — a price, a date, a list of products — and a language model finds them on the page.

News

Endpoints

POSThttps://api.neuralbridge.ru/v1/newsprimary
News — News results filtered by language and freshness.

Parameters

The set depends on the model: on the right — how many models out of 1 accept the parameter. Default and allowed values on the model page.

limit1 of 1
Maximum number of items in the response.
lang1 of 1
Language of the news results.
time_range1 of 1
Freshness window: how far back to take material.

Request example

Models neuralbridge/web-news-09071. For another model, insert its identifier from the table below.

python
import requests

response = requests.post(
    "https://api.neuralbridge.ru/v1/news",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"query": "космос", "lang": "ru", "time_range": "day", "limit": 10},
    timeout=60,
)
response.raise_for_status()
for item in response.json()["data"]:
    print(item["published"], item["source"])
    print(item["title"])
    print(item["url"])
    print()

1 model

Web NewsNeuralBridge
neuralbridge/web-news-09071
Fresh news from a set of news feeds: title, summary, link, date and publisher, filtered by words, language, topic and period.