All URIs are relative to https://open-api.divar.ir
| Method | HTTP request | Description |
|---|---|---|
| finder_get_post | GET /v1/open-platform/finder/post/{token} | دریافت آگهی دیوار |
| finder_get_user | POST /v1/open-platform/users | دریافت اطلاعات کاربر |
| finder_get_user2 | GET /v1/open-platform/users | دریافت اطلاعات کاربر |
| finder_get_user_idby_phone | POST /v1/open-platform/get-user-id-by-phone | دریافت شناسه کاربر دیوار با شماره تلفن |
| finder_get_user_posts | GET /v1/open-platform/finder/user-posts | دریافت آگهیهای کاربر |
| finder_search_post_v2 | POST /v2/open-platform/finder/post | جستجوی آگهیهای دیوار |
FinderGetPostResponse finder_get_post(token)
دریافت آگهی دیوار
این API امکان دریافت دادههای عمومی آگهی با توکن را فراهم میکند. جزئیات آگهی شامل دادههای دستهبندی، موقعیت، وضعیت، زمانها و اطلاعات کسبوکار برمیگردد.
نکات مهم:
- فقط دادههای عمومی آگهی برگردانده میشوند (فیلدهای خصوصی حذف میشوند)
- میتوان هر آگهی منتشر شدهای را دریافت کرد، محدود به آگهیهای خود کاربر نیست
GET_POST
- Api Key Authentication (APIKey):
import kenar_api_client
from kenar_api_client.models.finder_get_post_response import FinderGetPostResponse
from kenar_api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://open-api.divar.ir
# See configuration.py for a list of all supported configuration parameters.
configuration = kenar_api_client.Configuration(
host = "https://open-api.divar.ir"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Enter a context with an instance of the API client
with kenar_api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kenar_api_client.FinderApi(api_client)
token = 'token_example' # str |
try:
# دریافت آگهی دیوار
api_response = api_instance.finder_get_post(token)
print("The response of FinderApi->finder_get_post:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FinderApi->finder_get_post: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| token | str |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | پاسخ موفقیتآمیز. | - |
| 0 | پاسخ خطای غیرمنتظره. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FinderUser finder_get_user(body)
دریافت اطلاعات کاربر
این API اطلاعات کاربر احراز هویت شده را برمیگرداند. دادههای برگشتی به OAuth اسکوپهای اعطا شده بستگی دارد.
نکات مهم:
- با اسکوپ
USER_PHONE: شماره تلفن کاربر برمیگردد - با اسکوپ
USER_ID: شناسه مبهمشده کاربر برمیگردد (یکتا برای هر اپلیکیشن)
USER_RETRIEVE
USER_IDیاUSER_PHONE
- Api Key Authentication (APIKey):
- OAuth Authentication (OAuth):
import kenar_api_client
from kenar_api_client.models.finder_user import FinderUser
from kenar_api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://open-api.divar.ir
# See configuration.py for a list of all supported configuration parameters.
configuration = kenar_api_client.Configuration(
host = "https://open-api.divar.ir"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with kenar_api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kenar_api_client.FinderApi(api_client)
body = None # object |
try:
# دریافت اطلاعات کاربر
api_response = api_instance.finder_get_user(body)
print("The response of FinderApi->finder_get_user:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FinderApi->finder_get_user: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | object |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | پاسخ موفقیتآمیز. | - |
| 0 | پاسخ خطای غیرمنتظره. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FinderUser finder_get_user2()
دریافت اطلاعات کاربر
این API اطلاعات کاربر احراز هویت شده را برمیگرداند. دادههای برگشتی به OAuth اسکوپهای اعطا شده بستگی دارد.
نکات مهم:
- با اسکوپ
USER_PHONE: شماره تلفن کاربر برمیگردد - با اسکوپ
USER_ID: شناسه مبهمشده کاربر برمیگردد (یکتا برای هر اپلیکیشن)
USER_RETRIEVE
USER_IDیاUSER_PHONE
- Api Key Authentication (APIKey):
- OAuth Authentication (OAuth):
import kenar_api_client
from kenar_api_client.models.finder_user import FinderUser
from kenar_api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://open-api.divar.ir
# See configuration.py for a list of all supported configuration parameters.
configuration = kenar_api_client.Configuration(
host = "https://open-api.divar.ir"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with kenar_api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kenar_api_client.FinderApi(api_client)
try:
# دریافت اطلاعات کاربر
api_response = api_instance.finder_get_user2()
print("The response of FinderApi->finder_get_user2:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FinderApi->finder_get_user2: %s\n" % e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | پاسخ موفقیتآمیز. | - |
| 0 | پاسخ خطای غیرمنتظره. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FinderGetUserIDByPhoneResponse finder_get_user_idby_phone(finder_get_user_idby_phone_request)
دریافت شناسه کاربر دیوار با شماره تلفن
این API امکان پیدا کردن شناسه کاربر با شماره تلفن را میدهد. مناسب برای یکپارچهسازی با سیستمهای CRM یا پشتیبانی.
نکات مهم:
- شناسه مبهمشده برمیگردد (یکتا برای هر اپلیکیشن، نه شناسه واقعی کاربر دیوار)
GET_USER_ID_BY_PHONE
- Api Key Authentication (APIKey):
import kenar_api_client
from kenar_api_client.models.finder_get_user_idby_phone_request import FinderGetUserIDByPhoneRequest
from kenar_api_client.models.finder_get_user_idby_phone_response import FinderGetUserIDByPhoneResponse
from kenar_api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://open-api.divar.ir
# See configuration.py for a list of all supported configuration parameters.
configuration = kenar_api_client.Configuration(
host = "https://open-api.divar.ir"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Enter a context with an instance of the API client
with kenar_api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kenar_api_client.FinderApi(api_client)
finder_get_user_idby_phone_request = kenar_api_client.FinderGetUserIDByPhoneRequest() # FinderGetUserIDByPhoneRequest |
try:
# دریافت شناسه کاربر دیوار با شماره تلفن
api_response = api_instance.finder_get_user_idby_phone(finder_get_user_idby_phone_request)
print("The response of FinderApi->finder_get_user_idby_phone:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FinderApi->finder_get_user_idby_phone: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| finder_get_user_idby_phone_request | FinderGetUserIDByPhoneRequest |
FinderGetUserIDByPhoneResponse
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | پاسخ موفقیتآمیز. | - |
| 0 | پاسخ خطای غیرمنتظره. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FinderGetUserPostsResponse finder_get_user_posts()
دریافت آگهیهای کاربر
این API امکان دریافت لیست آگهیهای متعلق به کاربر احراز هویت شده را فراهم میکند. اطلاعات پایه شامل توکن، عنوان، تصاویر، دستهبندی و وضعیت نمایش شماره تلفن برمیگردد.
نکات مهم:
- فقط آگهیهای متعلق به کاربر احراز هویت شده برگردانده میشوند
- آگهیها در وضعیتهای مختلف برگردانده میشوند: منتشر شده، در انتظار پرداخت، در انتظار بررسی یا نیازمند اصلاح
GET_USER_POSTS
USER_POSTS_GET
- Api Key Authentication (APIKey):
- OAuth Authentication (OAuth):
import kenar_api_client
from kenar_api_client.models.finder_get_user_posts_response import FinderGetUserPostsResponse
from kenar_api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://open-api.divar.ir
# See configuration.py for a list of all supported configuration parameters.
configuration = kenar_api_client.Configuration(
host = "https://open-api.divar.ir"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
configuration.access_token = os.environ["ACCESS_TOKEN"]
# Enter a context with an instance of the API client
with kenar_api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kenar_api_client.FinderApi(api_client)
try:
# دریافت آگهیهای کاربر
api_response = api_instance.finder_get_user_posts()
print("The response of FinderApi->finder_get_user_posts:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FinderApi->finder_get_user_posts: %s\n" % e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | پاسخ موفقیتآمیز. | - |
| 0 | پاسخ خطای غیرمنتظره. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FinderSearchPostV2Response finder_search_post_v2(finder_search_posts_v2_request)
جستجوی آگهیهای دیوار
این API امکان جستجوی آگهیهای منتشر شده دیوار با فیلتر را فراهم میکند. میتوانید بر اساس دستهبندی، شهر، محله و فیلدهای ویژه دستهبندی مانند محدوده قیمت، متراژ، تعداد اتاق و سال تولید فیلتر کنید.
نکات مهم:
- آگهیها بر اساس زمان آخرین تغییر مرتب میشوند
- فقط آگهیهای منتشر شده برگردانده میشوند
SEARCH_POST
- Api Key Authentication (APIKey):
import kenar_api_client
from kenar_api_client.models.finder_search_post_v2_response import FinderSearchPostV2Response
from kenar_api_client.models.finder_search_posts_v2_request import FinderSearchPostsV2Request
from kenar_api_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://open-api.divar.ir
# See configuration.py for a list of all supported configuration parameters.
configuration = kenar_api_client.Configuration(
host = "https://open-api.divar.ir"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: APIKey
configuration.api_key['APIKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['APIKey'] = 'Bearer'
# Enter a context with an instance of the API client
with kenar_api_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = kenar_api_client.FinderApi(api_client)
finder_search_posts_v2_request = kenar_api_client.FinderSearchPostsV2Request() # FinderSearchPostsV2Request |
try:
# جستجوی آگهیهای دیوار
api_response = api_instance.finder_search_post_v2(finder_search_posts_v2_request)
print("The response of FinderApi->finder_search_post_v2:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FinderApi->finder_search_post_v2: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| finder_search_posts_v2_request | FinderSearchPostsV2Request |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | پاسخ موفقیتآمیز. | - |
| 0 | پاسخ خطای غیرمنتظره. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]