База отвечает на вопрос частного инвестора: где и как можно купить недвижимость за рубежом, насколько это место надёжно для денег и что меняется из-за его паспорта. На этой странице — что в базе есть, как к ней обращаться и форма, из которой запрос можно выполнить сразу.
The base answers a private investor's question: where and how property can be bought abroad, how safe the place is for the money, and what changes because of the investor's passport. This page says what the base holds, how to query it, and lets you run a request straight away.
Доступ только по ключу. Ключ выдаётся одному клиенту, выглядит как opc_… и передаётся в заголовке каждого запроса:
Authorization: Bearer opc_ваш_ключ
_meta и по запросу /usage.Access is by key only. A key is issued to one client, looks like opc_… and travels in the header of every request:
Authorization: Bearer opc_your_key
_meta and by the /usage request.| РазделSection | Что этоWhat it is | ЗапросRequest |
|---|---|---|
| Матрица сравненияComparison matrix | 86 стран и 112 мест внутри стран. По каждой строке 6 признаков надёжности (верховенство права, право собственности иностранца, валюта, расходы на покупку, налог с аренды, продажа и вывод денег) и 7 стратегий (долгая и посуточная аренда, покупка на стройке, ремонт и продажа, малая коммерция, ВНЖ за покупку, гражданство).86 countries and 112 places inside them. Each row has 6 safety signs (rule of law, foreign ownership, currency, buying costs, tax on rent, sale and taking money out) and 7 strategies (long and short let, off-plan, renovate and sell, small commercial, residency by purchase, citizenship). | /matrix |
| Места внутри странPlaces inside countries | Курортные острова, свободные зоны, столицы, города со своими правилами: Бали, Фукуок, Лангкави, Пхукет и другие.Resort islands, free zones, capitals, cities with their own rules: Bali, Phu Quoc, Langkawi, Phuket and others. | /directions |
| ПаспортаPassports | 21 страна аудитории: разрешено ли второе гражданство, надо ли уведомлять, въезд в ОАЭ, Шенген, Великобританию и США, запреты на покупку по гражданству, пути ко второму паспорту.21 audience countries: whether a second citizenship is allowed, reporting duties, entry to the UAE, Schengen, the UK and the USA, purchase bans by nationality, routes to a second passport. | /passports/{iso} |
| Программы ВНЖ и гражданстваResidence and citizenship programmes | 55 программ: порог через недвижимость, семья, статус, для каких паспортов закрыта.55 programmes: the property threshold, family, status, passports it is closed to. | /programmes |
| Ответ под профильAnswer for a profile | Один запрос на семью: её паспорта, открытые ей программы, ставки по вкладам и облигациям в её валюте, чего в базе не хватает.One request for a family: its passports, programmes open to it, deposit and bond rates in its currency, what the base lacks. | POST /ask |
| КалькуляторCalculator | Сделка против альтернативы дома: чистая приведённая стоимость, доходность до и после инфляции, срок возврата, рост цены, при котором объект сравняется с вкладом. Сейчас посчитан рынок Дубая.A deal against the alternative at home: net present value, return before and after inflation, payback, the price growth at which the property matches a deposit. Dubai is covered today. | POST /calc |
| Ряды для сравненияBenchmark series | Ставки по вкладам и гособлигациям, инфляция, курсы, индексы по валютам аудитории. Обновляются автоматически.Deposit and government bond rates, inflation, exchange rates, indices for the audience currencies. Updated automatically. | /benchmarks |
| Районы внутри местAreas inside places | ОАЭ: 188 районов в семи эмиратах, все подтверждены редактором. По Дубаю — данные земельного реестра по каждому району. Турция: 93 района, ждут подтверждения.UAE: 188 areas in seven emirates, all confirmed by an editor. For Dubai, land-registry data for every area. Türkiye: 93 areas awaiting confirmation. | /areas |
| Статистика страны и цифры местCountry statistics and place figures | Продажи жилья иностранцам в Турции по провинциям, районам и гражданству покупателей. Цифры места приходят и в /directions, поле figures.House sales to foreigners in Türkiye by province, district and buyer nationality. A place's own figures also come in /directions, field figures. | /market-stats |
| Застройщики и порталыDevelopers and portals | Каталог, который собирает ежедневный обход: застройщики новостроек с проектами и местные сайты объявлений. Сейчас 35 застройщиков и 137 сайтов объявлений в 22 странах; пополняется.A catalogue built by the daily crawl: developers of new builds with projects, and local listing sites. 35 developers and 137 listing sites in 22 countries today; it keeps growing. | /developers, /portals |
Каждое значение приходит вместе с тем, насколько ему можно верить. Не показывайте цифру без её отметки.
| Поле | Значения | Что означает |
|---|---|---|
tag | ✓ · В · П · ? | ✓ официальный источник; В вторичный источник, страницу которого открывали; П пересказ из поиска; ? не подтверждено |
level | good · ok · hard · closed · nodata | оценка клетки матрицы: «хорошо / да», «средне / с условиями», «слабо / трудно», «нельзя / нет», «нет данных». Ставится по правилам, они приходят в поле rules |
layer | fact · dataset · programme · seed · proposal | fact — утверждено редактором; dataset — посчитано по открытым данным по единому правилу; programme — из нашего каталога программ; seed — из наших справочников; proposal — собрано обходом, человек ещё не смотрел |
pending | true | клетка ждёт проверки редактором |
verdict | supported · partly · … | итог автоматической сверки с источником: подтверждает / подтверждает частично |
inherited | true | у места внутри страны своей клетки нет, взято общее правило страны |
src, source | адрес | страница, на которую опирается значение |
reviewed, status | для фактов о паспортах и программах: смотрел ли редактор и какого уровня источник | |
_meta | ваш ключ: сколько запросов сделано сегодня, лимит, какой слой данных вам открыт |
Коды стран — двухбуквенные (ISO 3166-1): TR, AE, RU. Места внутри страны — код страны, дефис и 2–3 знака: ID-BA (Бали), VN-PQC (Фукуок). Валюты — трёхбуквенные: USD, RUB.
Every value arrives with how far it can be trusted. Do not show a figure without its mark.
| Field | Values | Meaning |
|---|---|---|
tag | ✓ · В · П · ? | ✓ official source; В secondary source whose page was opened; П search retelling; ? not confirmed |
level | good · ok · hard · closed · nodata | the mark of a matrix cell: "strong / yes", "fair / with conditions", "weak / hard", "not possible / no", "no data". Set by rules, which come in the rules field |
layer | fact · dataset · programme · seed · proposal | fact — approved by an editor; dataset — computed from open data by one rule; programme — from our catalogue of programmes; seed — from our reference books; proposal — collected by the crawl, not yet read by a person |
pending | true | the cell awaits an editor's review |
verdict | supported · partly · … | result of the automatic check against the source |
inherited | true | a place inside a country has no cell of its own; the country-wide rule is used |
src, source | address | the page the value rests on |
reviewed, status | for passport and programme facts: whether an editor has read it and the level of its source | |
_meta | your key: calls made today, the limit, which layer of data is open to you |
Country codes are two letters (ISO 3166-1): TR, AE, RU. A place inside a country is the country code, a dash and 2–3 characters: ID-BA (Bali), VN-PQC (Phu Quoc). Currencies are three letters: USD, RUB.
Раскройте запрос, заполните поля и нажмите «Выполнить». Ниже появится ответ и готовая команда для вашего сервера.
Open a request, fill in the fields and press "Run". The answer and a ready command for your server appear below.
Здесь появится ответ базы.The answer of the base will appear here.
Так подключается любой свой сайт, кабинет или приложение, которое показывает данные базы посетителям.
браузер посетителя → ваш сервер (здесь лежит ключ) → https://api.onpoint.casa/api/v1
Интерфейс в браузере не обращается к базе напрямую. Ключ в коде страницы виден любому посетителю, и база намеренно не отвечает на прямые запросы из браузера с чужого сайта: такой запрос браузер заблокирует.
ONPOINT_KEY. Не в код и не в хранилище кода.GET /api/v1/usage с ключом должен вернуть код 200 и поле _meta с названием вашего ключа.| Экран интерфейса | Запрос к базе | Как часто обновлять |
|---|---|---|
| Таблица сравнения стран | GET /matrix | хранить у себя 1 час |
| Страница страны или места | GET /matrix/{код} | хранить 1 час |
| Список мест внутри страны | GET /directions?country=TR | хранить 1 сутки |
| Выбор паспорта, правила для него | GET /passports/{код}, GET /entry?passport=RU,IL | хранить 1 сутки |
| Программы ВНЖ и гражданства | GET /programmes | хранить 1 сутки |
| Анкета посетителя | POST /ask | на каждый ввод, не хранить |
| Расчёт сделки | POST /calc | на каждый расчёт, не хранить |
| Ставки и курсы для сравнения | GET /benchmarks, GET /benchmarks/{ключ} | хранить 1 сутки |
| Районы места: список, кто может владеть, цены по реестру | GET /areas?place=AE-DU | хранить 1 сутки |
| Кто и где покупает в стране | GET /market-stats?country=TR | хранить 1 сутки |
| График цен, аренды, себестоимости | GET /benchmarks?currency=AE, затем GET /benchmarks/{ключ} | хранить 1 сутки |
| Каталоги | GET /developers, GET /portals | хранить 1 сутки |
Хранить ответы у себя обязательно: у ключа есть минутный и суточный лимит, а матрица целиком меняется не чаще нескольких раз в день.
tag) и ссылку на источник (src).pending: true — с пометкой «ждёт проверки редактором». Если такие данные показывать нельзя, попросите ключ с доступом только к утверждённому: тогда непроверенное не приходит вовсе.level. Не вычисляйте её сами из текста.inputs_used с пометкой, какие не подтверждены.Retry-After, посетителю показать сохранённый ответ.curl -H "Authorization: Bearer $ONPOINT_KEY" "https://api.onpoint.casa/api/v1/matrix?country=TR,TH"
curl -X POST -H "Authorization: Bearer $ONPOINT_KEY" -H "Content-Type: application/json" \
-d '{"profile":{"passports":["RU"],"currency":"RUB"}}' "https://api.onpoint.casa/api/v1/ask"
Через этот вход нет записи в базу, приёма заявок и счётчиков посещений: их интерфейс ведёт у себя.
This is how any site, client area or app of yours that shows the base's data to visitors is connected.
visitor's browser → your server (the key lives here) → https://api.onpoint.casa/api/v1
The interface in the browser never calls the base directly. A key in page code is visible to every visitor, and the base deliberately does not answer direct browser requests from another site: the browser will block such a request.
ONPOINT_KEY. Not into code and not into a code repository.GET /api/v1/usage with the key must return 200 and a _meta field with the name of your key.| Screen | Request | How often to refresh |
|---|---|---|
| Country comparison table | GET /matrix | keep for 1 hour |
| Country or place page | GET /matrix/{code} | keep for 1 hour |
| Places inside a country | GET /directions?country=TR | keep for 1 day |
| Passport choice and its rules | GET /passports/{code}, GET /entry?passport=RU,IL | keep for 1 day |
| Residence and citizenship programmes | GET /programmes | keep for 1 day |
| Visitor's questionnaire | POST /ask | on every input, do not keep |
| Deal calculation | POST /calc | on every calculation, do not keep |
| Rates and exchange rates to compare | GET /benchmarks, GET /benchmarks/{key} | keep for 1 day |
| Areas of a place: the list, who may own, registry prices | GET /areas?place=AE-DU | keep for 1 day |
| Who buys in a country and where | GET /market-stats?country=TR | keep for 1 day |
| Chart of prices, rents, construction cost | GET /benchmarks?currency=AE, then GET /benchmarks/{key} | keep for 1 day |
| Catalogues | GET /developers, GET /portals | keep for 1 day |
Keeping answers on your side is required: a key has a per-minute and a daily limit, and the whole matrix changes a few times a day at most.
tag) and a link to the source (src).pending: true: labelled "awaiting an editor's review". If such data must not be shown, ask for a key limited to approved data: unreviewed material then does not arrive at all.level. Do not work it out from the text yourself.inputs_used, with those not confirmed marked.Retry-After header; show the visitor the kept answer.curl -H "Authorization: Bearer $ONPOINT_KEY" "https://api.onpoint.casa/api/v1/matrix?country=TR,TH"
curl -X POST -H "Authorization: Bearer $ONPOINT_KEY" -H "Content-Type: application/json" \
-d '{"profile":{"passports":["RU"],"currency":"RUB"}}' "https://api.onpoint.casa/api/v1/ask"
This door offers no writing to the base, no lead intake and no visit counters: the interface keeps those itself.
POST /ask с паспортами семьи и валютой сбережений — получите правила по паспортам, открытые программы и ставки дома.GET /matrix — возьмите строки нужных стран и наложите запреты из шага 1: поле purchase_restrictions у паспорта и доступность программ.GET /matrix?country=TR,TH,AE — вернутся и страны, и места внутри них. Сортируйте по числу клеток надёжности с level: good.
POST /calc с ценой, площадью, сроком и валютой инвестора. В ответе — доходность объекта, доходность альтернативы и рост цены, при котором они сравняются. В поле inputs_used перечислено, на каких параметрах стоит расчёт и какие из них не подтверждены.
GET /matrix/{код}, поле checked у клеток — дата, когда значение видели на странице источника. GET /developers?country= и /portals?country= — каталог обхода.
| Код | Что случилось | Что делать |
|---|---|---|
| 401 | нет ключа, ключ неизвестен или отозван | проверьте заголовок Authorization |
| 400 | не хватает параметра или он неверный | текст в поле error говорит, какого |
| 404 | такой строки, паспорта или ряда нет | посмотрите список в /matrix или /benchmarks |
| 429 | превышен лимит | подождите столько секунд, сколько указано в заголовке Retry-After |
| 500 | ошибка на нашей стороне | повторите позже; если повторяется — сообщите нам время запроса |
POST /ask with the family's passports and savings currency — you get passport rules, open programmes and home rates.GET /matrix — take the rows you need and apply the bans from step 1: the passport's purchase_restrictions field and programme availability.GET /matrix?country=TR,TH,AE returns both the countries and the places inside them. Sort by the number of safety cells with level: good.
POST /calc with price, area, horizon and the investor's currency. The answer holds the property's return, the alternative's return and the price growth at which they match. inputs_used lists the inputs behind the result and which of them are not confirmed.
GET /matrix/{code}, the checked field of a cell is the date the value was seen on its source page. GET /developers?country= and /portals?country= give the crawl catalogue.
| Code | What happened | What to do |
|---|---|---|
| 401 | no key, unknown or revoked key | check the Authorization header |
| 400 | a parameter is missing or wrong | the error field names it |
| 404 | no such row, passport or series | see the list in /matrix or /benchmarks |
| 429 | limit exceeded | wait the number of seconds in the Retry-After header |
| 500 | an error on our side | retry later; if it repeats, tell us the time of the request |