apiexamples
Browse
Pricing
Docs
Have a key?
Get All-Access — $19
Browse the library
182 production-ready snippets across 6 languages.
PROVIDERS
All providers
182
AI & ML · 38
Anthropic
4
AssemblyAI
2
Cohere
3
DeepSeek
2
ElevenLabs
3
Google Gemini
3
Groq
2
Hugging Face
2
Mistral AI
3
OpenAI
5
Perplexity
2
Pinecone
2
Replicate
3
xAI
2
PAYMENTS & COMMERCE · 24
DATABASE & BACKEND · 26
MESSAGING & SUPPORT · 21
EMAIL · 14
DEV TOOLS & FRAMEWORKS · 22
AUTH & IDENTITY · 6
MEDIA & SOCIAL · 12
ANALYTICS, MARKETING & PRODUCTIVITY · 19
LANGUAGES
TypeScript
175
Node
173
Python
166
Go
163
PHP
162
Ruby
164
182 snippets
Sort: Newest
MongoDB
TypeScript
Insert a Document
Insert a document into a MongoDB collection using the official driver.
const result = await collection.insertOne(newCustomer);
$19 · Pro
View →
MongoDB
TypeScript
Update a Document
Update a document in a MongoDB collection using the official driver.
const result = await subscribers.updateOne(filter, update);
$19 · Pro
View →
MongoDB
TypeScript
Query Documents
Query documents from a MongoDB collection with a filter using the official driver.
const cursor = orders.find(filter).sort({ createdAt: -1 }).limit(20);
$19 · Pro
View →
Firebase
TypeScript
Verify ID Token
Verify a Firebase Auth ID token on the backend.
const decodedToken = await getAuth().verifyIdToken(idToken);
$19 · Pro
View →
Notion
TypeScript
Query a Database
Query pages from a Notion database with a filter.
const response = await notion.dataSources.query({
$19 · Pro
View →
Discord
TypeScript
Slash Command Handler
Handle an incoming Discord slash command interaction.
if (interaction.type === InteractionType.APPLICATION_COMMAND) {
$19 · Pro
View →
Notion
TypeScript
Update Page Properties
Update a page's property values.
const updatedPage = await notion.pages.update({
$19 · Pro
View →
Firebase
TypeScript
Firestore: Query a Collection
Query documents from a Firestore collection with a filter.
.where("status", "==", "active")
$19 · Pro
View →
Notion
TypeScript
Create a Page
Create a new page in a Notion database.
const newTask = await notion.pages.create({
$19 · Pro
View →
Cloudflare
TypeScript
Workers KV: Read and Write
Read and write a key-value pair in Workers KV.
const storedValue = await writeAndReadKvValue("session:9f3a-user-locale", "en-US");
$19 · Pro
View →
Firebase
TypeScript
Firestore: Add a Document
Add a document to a Firestore collection.
const docRef = await customersRef.add({
$19 · Pro
View →
Discord
TypeScript
Verify Interaction Signature
Verify a Discord interaction request's Ed25519 signature.
const isVerified = nacl.sign.detached.verify(Buffer.from(timestamp + rawBody), Buffer.from(signature, "hex"), Buffer.from(DISCORD_PUBLIC_KEY, "hex"));
$19 · Pro
View →
Load more snippets (170 left)
Browse 1003+ API Integration Snippets | apiexamples