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/$%7Bsuccess?q=api&page=1072&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 14812 results for "api"(2142ms)

mightyAmberAlbatrossmain.tsx1 match

@anniewong25•Updated 6 months ago
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();

dailyDadJokeREADME.md2 matches

@theswiftcoder•Updated 6 months ago
113. 🤣🤣🤣🤣
12
13## API
14
15This val uses the [icanhazdadjoke API](https://icanhazdadjoke.com/api). You can find [more docs here](https://github.com/15Dkatz/official_joke_api), such as how to [filter by type](https://github.com/15Dkatz/official_joke_api?tab=readme-ov-file#grab-jokes-by-type).

dailyDadJokemain.tsx1 match

@theswiftcoder•Updated 6 months ago
3
4export async function dailyDadJoke() {
5 let { setup, punchline } = await fetchJSON("https://official-joke-api.appspot.com/random_joke");
6 return email({
7 text: punchline,

sqlitemain.tsx4 matches

@markscrivo•Updated 6 months ago
1import { API_URL } from "https://esm.town/v/std/API_URL";
2import { LibsqlError, type ResultSet, type Row, type TransactionMode } from "npm:@libsql/client";
3import { z } from "npm:zod";
35
36async function execute(statement: InStatement, args?: InArgs): Promise<ResultSet> {
37 const res = await fetch(`${API_URL}/v1/sqlite/execute`, {
38 method: "POST",
39 headers: {
50
51async function batch(statements: InStatement[], mode?: TransactionMode): Promise<ResultSet[]> {
52 const res = await fetch(`${API_URL}/v1/sqlite/batch`, {
53 method: "POST",
54 headers: {
78
79/* Val Town's Turso Proxy returns rows as an array of values
80 * Yet the LibSQL API has a Row type which behave as an array or object,
81 * ie you can access it via numerical index or string
82 */

tfidf_analyser_90s_versionmain.tsx1 match

@mikehiggins•Updated 6 months ago
138 <meta name="viewport" content="width=device-width, initial-scale=1.0">
139 <title>Radical Text Analyser</title>
140 <link href="https://fonts.googleapis.com/css2?family=VT323&display=swap" rel="stylesheet">
141 <script src="https://cdnjs.cloudflare.com/ajax/libs/jqcloud/1.0.4/jqcloud-1.0.4.min.js"></script>
142 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqcloud/1.0.4/jqcloud.min.css">

twitterAlertREADME.md3 matches

@nick•Updated 6 months ago
4
5This val gets Twitter data via [SocialData](https://socialdata.tools) via
6@stevekrouse/socialDataProxy. Val Town Pro users can call this API
7100 times per day, so be sure not to set this cron to run more than once every 15 min.
8If you want to use it more, get your own [SocialData](https://socialdata.tools)
9API token and pay for it directly.
10
11## 1. Query
13Change the `query` variable for what you want to get notified for.
14
15You can use [Twitter's search operators](https://developer.twitter.com/en/docs/twitter-api/v1/rules-and-filtering/search-operators) to customize your query, for some collection of keywords, filtering out others, and much more!
16
17## 2. Notification

HermesTresmegistusREADME.md1 match

@jidun•Updated 6 months ago
25
26### Consciousness and the Cosmos
27Contemplate the nature of **consciousness** and its role in shaping reality. Explore theories of the universe as a **holographic projection** of consciousness itself and how this could provide a framework for magical manifestation and psychic abilities.
28
29

genuineBrownErminemain.tsx6 matches

@natsa•Updated 6 months ago
74 {
75 text: "Express.js",
76 description: "Domina Express.js para crear aplicaciones web y APIs de manera rápida y eficiente.",
77 completed: false
78 },
119 {
120 id: 5,
121 title: "APIs y Autenticación",
122 description: "Desarrolla APIs RESTful seguras, implementa autenticación y autorización usando las mejores prácticas de Node.js.",
123 completed: false,
124 subtopics: [
125 {
126 text: "Diseño de APIs RESTful",
127 description: "Aprende principios de diseño de APIs RESTful, buenas prácticas y patrones de arquitectura.",
128 completed: false
129 },
139 },
140 {
141 text: "Seguridad en APIs",
142 description: "Aprende técnicas de seguridad como validación de entrada, prevención de inyección, y manejo de CORS.",
143 completed: false

cekdatatruckmain.tsx8 matches

@nirwan•Updated 6 months ago
37 e.preventDefault();
38 try {
39 const response = await fetch("/api/vehicle", {
40 method: "POST",
41 headers: {
124
125 const fetchAllVehicles = async () => {
126 const response = await fetch("/api/all-vehicles");
127 const data = await response.json();
128 setVehicles(data);
235
236 const fetchVehicles = async (company) => {
237 const response = await fetch(`/api/vehicles?company=${company}`);
238 const data = await response.json();
239 setVehicles(data);
241
242 const fetchAllVehicles = async () => {
243 const response = await fetch("/api/all-vehicles");
244 const data = await response.json();
245 return data;
480 const path = url.pathname;
481
482 if (request.method === "POST" && path === "/api/vehicle") {
483 const body = await request.json();
484 await sqlite.execute(
506 }
507
508 if (path === "/api/vehicles") {
509 const company = url.searchParams.get("company");
510 const vehicles = await sqlite.execute(`SELECT * FROM ${KEY}_vehicles_${SCHEMA_VERSION} WHERE company = ?`, [
516 }
517
518 if (path === "/api/all-vehicles") {
519 const vehicles = await sqlite.execute(`SELECT * FROM ${KEY}_vehicles_${SCHEMA_VERSION}`);
520 return new Response(JSON.stringify(vehicles.rows), {
523 }
524
525 if (path.startsWith("/api/vehicle/")) {
526 const plateNumber = path.split("/").pop();
527 const vehicle = await sqlite.execute(`SELECT * FROM ${KEY}_vehicles_${SCHEMA_VERSION} WHERE plateNumber = ?`, [

qualityBrownTyrannosaurusmain.tsx1 match

@natsa•Updated 6 months ago
47 ],
48 projects: [
49 { text: "API REST básica", completed: false },
50 { text: "Servidor de archivos", completed: false },
51 { text: "Sistema de autenticación simple", completed: false },

token-server1 file match

@kwhinnery_openai•Updated 7 hours ago
Mint tokens to use with the OpenAI Realtime API for WebRTC

book-lookup-notion6 file matches

@nucky•Updated 20 hours ago
use google book api to look up bibliographic metadata elements
Kapil01
apiv1