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%20%22Optional%20title%22?q=api&page=1568&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 18017 results for "api"(1324ms)

basicAuthmain.tsx1 match

@stevekrouse•Updated 1 year ago
19
20async function fetchUser(token: string): Promise<User> {
21 const resp = await fetch("https://api.val.town/v1/me", {
22 headers: {
23 Authorization: `Bearer ${token}`,

basicAuthREADME.md1 match

@stevekrouse•Updated 1 year ago
17```
18
19To authenticate, [paste an api token](https://www.val.town/settings/api) in the password prompt.
20
21Migrated from folder: Archive/basicAuth

setSFTidbytImagemain.tsx3 matches

@squarethecircle•Updated 1 year ago
6 key: string;
7}) {
8 const apiKey = process.env.sf_tidbyt_api_key;
9 const deviceId = process.env.sf_tidbyt_device_id;
10 const res = await fetch(
11 `https://api.tidbyt.com/v0/devices/${deviceId}/push`,
12 {
13 method: "POST",
14 headers: {
15 Authorization: `Bearer ${apiKey}`,
16 },
17 body: JSON.stringify({

untitled_amberBedbugmain.tsx1 match

@sreenandm•Updated 1 year ago
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();

gsheet_callREADME.md3 matches

@hiteshjoshi•Updated 1 year ago
1# gsheet_call
2Wrapper around Google Sheets API v4.
3
4## Parameters
6- sheet_id: Google Sheet ID
7- method: HTTP method to use
8- action: Full URL with `https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/` removed
9- data: HTTP request body
10
11## Requirements
12- a Google Cloud service account
13- the Google Sheets API v4 enabled in your Google Cloud project
14- the spreadsheet ID (provide it in the sheet_id parameter)
15

testmain.tsx1 match

@ccallaway93•Updated 1 year ago
1export async function test() {
2 const { default: axios } = await import("npm:axios");
3 const url = "http://207.244.232.58:8011/api/login";
4 const message = "testing";
5 const loginInfo = {

gpt3Examplemain.tsx2 matches

@ktodaz•Updated 1 year ago
2
3const gpt3Example = async () => {
4 const response = await fetch("https://api.openai.com/v1/completions", {
5 method: "POST",
6 headers: {
7 "Content-Type": "application/json",
8 "Authorization": "Bearer " + process.env.OPENAI_API_KEY, // Replace with your OpenAI API Key
9 },
10 body: JSON.stringify({

untitled_sapphireSlugmain.tsx2 matches

@lolocoo•Updated 1 year ago
1const googleSearchKey = "AIzaSyAY7rS9VJVEcS6196uOWXOx2mCq_cN2kXM";
2const googleCxId = "70c6ff0b41f6943a4";
3const baseurl = "https://www.googleapis.com/customsearch/v1";
4
5export default async function(req: Request): Promise<Response> {
14 try {
15 const data = await fetch(
16 `https://www.googleapis.com/customsearch/v1?q=${searchKey}&cx=70c6ff0b41f6943a4&key=AIzaSyAY7rS9VJVEcS6196uOWXOx2mCq_cN2kXM&c2coff=1&start=1&num=5&dateRestrict=m%5B1%5D`,
17 )
18 .then(response => response.json())

googlesearchmain.tsx2 matches

@lolocoo•Updated 1 year ago
5const googleCxId = "70c6ff0b41f6943a4";
6
7const baseurl = "https://www.googleapis.com/customsearch/v1";
8
9export const getGoogleSearch = async ({ searchKey }) => {
25
26 const getSearch = async (data) => {
27 const response = await fetch("https://api.openai.com/v1/completions", {
28 method: "GET",
29 body: JSON.stringify(data),

untitled_amberLeopardmain.tsx1 match

@stevekrouse•Updated 1 year ago
3export default async function(req: Request): Promise<Response> {
4 const plugin = await createPlugin(
5 "https://cdn.modsurfer.dylibso.com/api/v1/module/ec17c9afde08aa9e7fa857fe2c9cbb9206e3a3dbec98429ceebd3421de7070da.wasm",
6 { useWasi: false },
7 );

Apiify9 file matches

@wolf•Updated 17 mins ago

dailyQuoteAPI

@Souky•Updated 2 days ago
Kapil01
apiv1