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=876&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 11003 results for "api"(1670ms)

fetchPinatsPostsmain.tsx2 matches

@stevedylandevUpdated 1 year ago
5 try {
6 const soRes = await fetch(
7 `https://api.stackexchange.com/2.3/questions?fromdate=${startDate}&todate=${endDate}&order=desc&sort=creation&tagged=pinata&site=stackoverflow`,
8 {
9 method: "GET",
24
25 const seRes = await fetch(
26 `https://api.stackexchange.com/2.3/questions?fromdate=${startDate}&todate=${endDate}&order=desc&sort=creation&tagged=pinata&site=ethereum`,
27 {
28 method: "GET",

crux_addmain.tsx2 matches

@yieldrayUpdated 1 year ago
1export async function crux_add(name: string, content: string) {
2 const res = await fetch("https://crux.land/api/add", {
3 method: "POST",
4 headers: { "content-type": "application/json" },
14 const json = await res.json();
15 if (json.error) throw new Error(json.error);
16 return `https://crux.land/api/get/${json.id}`;
17}

checkIosBingAppsmain.tsx1 match

@cescyang_serviceUpdated 1 year ago
6 const { default: axios } = await import("npm:axios");
7 const url =
8 "https://sapphire.api.microsoftapp.net/config/api/v1/get?setmkt=en-us&setplatform=android&setchannel=production&settenant=sapphire-bing";
9 try {
10 const response = await fetch(url, {
6 const { default: axios } = await import("npm:axios");
7 const url =
8 "https://sapphire.api.microsoftapp.net/config/api/v1/get?setmkt=en-us&setplatform=android&setchannel=production&settenant=sapphire-bing";
9 try {
10 const response = await fetch(url, {

untitled_emeraldChinchillamain.tsx1 match

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

getReplicatePredictionmain.tsx6 matches

@patrickjmUpdated 1 year ago
7export async function getReplicatePrediction({
8 /** https://replicate.com/account */
9 apiKey,
10 predictionId,
11}: {
12 apiKey: string;
13 predictionId: string;
14}) {
15 if (!apiKey) {
16 throw new Error("missing apiKey; visit https://replicate.com/account");
17 } else if (!predictionId) {
18 throw new Error("missing predictionId");
19 }
20 const result = await fetchJSON(
21 `https://api.replicate.com/v1/predictions/${encodeURIComponent(predictionId)}`,
22 {
23 headers: {
24 Authorization: `Token ${apiKey}`,
25 },
26 },

untitled_silverFowlmain.tsx1 match

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

memoryApiExampleREADME.md1 match

@xkontiUpdated 1 year ago
1Migrated from folder: GPTs/memoryApiExample

subaruREADME.md1 match

@seepUpdated 1 year ago
1An API for mysubaru.com to enable remote start and stop.
2
3Requires env vars (val.town secrets) named: `SUBARU_USERNAME, SUBARU_PASSWORD, SUBARU_DEVICEID, SUBARU_VEHICLEKEY, SUBARU_PIN`. The username, password, and PIN should match your mysubaru.com credentials. The device ID and vehicle key can be found by inspecting the request body of a login network request at mysubaru.com.

memoryApiPolicyREADME.md3 matches

@xkontiUpdated 1 year ago
1Returns a simple privacy policy for the GPT Memory API.
2
3Examples of input:
4- `apiName`: `Memory API`
5- `contactEmail`: `some@email.com`
6- `lastUpdated`: `2023-11-28`
7
8Migrated from folder: GPTs/memoryApiPolicy

daily-advice-app1 file match

@dcm31Updated 2 days ago
Random advice app using Advice Slip API

gptApiTemplate1 file match

@charmaineUpdated 3 days 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