Api News

Api News

Connect your website to fresh articles from MIS RYOUM. Get a personal API key, browse categories, and import headlines, images, article content and source links using simple JSON endpoints.

Get Your API Key

Get your API key

Enter your website details. The key will be restricted to the website origin you provide for browser-based requests. Server-side integrations can use the same key securely from your server.

By generating a key, you agree to keep it private, respect copyright and attribution, and follow the hourly request limit.

API key usage and statistics

Check your key usage securely at any time. You can also bookmark the private statistics link provided when your key is created.

Available news categories

Only the categories selected by the source website administrator are listed here and available through your API key.

Agriculture

3 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3720&key=YOUR_API_KEY
Arts & Culture

17 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3738&key=YOUR_API_KEY
Automotive

1 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3733&key=YOUR_API_KEY
Banking

1 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3729&key=YOUR_API_KEY
Books & Literature

3 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3739&key=YOUR_API_KEY
Business

376 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=6&key=YOUR_API_KEY
Crime

78 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3723&key=YOUR_API_KEY
Cryptocurrency

1 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3725&key=YOUR_API_KEY
Economy

41 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3726&key=YOUR_API_KEY
Education

30 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=1293&key=YOUR_API_KEY
Energy

3 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3719&key=YOUR_API_KEY
Entertainment

264 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=11&key=YOUR_API_KEY
Environment

60 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3718&key=YOUR_API_KEY
Family & Parenting

3 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3736&key=YOUR_API_KEY
Fashion

0 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3734&key=YOUR_API_KEY
Financial Markets

18 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3728&key=YOUR_API_KEY
Food & Dining

16 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3730&key=YOUR_API_KEY
Gaming

3 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3740&key=YOUR_API_KEY
Health

123 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=10&key=YOUR_API_KEY
History

11 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3742&key=YOUR_API_KEY
Home & Living

0 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3735&key=YOUR_API_KEY
Latest News

52 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=2&key=YOUR_API_KEY
Lifestyle

71 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=14&key=YOUR_API_KEY
Money

11 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3724&key=YOUR_API_KEY
Natural Disasters

13 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3721&key=YOUR_API_KEY
News

415 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3&key=YOUR_API_KEY
Opinion & Analysis

55 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=13&key=YOUR_API_KEY
Pets & Animals

0 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3737&key=YOUR_API_KEY
Photography

0 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3741&key=YOUR_API_KEY
Politics

951 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=5&key=YOUR_API_KEY
Real Estate

5 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3727&key=YOUR_API_KEY
Science

55 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=9&key=YOUR_API_KEY
Sports

451 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=12&key=YOUR_API_KEY
Technology

230 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=8&key=YOUR_API_KEY
Travel

12 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3731&key=YOUR_API_KEY
Weather

34 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3732&key=YOUR_API_KEY
Wildlife

8 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=3722&key=YOUR_API_KEY
World News

3,781 published posts

Example requesthttps://misryoum.com/api-news/v1/posts?category=4&key=YOUR_API_KEY

What can you retrieve?

Website information

Website name, URL, description, language and API version.

Categories

Category ID, name, slug, description, article count and category URL.

Articles

Title, featured image, full article HTML, category, excerpt, source name, source URL and original article link.

API endpoints

Website

https://misryoum.com/api-news/v1/site

Categories

https://misryoum.com/api-news/v1/categories

Latest articles

https://misryoum.com/api-news/v1/posts

20 articles maximum for the general feed, or 8 articles maximum when category is selected.

Request options

ParameterDescriptionExample
keyAPI key (for simple browser GET requests)?key=YOUR_API_KEY
categoryCategory ID or slug. Limits the response to 8 articles.category=world
limitRequested number of articles, within the service limits.limit=10
pagePagination page.page=2

Use the clean API base URL shown above (without wp-json). Server integrations should send the key in the Authorization: Bearer YOUR_API_KEY or X-API-Key header. Browser examples use the key query parameter and are restricted to the registered website origin.

WordPress automatic news importer

Prefer automatic publishing instead of writing integration code? Install our companion WordPress plugin, enter your API URL and key, choose a source category, then select the sync schedule and whether imported articles should be saved as drafts or published automatically.

Download News API Importer

In WordPress, open Plugins → Add New → Upload Plugin, choose the ZIP, activate it, and configure campaigns and settings from the “News API Importer” menu.

Four ready-to-use integration scripts

Replace YOUR_SOURCE_DOMAIN and YOUR_API_KEY with your own values. Keep the key on your server whenever possible.

1. Simple HTML + JavaScript news widget
<div id="api-news-feed">Loading news...</div>
<script>
const API_BASE = "https://misryoum.com/api-news/v1";
const API_KEY = "YOUR_API_KEY";
const CATEGORY = ""; // Use a category ID or slug, or leave empty for all news.
const feed = document.getElementById("api-news-feed");
const params = new URLSearchParams({key: API_KEY, limit: CATEGORY ? 8 : 20});
if (CATEGORY) params.set("category", CATEGORY);

fetch(`${API_BASE}/posts?${params.toString()}`)
  .then(response => {
    if (!response.ok) throw new Error(`API error: ${response.status}`);
    return response.json();
  })
  .then(data => {
    feed.textContent = "";
    data.posts.forEach(post => {
      const article = document.createElement("article");
      article.style.margin = "0 0 24px";
      if (post.featured_image && /^https?:\/\//i.test(post.featured_image)) {
        const image = document.createElement("img");
        image.src = post.featured_image;
        image.alt = "";
        image.style.cssText = "width:100%;max-width:420px;height:auto";
        article.appendChild(image);
      }
      const heading = document.createElement("h2");
      const link = document.createElement("a");
      link.href = post.permalink;
      link.target = "_blank";
      link.rel = "noopener";
      link.textContent = post.title;
      heading.appendChild(link);
      article.appendChild(heading);
      const excerpt = document.createElement("p");
      excerpt.textContent = post.excerpt || "";
      article.appendChild(excerpt);
      const source = document.createElement("small");
      source.textContent = `Source: ${post.source_name || ""}`;
      article.appendChild(source);
      feed.appendChild(article);
    });
  })
  .catch(error => feed.textContent = error.message);
</script>

This is a browser-side example. The key is visible to visitors, so use it only with the registered website origin and revoke it if exposed.

2. Plain PHP server-side example
<?php
$apiBase = 'https://misryoum.com/api-news/v1';
$apiKey  = 'YOUR_API_KEY';
$url = $apiBase . '/posts?limit=20';

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 20,
    CURLOPT_HTTPHEADER => ['X-API-Key: ' . $apiKey],
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($status !== 200 || !$response) {
    throw new RuntimeException('News API request failed: ' . $status);
}
$data = json_decode($response, true);
foreach (($data['posts'] ?? []) as $post) {
    echo '<h2>' . htmlspecialchars($post['title'], ENT_QUOTES, 'UTF-8') . '</h2>';
    echo '<p>' . htmlspecialchars($post['excerpt'], ENT_QUOTES, 'UTF-8') . '</p>';
}
?>
3. WordPress shortcode example
add_shortcode('remote_news', function () {
    $api_url = 'https://misryoum.com/api-news/v1/posts?limit=20';
    $api_key = 'YOUR_API_KEY'; // Keep this in PHP, never in browser JavaScript.
    $response = wp_remote_get($api_url, [
        'timeout' => 20,
        'headers' => ['X-API-Key' => $api_key],
    ]);
    if (is_wp_error($response) || wp_remote_retrieve_response_code($response) !== 200) {
        return '<p>News feed is temporarily unavailable.</p>';
    }
    $data = json_decode(wp_remote_retrieve_body($response), true);
    $html = '<div class="remote-news">';
    foreach (($data['posts'] ?? []) as $post) {
        $html .= '<article><h3><a href="' . esc_url($post['permalink']) . '">' . esc_html($post['title']) . '</a></h3>';
        $html .= '<p>' . esc_html($post['excerpt']) . '</p></article>';
    }
    return $html . '</div>';
});
// Add [remote_news] to any WordPress page or post.
4. Node.js / server example
const API_BASE = "https://misryoum.com/api-news/v1";
const API_KEY = "YOUR_API_KEY";

async function loadNews() {
  const response = await fetch(`${API_BASE}/posts?limit=20`, {
    headers: { "X-API-Key": API_KEY }
  });
  if (!response.ok) throw new Error(`News API error: ${response.status}`);
  const data = await response.json();
  return data.posts;
}

loadNews()
  .then(posts => console.log(posts))
  .catch(console.error);

Usage, limits and attribution

  • Each API key has its own request counter and hourly limit.
  • The general feed returns up to 20 latest published posts per request.
  • A category feed returns up to 8 latest published posts per request.
  • Each article response includes the original source website and article URL, plus the custom attribution text configured by the website owner.
  • Do not remove source attribution or republish content unless you have the necessary rights or permission.
Back to top button