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=1470&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 17431 results for "api"(1514ms)

aqiREADME.md1 match

@danilodiez•Updated 1 year 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

openAiHelloWorldmain.tsx1 match

@yawnxyz•Updated 1 year ago
1import { OpenAI } from "npm:openai";
2
3// Create a secret named OPENAI_API_KEY at https://www.val.town/settings/environment-variables
4
5const openai = new OpenAI();

insecureFetchREADME.md1 match

@vladimyr•Updated 1 year ago
8import { insecureFetch } from "https://esm.town/v/stevekrouse/insecureFetch";
9
10const url = "https://assignment-api.uspto.gov/patent/basicSearch?query=1234567&fields=main&rows=20";
11const data = await insecureFetch(url)
12const text = await data.text();

runGlifREADME.md3 matches

@jamiedubs•Updated 1 year ago
1glif API mini-SDK
2make generative magical AI things
3
4set your `GLIF_API_TOKEN` in your own ENV, or you'll hit rate limits: https://glif.app/settings/api-tokens
5
6call from your val like:
12```
13
14Migrated from folder: Glif_API/runGlif

dailyDadJokemain.tsx1 match

@natekid•Updated 1 year 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,

dailyDadJokeREADME.md2 matches

@natekid•Updated 1 year 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

@tomasholub•Updated 1 year 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,

dailyDadJokeREADME.md2 matches

@tomasholub•Updated 1 year 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).

counterscaleWeeklyReportmain.tsx4 matches

@benvinegar•Updated 1 year ago
25 // you need to declare these two environment variables:
26
27 // api key to access Counterscale Analytics Engine (see Counterscale README)
28 const apiKey = process.env.counterscaleCfApiKey;
29 // cf account id
30 const accountId = process.env.counterscaleCfAccountId;
31
32 const url = `https://api.cloudflare.com/client/v4/accounts/${accountId}/analytics_engine/sql`;
33
34 // query counts grouped by site over last 7 days
45 let result = await fetch(url, {
46 headers: {
47 "Authorization": `Bearer ${apiKey}`,
48 "Content-Type": "application/json",
49 },

claudemain.tsx1 match

@yawnxyz•Updated 1 year ago
1import Anthropic from "npm:@anthropic-ai/sdk";
2const anthropic = new Anthropic({
3 // apiKey: 'my_api_key', // defaults to process.env["ANTHROPIC_API_KEY"]
4});
5

RandomQuoteAPI

@Freelzy•Updated 11 hours ago

HAPI7 file matches

@dIgitalfulus•Updated 17 hours ago
Kapil01
apiv1