Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/?q=api&page=98&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=api

Returns an array of strings in format "username" or "username/projectName"

Found 11489 results for "api"(1967ms)

business_findermain.tsx4 matches

@run•Updated 1 week ago
11
12 // Aqui simulamos a busca de empresas baseada no endereço e tipo
13 // Em uma implementação real, você usaria uma API como Google Places ou similar
14 const empresas = await buscarEmpresas(endereco, tipo);
15
46
47// Função para simular a busca de empresas
48// Em uma implementação real, você usaria uma API como Google Places
49async function buscarEmpresas(endereco, tipo) {
50 // Simulação de dados para demonstração
51 // Em um ambiente real, você faria uma chamada para uma API externa
52
53 // Aguarda um pouco para simular o tempo de busca
643 geoButton.addEventListener('click', function() {
644 navigator.geolocation.getCurrentPosition(function(position) {
645 // Em um ambiente real, você usaria uma API de geocodificação reversa
646 // para converter coordenadas em endereço
647 enderecoInput.value = 'Localização atual';

mohitkingsprojectmain.tsx3 matches

@Mkv•Updated 1 week ago
92 async function fetchCurrencyRates() {
93 try {
94 const response = await fetch("https://open.exchangerate-api.com/v6/latest");
95 const data = await response.json();
96 setCurrencyRates(data.rates);
108 setLoading(true);
109 const response = await fetch(
110 "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=10&page=1&sparkline=false",
111 );
112 const data = await response.json();
152 try {
153 const response = await fetch(
154 `https://api.coingecko.com/api/v3/coins/${coinId}/market_chart?vs_currency=usd&days=${days}`,
155 );
156 const data = await response.json();

valProfilePageREADME.md4 matches

@dcm31•Updated 1 week ago
64- Hono (server-side)
65- Tailwind CSS (styling)
66- Uses the Charlie's User Search API for fetching user val data
67- Uses Val Town's profile picture proxy for user avatars
68
69## API Integration
70
71The app integrates with two main APIs:
72
731. Charlie's User Search API: `https://charliesusersearch.val.run/?user=USERNAME`
742. Val Town Profile Pic Proxy: `https://pic.val.run/USERNAME`
75

valProfilePageindex.ts3 matches

@dcm31•Updated 1 week ago
4const app = new Hono();
5
6// API endpoint to fetch user profile data
7app.get("/api/profile/:username", async (c) => {
8 const username = c.req.param("username");
9
10 try {
11 // Call the user search API
12 const response = await fetch(
13 `https://charliesusersearch.val.run/?user=${username}`

valProfilePageValGridItem.tsx1 match

@dcm31•Updated 1 week ago
84 const getImageUrl = () => {
85 // Priority order:
86 // 1. Val's image_url from API if available
87 // 2. moi.md imageUrl if available
88 // 3. Return null to use color placeholder

valProfilePageUserProfile.tsx1 match

@dcm31•Updated 1 week ago
64 // Fetch both user profile data and moi config in parallel
65 const [profileResponse, config] = await Promise.all([
66 fetch(`/api/profile/${username}?page=${currentPage}`),
67 fetchMoiConfig(`https://www.val.town/x/${username}/`)
68 ]);

valProfilePagemoiConfig.tsx1 match

@dcm31•Updated 1 week ago
117 }
118
119 // Fallback: Use Val Town profile pic API
120 return `https://pic.val.run/${username}`;
121}
vtProjectSearch

vtProjectSearchstyles.tsx4 matches

@dcm31•Updated 1 week ago
782}
783
784.api-info {
785 margin-top: 10px;
786}
787
788.api-info summary {
789 cursor: pointer;
790 color: var(--primary-color);
792}
793
794.api-docs {
795 background-color: var(--code-bg);
796 padding: 10px 15px;
801}
802
803.api-docs code {
804 display: inline-block;
805 background-color: white;
vtProjectSearch

vtProjectSearchcomponents.tsx8 matches

@dcm31•Updated 1 week ago
1063 <link rel="icon" href="https://fav.farm/👀" />
1064 <meta name="viewport" content="width=device-width, initial-scale=1" />
1065 <link rel="preconnect" href="https://fonts.googleapis.com" />
1066 <link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous" />
1067 <link
1068 href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap"
1069 rel="stylesheet"
1070 />
1080 <a href="https://val.town" className="valtown-link" style={{ marginLeft: "auto" }}>Return to Val Town</a>
1081 </h1>
1082 <div className="api-info">
1083 <details>
1084 <summary>API Access</summary>
1085 <div className="api-docs">
1086 <p>
1087 You can access search results via JSON API by adding <code>format=json</code> to your query:
1088 </p>
1089 {searchTerm
1241 <div className="search-examples">
1242 <a href="?q=fetch" className="example-link">fetch</a>
1243 <a href="?q=api" className="example-link">api</a>
1244 <a href="?q=database" className="example-link">database</a>
1245 <a href="?q=image" className="example-link">image</a>
1396 <div className="search-examples">
1397 <a href="?q=fetch" className="example-link">fetch</a>
1398 <a href="?q=api" className="example-link">api</a>
1399 <a href="?q=database" className="example-link">database</a>
1400 <a href="?q=image" className="example-link">image</a>

weatherDashboardmain.tsx1 match

@rishabhdamelay•Updated 1 week ago
11 try {
12 const response = await fetch(
13 `https://api.open-meteo.com/v1/forecast?latitude=${location.latitude}&longitude=${location.longitude}&current_weather=true&hourly=temperature_2m,relativehumidity_2m,windspeed_10m`
14 );
15 const data = await response.json();

gptApiTemplate2 file matches

@charmaine•Updated 4 hours ago

mod-interview-api1 file match

@twschiller•Updated 20 hours ago
mux
Your friendly, neighborhood video API.
api