سرویس مانیتور ایران رصدخونه، امکان دسترسی همگام به مقالات اندیشکده های جهان در ارتباط با مسائل ایران را فراهم می کند. در این راهنما نحوه احراز هویت و دسترسی به API سرویس مانیتور ایران تشریح شده است.
برای دسترسی به api سرویس مانیتور ایران، کاربر باید از API-KEY رصدخونه در زمان ارسال درخواست استفاده کند. این کلید باید به صورت X-API-KEY در request headers درج شود. برای دریافت API-KEY به لینک موجود در پایین همین صفحه رجوع کنید.
راهنمای دریافت پست های بخش مانیتور ایران
Endpoint: api/v1/crawlings
Method: GET
Authentication: Requires API key generated from Rasadkhone.
Parameters (Optional):
1. Pagination:
page (integer) – Page number for pagination (default: 1)
per_page (integer) – Number of posts per page (default: 20)
2. Sorting DESC(default)/ASC:
pub_date (default) - Publication date
creation_date - Post creation date
modified_date - Last modified date
Response: Returns a paginated JSON object containing post metadata including post ID, original and translated titles, publication date, featured image URL, author name, associated institutes, translated excerpt, and the full English content.
Example:
jsonCopy code GET rasad-api/v1/crawlings
Response:
{
"total": 123,
"per_page": 10,
"page": 1,
"total_pages": 13,
"posts": [
{
"id": 1,
"title": "Original Source Title",
"translated_title": "عنوان ترجمهشده",
"image": "https://rasadkhone.ir/wp-content/uploads/example.jpg",
"pub_date": "YYYY-MM-DDTHH:MM:SSZ",
"creation_date": "YYYY-MM-DDTHH:MM:SSZ",
"modified_date": "YYYY-MM-DDTHH:MM:SSZ",
"author": "Author Name",
"main_author": ["[author1]", "[author2]"],
"institute": "Institute Name",
"collection": ["Sample Collection"],
"categories": ["Politics", "Economy"],
"translated_excerpt": "محتوای ترجمهشده مقاله",
"content": "English content of the article",
"stripped_content": "Clean Content of the article"
},
...
]
}
برای تست سرویس API می توانید از cURL یا نرم افزار Postman استفاده کنید. فقط مطمئن شوید که API-Key در درخواست های headers برای احراز هویت قرار داده شود.
401-دسترسی غیر مجاز
rest_forbidden
API key is missing or invalid.
curl -X GET "https://rasadkhone.ir/api/v1/crawlings?page=1&per_page=10" \
-H "X-API-KEY: YOUR_API_KEY"