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=893&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 10997 results for "api"(1193ms)

myApimain.tsx1 match

@raymondcamden•Updated 1 year ago
1export function myApi(name, color = "blue") {
2 return `Hello ${name}, your favorite color is ${color}.`;
3}

myApimain.tsx1 match

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

githubEventsmain.tsx1 match

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

fetchWeatherPredictionmain.tsx3 matches

@jamiedubs•Updated 1 year ago
9 shortForecast: string;
10 }
11 interface WeatherApiResponse {
12 properties: {
13 periods: Forecast[];
21 // Fetch the points data to get the forecast endpoint
22 const pointsUrl: string =
23 `https://api.weather.gov/points/${latitude},${longitude}`;
24 console.log(pointsUrl);
25 const pointsResponse = await fetch(pointsUrl, {
33 headers: { "Accept": "application/geo+json" },
34 });
35 const forecastData: WeatherApiResponse = await forecastResponse.json();
36 console.log({ forecastData });
37 return forecastData.properties.periods;

myApimain.tsx1 match

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

getChatgptmain.tsx1 match

@bingo16•Updated 1 year ago
21
22 const getCompelitoins = async (data) => {
23 const response = await fetch("https://api.openai.com/v1/completions", {
24 method: "POST",
25 headers: {

randmain.tsx1 match

@envl•Updated 1 year ago
2
3export const rand = () =>
4 fetchText("http://numbersapi.com/random/math");

myApimain.tsx1 match

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

vibe_playground_uploadmain.tsx1 match

@ryanguill•Updated 1 year ago
39 </div>
40
41 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
42 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
43</body>

myApimain.tsx1 match

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

daily-advice-app1 file match

@dcm31•Updated 2 days ago
Random advice app using Advice Slip API

gptApiTemplate1 file match

@charmaine•Updated 3 days ago
apiv1
papimark21