repo_description: 🔥 The open-source no-code platform for web scraping, crawling, search and AI data extraction • Turn websites into structured APIs in minutes 🔥 
repo_topics: agents api automation browser-automation crawler crawling data-extraction no-code nocode playwright robotic-process-automation rpa scraper self-hosted web-scraper web-scraping web-search webscraping
code: import { default as axios } from "axios";
  import { apiUrl } from "../apiConfig"
  
  export const getUserById = async (userId: string) => {
      try {
          const response = await axios.get(`${apiUrl}/auth/user/${userId}`);
          if (response.status === 200) {
              return response.data;
          } else {
              throw new Error(`Couldn't get user with id ${userId}`);
          }
      } catch (error: any) {
          console.error(error);
          return null;
      }
  }