Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 1.63 KB

File metadata and controls

54 lines (41 loc) · 1.63 KB

FSL API

مرور کلی

این API برای دریافت لیست اخبار از Hacker News و همچنین Scrape کردن متن مقالات استفاده می‌شود.
API در حال حاضر بر روی Render Service اجرا میشود. هر گونه تغییر از طریق همین Document اعلام خواهد شد.

Endpoints:

  • GET / → دریافت لینک آخرین اخبار از صفحه اصلی HackerNews
  • GET /scrape?url=<article_url> → دریافت متن کامل مقاله

Example Request:

curl -X GET https://fsl-api-fhk5.onrender.com/

Response:

{
  "urls": [
    "https://thehackernews.com/2025/08/russian-group-encrypthub-exploits-msc.html",
    "https://thehackernews.com/2025/08/microsoft-discloses-exchange-server.html",
    "https://thehackernews.com/2025/08/zero-trust-ai-privacy-in-age-of-agentic.html"
    ....
  ]
}

و بعد از انتخاب لینک مقاله میتوانید آن را Scrape کنید.

مسیر:

GET https://fsl-api-fhk5.onrender.com/scrape?url=FULL_LINK_HERE

نمونه:

Request:

GET https://fsl-api-fhk5.onrender.com/scrape?url=https://thehackernews.com/2025/08/russian-group-encrypthub-exploits-msc.html

Response:

{
  "content": "The employees in your organization can install ... ",
  "url": "https://thehackernews.com/2025/08/the-wild-west-of-shadow-it.html"
}

در کلید content متن کامل خبر برگردانده میشود. کلید url لینک وارد شده را مجددا بر میگرداند.