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=1380&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 15445 results for "api"(4407ms)

fetchGiphymain.tsx2 matches

@simply_say_m•Updated 1 year ago
2
3export const fetchGiphy = (async (searchTerm) => {
4 const { GiphyFetch } = await import("npm:@giphy/js-fetch-api");
5 const gf = new GiphyFetch(process.env.giphyApiKey);
6 const { data: gifs } = await gf.search(searchTerm, { limit: 10 });
7 return gifs;

myApimain.tsx1 match

@blackhaj•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

nameNationalitymain.tsx1 match

@feep•Updated 1 year ago
3// Predict the nationality of a name
4export let nameNationality = fetchJSON(
5 "https://api.nationalize.io/?name=michael"
6);

myApimain.tsx1 match

@cescyang•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

redirectmain.tsx1 match

@thomasatflexos•Updated 1 year ago
19 const token = process.env.OAUTH_CLIENT_ID + ":" +
20 process.env.OAUTH_CLIENT_SECRET;
21 const response = await fetch("https://api.notion.com/v1/oauth/token", {
22 method: "POST",
23 headers: {

githubReposmain.tsx1 match

@enzonotario•Updated 1 year ago
3// GitHub repos
4export let githubRepos = fetchJSON(
5 "https://api.github.com/users/stevekrouse/repos"
6);

aqimain.tsx1 match

@lavallee•Updated 1 year ago
4 let pm25 = (
5 await fetchJSON(
6 "https://api.openaq.org/v2/latest?" +
7 new URLSearchParams({
8 limit: "10",

FigmaFileObjectAsyncmain.tsx2 matches

@rodrigotello•Updated 1 year ago
4
5export const FigmaFileObjectAsync = (async () => {
6 const apiToken = process.env.myFigmaAPIToken;
7 const fileKey = FigmaURLJSONexample.key;
8 return fetchFigmaFile(apiToken, fileKey);
9})();

imBoredmain.tsx1 match

@valbee•Updated 1 year ago
4export const imBored = async () => {
5 return (boredActivities = fetchJSON(
6 "https://www.boredapi.com/api/activity"
7 ));
8};

githubFollowersmain.tsx1 match

@aviddabbler•Updated 1 year ago
3// GitHub followers
4export let githubFollowers = fetchJSON(
5 "https://api.github.com/users/stevekrouse/followers"
6);

HN-fetch-call2 file matches

@ImGqb•Updated 1 day ago
fetch HackerNews by API

token-server1 file match

@kwhinnery_openai•Updated 3 days ago
Mint tokens to use with the OpenAI Realtime API for WebRTC
Kapil01
apiv1