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=1434&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 17331 results for "api"(3101ms)

blob_adminREADME.md1 match

@vawogbemi•Updated 11 months ago
9[![](https://stevekrouse-button.express.val.run/Install)](https://www.val.town/v/stevekrouse/blob_admin_app/fork)
10
11It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).
12
13# TODO

readwiseHighlightsmain.tsx2 matches

@zerovox•Updated 11 months ago
11 queryParams.append("pageCursor", nextPageCursor);
12 }
13 console.log("Making export api request with params " + queryParams.toString());
14 const response = await fetch("https://readwise.io/api/v2/export/?" + queryParams.toString(), {
15 method: "GET",
16 headers: {

readwiseHighlightsREADME.md1 match

@zerovox•Updated 11 months ago
1https://readwise.io/api_deets
2
3Not sure how to convert from a reader ID (string) to a readwise ID (number)

readwiseReaderDocumentListmain.tsx2 matches

@zerovox•Updated 11 months ago
43 queryParams.append("location", location);
44 }
45 console.log("Making export api request with params " + queryParams.toString());
46 const response = await fetch("https://readwise.io/api/v3/list/?" + queryParams.toString(), {
47 method: "GET",
48 headers: {

readwiseReaderDocumentListREADME.md1 match

@zerovox•Updated 11 months ago
1Reader docs here: https://readwise.io/reader_api
2
3Adapted from the example code. Fetches items from Readwise Reader given a token, and optional updatedAfter and location parameters.

readwiseReaderReadItemsRssREADME.md2 matches

@zerovox•Updated 11 months ago
1Creates an RSS feed of my read items from Readwise Reader.
2
3Reader docs here: https://readwise.io/reader_api
4
5In order to get read items from Readwise Reader -> Workflowy, this turns the read items (aka "archive") into an RSS feed, which Zapier picks up, and creates bullets in Workflowy.
6
7Ideally would store the generated RSS or the last fetch date, and only get new items, but for now `readwiseReaderDocumentList` re-fetches the full history each time.

valTownChatGPTmain.tsx1 match

@simonw•Updated 11 months ago
3import { renderToString } from "npm:react-dom/server";
4
5// This uses by personal API key, you'll need to provide your own if
6// you fork this. We'll be adding support to the std/openai lib soon!
7const openai = new OpenAI();

fetchTodaysNytCxPuzzlemain.tsx2 matches

@plr•Updated 11 months ago
37 mini?: boolean;
38}): Promise<PuzzlesData> => {
39 // https://api.foracross.com/api/puzzle_list?page=0&pageSize=50&filter%5BnameOrTitleFilter%5D=ny%20times%20june%2019%202024&filter%5BsizeFilter%5D%5BMini%5D=true&filter%5BsizeFilter%5D%5BStandard%5D=true
40 const url = new URL("https://api.foracross.com/api/puzzle_list");
41 const search = new URLSearchParams();
42 search.set("page", `${page}`);

pipelinemain.tsx17 matches

@iamseeley•Updated 11 months ago
1const HUGGING_FACE_API_URL = "https://api-inference.huggingface.co/models";
2const HUGGING_FACE_API_KEY = Deno.env.get("HUGGING_FACE_API_KEY");
3
4const defaultModels = {
60
61 async featureExtraction(input, options) {
62 return this.callHuggingFaceAPI(input, options);
63 }
64
65 async textClassification(input, options) {
66 return this.callHuggingFaceAPI(input, options);
67 }
68
69 async tokenClassification(input, options) {
70 return this.callHuggingFaceAPI(input, options);
71 }
72
73 async questionAnswering(input, options) {
74 return this.callHuggingFaceAPI(input, options);
75 }
76
77 async summarization(input, options) {
78 return this.callHuggingFaceAPI(input, options);
79 }
80
81 async translation(input, options) {
82 return this.callHuggingFaceAPI(input, options);
83 }
84
85 async textGeneration(input, options) {
86 return this.callHuggingFaceAPI(input, options);
87 }
88
89 async sentenceSimilarity(input, options) {
90 return this.callHuggingFaceAPI(input, options);
91 }
92
93 async callHuggingFaceAPI(payload, options) {
94 try {
95 const response = await fetch(`${HUGGING_FACE_API_URL}/${this.model}`, {
96 method: "POST",
97 headers: {
98 "Authorization": `Bearer ${HUGGING_FACE_API_KEY}`,
99 "Content-Type": "application/json"
100 },
104 if (!response.ok) {
105 const error = await response.json();
106 console.error("Hugging Face API Error:", error);
107 return { error: `API request failed: ${error.error}` };
108 }
109
111 return data;
112 } catch (error) {
113 console.error("Error calling Hugging Face API:", error);
114 return { error: "Error calling Hugging Face API" };
115 }
116 }

verifyTokenmain.tsx1 match

@pomdtr•Updated 11 months ago
1async function fetchUser(token: string): Promise<{ id: string }> {
2 const resp = await fetch("https://api.val.town/v1/me", {
3 headers: {
4 Authorization: `Bearer ${token}`,

RandomQuoteAPI

@Freelzy•Updated 3 hours ago

HAPI7 file matches

@dIgitalfulus•Updated 8 hours ago
Kapil01
apiv1