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/$%7Burl%7D?q=api&page=1394&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 17039 results for "api"(1312ms)

sqliteExplorerAppREADME.md1 match

@samwho•Updated 10 months ago
13## Authentication
14
15Login to your SQLite Explorer with [password authentication](https://www.val.town/v/pomdtr/password_auth) with your [Val Town API Token](https://www.val.town/settings/api) as the password.
16
17## Todos / Plans

valwriter_outputmain.tsx2 matches

@janpaul123•Updated 10 months ago
1// This approach fetches weather data for Brooklyn, NY from the Open Meteo API
2
3// It then parses the response to extract the current temperature
9
10 const response = await axios.get(
11 "https://api.open-meteo.com/v1/forecast?latitude=40.6782&longitude=-73.9442&hourly=temperature_2m&current_weather=true",
12 );
13

valTownChatGPT2README.md1 match

@janpaul123•Updated 10 months ago
1https://x.com/JanPaul123/status/1811801305066651997
2
3Fork it and authenticate with your Val Town API token as the password.
4
5Migrated from folder: IteratingGPT/valTownChatGPT2

citiesmain.tsx2 matches

@mxdvl•Updated 10 months ago
27 ].map(two_decimals).join(","),
28 language: "native",
29 key: Deno.env.get("OPENCAGE_API_KEY"),
30 });
31
32 const { results: [first] } = await fetch(`https://api.opencagedata.com/geocode/v1/json?${searchParams}`)
33 .then(response => response.json())
34 .then(json => parse(schema, json))

websimREADME.md1 match

@cofsana•Updated 10 months ago
1[WebSim](https://x.com/websim_ai) on Val with Substrate
2
3🪩 To fork, [sign up for Substrate](https://substrate.run/signin) to get your own API key and $50 free credits

websimmain.tsx1 match

@cofsana•Updated 10 months ago
2import { ComputeText, GenerateImage, sb, Substrate, UpscaleImage } from "npm:substrate";
3
4const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });
5
6export default async function render(req: Request): Promise<Response> {

notifymain.tsx1 match

@hlobil•Updated 10 months ago
17 }
18
19 const resp = await fetch("https://api.pushover.net/1/messages.json", {
20 headers: {
21 "Content-Type": "application/json",

sqlite_adminREADME.md1 match

@johnsmith•Updated 10 months ago
9To use it on your own Val Town SQLite database, [fork it](https://www.val.town/v/stevekrouse/sqlite_admin/fork) to your account.
10
11It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).

ReadmeWriterREADME.md2 matches

@willthereader•Updated 10 months ago
30```
31
32## API Reference
33
34### Class: ReadmeWriter
43
44- `model` (optional): The model to be used for generating the readme. Defaults to "gpt-3.5-turbo".
45- `apiKey` (optional): An OpenAI API key. Defaults to `Deno.env.get("OPENAI_API_KEY")`.
46
47#### Methods

ReadmeWritermain.tsx3 matches

@willthereader•Updated 10 months ago
6 model: string;
7 openai: OpenAI;
8 apiKey: string;
9 valtownKey: string;
10
32 private async getVal(username: string, valName: string) {
33 try {
34 const res = await fetch(`https://api.val.town/v1/alias/${username}/${valName}`, {
35 method: "GET",
36 headers: {
72 private async updateReadme(id: string, readme: string) {
73 try {
74 const res = await fetch(`https://api.val.town/v1/vals/${id}`, {
75 method: "PUT",
76 headers: {

HAPI7 file matches

@dIgitalfulus•Updated 27 mins ago

HAPI-01

@dIgitalfulus•Updated 34 mins ago
Kapil01
apiv1