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/image-url.jpg?q=api&page=1493&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 18047 results for "api"(1570ms)

2 const styles = `
3 <style>
4 @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
5 body {
6 background: linear-gradient(90deg, #f3ec78, #af4261);
10 <title>Crazy Wordle</title>
11 <style>
12 @import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');
13 body {
14 font-family: 'Pacifico', cursive;

VALLEREADME.md1 match

@pomdtr•Updated 10 months ago
1Fork it and authenticate with your Val Town API token as the password. Needs an `OPENAI_API_KEY` env var to be set.
2
3WARNING: pollutes your homepage with lots of temporary vals!!

VALLEmain.tsx3 matches

@pomdtr•Updated 10 months ago
24Make an HTTP val (other vals are currently not supported to run, even though we have examples for them).
25Start your response with a comment explaining how your approach will work, what libraries or
26API calls you will use, and any tradeoffs you're making. Then write the code in a consise way,
27the simplest way to achieve the goal, though you can add some inline comments to explain your
28reasoning (not for every line, but for major groups of lines). Don't use any environment variables
29unless strictly necessary, for example use APIs that don't require a key, prefer internal function
30imports (using esm.town), and prefer putting API keys as inline variables. Use built-in Deno
31functions where possible. Unless specified, don't add error handling,
32make sure that errors bubble up to the caller.
15 <meta name="viewport" content="width=device-width, initial-scale=1.0">
16 <title>Crazy Wordle</title>
17 <link href="https://fonts.googleapis.com/css?family=Creepster|Permanent+Marker&display=swap" rel="stylesheet">
18 <style>
19 body {
17 <title>Hello World</title>
18 <style>
19 @import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;700&display=swap');
20 body {
21 font-family: 'Raleway', sans-serif;
19 <title>Hello World</title>
20 <style>
21 @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600&display=swap');
22
23 body {
1// This HTTP val responds with "Hello, world!" in JSON format.
2// It leverages the Web API which provides Request and Response objects.
3// No external libraries or other dependencies are necessary.
4

hackerNewsRAGREADME.md2 matches

@cenktekin•Updated 10 months ago
1Find comments on HN (powered by [Algolia](https://hn.algolia.com/api)), extract content and return a streaming markdown summary (powered by [Substrate](https://substrate.run)).
2
3The RAG portion of this is 34 lines of Substrate code. Twitter thread walkthrough: https://x.com/vprtwn/status/1812844236401762513
4
5🪩 To fork, [sign up for Substrate](https://substrate.run/signin) to get your own API key and $50 free credits.

hackerNewsRAGmain.tsx3 matches

@cenktekin•Updated 10 months ago
5import { zodToJsonSchema } from "npm:zod-to-json-schema";
6
7const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });
8
9// search for HN comments using https://hn.algolia.com/api
10const query = "langchain";
11const searchResults = await hnSearch({
28 new ComputeJSON({
29 prompt: `Summarize this comment and how it relates to the topic: ${query}
30 Use "negative" sentiment for posts about API, abstraction, documentation, tutorial, general quality, slowness, or performance issues.
31 COMMENT: ${JSON.stringify(hit)}`,
32 json_schema: zodToJsonSchema(commentInfo),

Apiify11 file matches

@wolf•Updated 7 hours ago

dailyQuoteAPI

@Souky•Updated 2 days ago
Kapil01
apiv1