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=925&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"(1512ms)

scrapeZillowAPIREADME.md1 match

@rochambeau314Updated 8 months ago
1Migrated from folder: group_house/scrapeZillowAPI

scrapeCraigslistAPIREADME.md1 match

@rochambeau314Updated 8 months ago
1Migrated from folder: group_house/scrapeCraigslistAPI

calculateTransitAPIREADME.md1 match

@rochambeau314Updated 8 months ago
1Migrated from folder: group_house/calculateTransitAPI

sunsetNYCalendarmain.tsx3 matches

@ejfoxUpdated 8 months ago
1// This approach uses the Sunset and Sunrise API to get sunset times for New York,
2// and creates a simple form to generate a calendar of events occurring before sunset.
3
107async function getSunsetTime(date: Date): Promise<Date> {
108 const formattedDate = `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`;
109 const response = await fetch(`https://api.sunrise-sunset.org/json?lat=40.7128&lng=-74.0060&date=${formattedDate}&formatted=0`);
110
111 if (!response.ok) {
116
117 if (!data.results || !data.results.sunset) {
118 throw new Error("Invalid response from sunset API");
119 }
120

redditSearchmain.tsx5 matches

@sarahxcUpdated 8 months ago
11interface RedditSearchOptions {
12 query: string;
13 apiKey?: string;
14}
15
17export async function redditSearch({
18 query,
19 apiKey = Deno.env.get("BROWSERBASE_API_KEY"),
20}: RedditSearchOptions): Promise<ThreadResult[]> {
21 if (!apiKey) {
22 throw new Error("BrowserBase API key is required");
23 }
24
25 const puppeteer = new PuppeteerDeno({ productName: "chrome" });
26 const browser = await puppeteer.connect({
27 browserWSEndpoint: `wss://connect.browserbase.com?apiKey=${apiKey}&enableProxy=true`,
28 ignoreHTTPSErrors: true,
29 });

slackScoutmain.tsx3 matches

@sarahxcUpdated 8 months ago
54 query: topic,
55 pages: 2,
56 apiKey: Deno.env.get("BROWSERBASE_API_KEY") ?? "",
57 });
58}
63 maxResults: 10,
64 daysBack: 1,
65 apiKey: Deno.env.get("TWITTER_BEARER_TOKEN") ?? "",
66 });
67}
98
99 if (!response.ok) {
100 throw new Error(`Slack API error: ${response.status} ${response.statusText}`);
101 }
102

digitalYellowRoadrunnermain.tsx1 match

@athyuttamreUpdated 8 months ago
9});
10
11const client = new OpenAI({ apiKey: Deno.env.get("OPENAI_API_KEY") });
12
13async function main() {

helloWorldREADME.md1 match

@campsiteUpdated 8 months ago
1This is a simple script to create a post on Campsite. Use it as a starting point for other scripts.
2
3Campsite API Documentation: https://campsite.com/docs

twitterSearchmain.tsx6 matches

@alexdphanUpdated 8 months ago
36 maxResults = 4,
37 daysBack = 1,
38 apiKey,
39}: {
40 query: string;
41 maxResults?: number;
42 daysBack?: number;
43 apiKey: string;
44}): Promise<Website[]> {
45 const startDate = new Date();
46 startDate.setDate(startDate.getDate() - daysBack);
47
48 // Ensure the query is properly formatted for the Twitter API
49 const formattedQuery = encodeURIComponent(`${query} -is:retweet lang:en`);
50
53 console.log(`Searching Twitter for query: "${query}", start date: ${startDate.toISOString()}`);
54 const res = await twitterJSON({
55 url: `https://api.twitter.com/2/tweets/search/recent?query=${formattedQuery}&${await searchParams(
56 {
57 start_time: startDate.toISOString(),
63 },
64 )}`,
65 bearerToken: apiKey,
66 });
67 if (res.errors) {
95 const authorResponse = await twitterUser({
96 id: tweet.author_id,
97 bearerToken: apiKey,
98 });
99 author = authorResponse.data;

githubPRAlertREADME.md1 match

@campsiteUpdated 8 months ago
1This val creates a GitHub webhook listener that posts pull request information to Campsite when a pull request is opened or closed.
2
3Campsite API docs: https://campsite.com/docs

vapi-minutes-db1 file match

@henrywilliamsUpdated 1 day 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