Yes, you can update or call an API in real-time without periodic polling (e.g., setInterval) by using WebSockets, Server-Sent Events (SSE), or Webhooks. 
1. WebSockets
How it works: Establishes a persistent, bidirectional connection between the client and server. The server can push updates to the client instantly when data changes.
Use case: Real-time apps like chat, live notifications, or stock updates.
Implementation (React example):
import { useEffect } from 'react';
const RealTimeComponent = () => {
  useEffect(() => {
    const socket = new WebSocket('ws://your-api-endpoint');
    socket.onopen = () => console.log('Connected');
    socket.onmessage = (event) => {
      const data = JSON.parse(event.data);
      console.log('Real-time update:', data);
    };
    socket.onclose = () => console.log('Disconnected');
    return () => socket.close(); // Cleanup on unmount
  }, []);
  return <div>Real-time data here</div>;
};
export default RealTimeComponent;