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/$%7Bart_info.art.src%7D?q=api&page=924&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 12762 results for "api"(2649ms)

notionGetDatabasemain.tsx2 matches

@junhocaUpdated 8 months ago
4 filter?: any;
5}) => {
6 const { Client, collectPaginatedAPI } = await import(
7 "https://deno.land/x/notion_sdk/src/mod.ts"
8 );
9 const notion = new Client({ auth });
10 return collectPaginatedAPI(notion.databases.query, {
11 database_id: databaseId,
12 filter,

add_to_notion_w_aiREADME.md1 match

@junhocaUpdated 8 months ago
14Supports: checkbox, date, multi_select, number, rich_text, select, status, title, url, email
15
16- Uses `NOTION_API_KEY`, `OPENAI_API_KEY` stored in env variables and uses [Valtown blob storage](https://esm.town/v/std/blob) to store information about the database.
17- Use `get_notion_db_info` to use the stored blob if exists or create one, use `get_and_save_notion_db_info` to create a new blob (and replace an existing one if exists).

add_to_notion_w_aimain.tsx3 matches

@junhocaUpdated 8 months ago
6import { z } from "npm:zod";
7
8const NOTION_API_KEY = process.env.NOTION_API_KEY;
9const notion = new Client({
10 auth: NOTION_API_KEY,
11});
12
27
28const oai = new OpenAI({
29 apiKey: process.env.OPENAI_API_KEY ?? undefined,
30});
31

chatWithCerebrasmain.tsx2 matches

@lazyplatypusUpdated 8 months ago
44
45 try {
46 const response = await fetch("/api/chat", {
47 method: "POST",
48 headers: { "Content-Type": "application/json" },
137
138async function server(request: Request): Promise<Response> {
139 if (request.method === "POST" && new URL(request.url).pathname === "/api/chat") {
140 const { messages, model } = await request.json();
141 const client = new Cerebras();

printedWhiteToadmain.tsx2 matches

@lazyplatypusUpdated 8 months ago
40
41 try {
42 const response = await fetch("/api/chat", {
43 method: "POST",
44 headers: { "Content-Type": "application/json" },
134
135async function server(request: Request): Promise<Response> {
136 if (request.method === "POST" && new URL(request.url).pathname === "/api/chat") {
137 const { messages, model } = await request.json();
138 const client = new Cerebras();

blobAdminREADME.md1 match

@psimynUpdated 8 months ago
9[![](https://stevekrouse-button.express.val.run/Install)](https://www.val.town/v/stevekrouse/blob_admin_app/fork)
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).
12
13# TODO

honEmeraldSnailmain.tsx2 matches

@stevekrouseUpdated 8 months ago
104
105 try {
106 const response = await fetch("/api/chat", {
107 method: "POST",
108 headers: { "Content-Type": "application/json" },
209
210async function server(request: Request): Promise<Response> {
211 if (request.method === "POST" && new URL(request.url).pathname === "/api/chat") {
212 const { Anthropic } = await import("https://esm.sh/@anthropic-ai/sdk@0.17.1");
213 const { messages } = await request.json();

dailyDadJokeREADME.md2 matches

@rahulgUpdated 8 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

@rahulgUpdated 8 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,

aqiREADME.md1 match

@unicornUpdated 8 months ago
8
91. Click `Fork`
102. Change `location` (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via [nominatim's geocoder API](https://www.val.town/v/stevekrouse/nominatimSearch).
113. Click `Run`
12

vapi-minutes-db1 file match

@henrywilliamsUpdated 23 hours ago

vapi-minutes-db2 file matches

@henrywilliamsUpdated 1 day ago
papimark21
socialdata
Affordable & reliable alternative to Twitter API: ➡️ Access user profiles, tweets, followers & timeline data in real-time ➡️ Monitor profiles with nearly instant alerts for new tweets, follows & profile updates ➡️ Simple integration