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=63&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 14406 results for "api"(1701ms)

cartaporte102.tsx6 matches

@arequipe•Updated 3 days ago
1export default async function handler(req: Request): Promise<Response> {
2 const AIRTABLE_API_KEY = Deno.env.get("AIRTABLE_API_KEY")!;
3 const AIRTABLE_BASE_ID = Deno.env.get("AIRTABLE_BASE_ID")!;
4 const FACTURAMA_AUTH = Deno.env.get("FACTURAMA_AUTH")!;
11
12 const airtableHeaders = {
13 Authorization: `Bearer ${AIRTABLE_API_KEY}`,
14 "Content-Type": "application/json",
15 };
16
17 const fetchRecord = async () => {
18 const res = await fetch(`https://api.airtable.com/v0/${AIRTABLE_BASE_ID}/${VIAJES_TABLE}/${recordId}`, {
19 headers: airtableHeaders,
20 });
28 form.append("upload_preset", CLOUDINARY_UPLOAD_PRESET);
29
30 const res = await fetch(`https://api.cloudinary.com/v1_1/${CLOUDINARY_CLOUD_NAME}/upload`, {
31 method: "POST",
32 body: form,
42
43 const updateAirtable = async (xmlUrl: string, pdfUrl: string) => {
44 const res = await fetch(`https://api.airtable.com/v0/${AIRTABLE_BASE_ID}/${VIAJES_TABLE}/${recordId}`, {
45 method: "PATCH",
46 headers: airtableHeaders,
56
57 const fetchFromFacturama = async (id: string, type: "xml" | "pdf") => {
58 const url = `https://apisandbox.facturama.mx/api/Cfdi/${type}/issued/${id}`;
59 const res = await fetch(url, {
60 headers: {

cerebras_coder_qwen_3generate-code.ts1 match

@facundopri•Updated 3 days ago
16 };
17 } else {
18 const client = new Cerebras({ apiKey: Deno.env.get("CEREBRAS_API_KEY") });
19 const completion = await client.chat.completions.create({
20 messages: [
12 },
13 {
14 "prompt": "weather dashboard for nyc using open-meteo API for NYC with icons",
15 "title": "Weather App",
16 "code":

cerebras_coder_qwen_3README.md2 matches

@facundopri•Updated 3 days ago
8
91. Sign up for [Cerebras](https://cloud.cerebras.ai/)
102. Get a Cerebras API Key
113. Save it in your project env variable called `CEREBRAS_API_KEY`

cerebras_coder_qwen_3index.ts1 match

@facundopri•Updated 3 days ago
211 } catch (error) {
212 Toastify({
213 text: "We may have hit our Cerebras Usage limits. Try again later or fork this and use your own API key.",
214 position: "center",
215 duration: 3000,

cerebras_coder_qwen_3index.html3 matches

@facundopri•Updated 3 days ago
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>CerebrasCoder</title>
7 <link rel="preconnect" href="https://fonts.googleapis.com" />
8 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
9 <link
10 href="https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap"
11 rel="stylesheet"
12 />
21 <meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
22 <meta property="og:type" content="website">
23 <meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
24
25

Weatherindex.ts3 matches

@dcm31•Updated 3 days ago
1// Weather API endpoint using Open-Meteo
2export default async function(req: Request): Promise<Response> {
3 // Enable CORS
31 try {
32 // First, geocode the city name to get coordinates
33 const geocodeUrl = `https://geocoding-api.open-meteo.com/v1/search?name=${encodeURIComponent(city)}&count=1&language=en&format=json`;
34 const geocodeResponse = await fetch(geocodeUrl);
35 const geocodeData = await geocodeResponse.json();
52
53 // Fetch weather data using the coordinates
54 const weatherUrl = `https://api.open-meteo.com/v1/forecast?latitude=${latitude}&longitude=${longitude}&current=temperature_2m,relative_humidity_2m,apparent_temperature,precipitation,weather_code,wind_speed_10m,wind_direction_10m&daily=weather_code,temperature_2m_max,temperature_2m_min,precipitation_sum&timezone=auto&forecast_days=3`;
55
56 const weatherResponse = await fetch(weatherUrl);

WeatherREADME.md2 matches

@dcm31•Updated 3 days ago
12## Project Structure
13
14- `backend/index.ts` - HTTP endpoint that fetches weather data from Open-Meteo API
15- `frontend/index.html` - Main HTML page with the user interface
16- `frontend/app.js` - Frontend JavaScript for handling user interactions
25
26- TypeScript
27- Open-Meteo API (no API key required)
28- Tailwind CSS
29- Val Town platform

autonomous-valtools.tsx4 matches

@all•Updated 3 days ago
77 }),
78 execute: async ({ query }) => {
79 const apiKey = Deno.env.get("EXA_API_KEY");
80 const exa = new Exa(apiKey);
81 const result = await exa.searchAndContents(query, {
82 text: true,
100 }),
101 execute: async ({ url }) => {
102 const apiKey = Deno.env.get("EXA_API_KEY");
103 const exa = new Exa(apiKey);
104 const result = await exa.getContents([url], { text: true });
105 return {

autonomous-valREADME.md10 matches

@all•Updated 3 days ago
1# Autonomous Val
2This project demonstrates how to build autonomous agents on Val Town that can be triggered by API calls, cron jobs, etc.
3
4## Setup
6
7Configure the following variables in your environment:
8- `AGENT_API_KEY` (This is a secure token that you choose to secure the agent.tsx POST endpoint)
9- `OPENAI_API_KEY` (An OpenAI API Key)
10- `EXA_API_KEY` (Optional, though needed if you use the web search tool)
11
12## Usage
13Use `demo.tsx` to send objectives to your agent.
14
15### API Usage
16To use the API from another client, you can POST authenticated requests to the agent.tsx endpoint:
17
18```javascript
28 headers: {
29 "Content-Type": "application/json",
30 "Authorization": `Bearer ${Deno.env.get("AGENT_API_KEY")}`,
31 },
32 body: JSON.stringify(requestBody),
35
36### Streaming Chat
37The API will also work with streaming chat front ends based on the Vercel AI SDK's useChat hook.
38
39You just need to pass `streamResults: true` in your API POST request.
40
41## Using Other Models
45
46## Plug
47Are you a Senior Software Engineer who wants to work on AI or TypeScript? Feel free to DM me on the Val Town Discord to learn more about careers at AngelList. We're solving some of the hardest problems in Venture Capital and Private Markets and are always looking for great people to join us.

createemailapiv22 file matches

@souravvmishra•Updated 14 hours ago

waec_api6 file matches

@seyistry•Updated 20 hours ago
snartapi
mux
Your friendly, neighborhood video API.