Skip to content

10 Useful APIs for Your Next Project (2026)

DodaTech Updated 2026-06-23 20 min read

The difference between a toy project and a shippable product is often a few well-chosen API integrations. The right API handles payments, messaging, maps, authentication, and data enrichment without writing thousands of lines of code. This guide covers 10 APIs that solve real problems developers encounter when building applications — each one with generous free tiers, solid documentation, and libraries for every major language.

In this guide, you will learn what each API does, how to integrate it with minimal code, and the specific problems it solves. Every entry includes a realistic use case, code examples in JavaScript or Python, and the limits of the free tier. By the end, you will have a toolbox of API integrations that can turn a demo into a production-ready application.

Stripe API

Stripe handles online payments, subscriptions, invoices, and marketplace payouts. Its API abstracts PCI compliance, card network rules, and fraud detection behind clean endpoints.

The core payment flow uses Payment Intents and Checkout Sessions. A Checkout Session creates a hosted payment page that handles card entry, Apple Pay, and Google Pay without you writing form HTML. Stripe returns a confirmation webhook when payment succeeds. The API also supports recurring subscriptions via the Products and Prices API with automatic proration and dunning.

const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY);

// Create a Checkout Session for a one-time payment
const session = await stripe.checkout.sessions.create({
  line_items: [
    {
      price: 'price_12345',  // Create prices in Stripe dashboard or via API
      quantity: 1,
    },
  ],
  mode: 'payment',
  success_url: 'https://example.com/success?session_id={CHECKOUT_SESSION_ID}',
  cancel_url: 'https://example.com/cancel',
});

// Redirect user to session.url
console.log(session.url);

The Webhook API notifies your server about events: payment succeeded, payment failed, subscription renewed, invoice paid. You register a webhook endpoint URL, and Stripe sends POST requests with event data. The Integration Testing mode provides test card numbers (4242 4242 4242 4242 for success, 4000 0000 0000 0002 for decline) so you can simulate every payment scenario.

Why it matters: Stripe eliminates the most complex part of building a product — handling money. Implementing payments from scratch requires PCI compliance, card storage encryption, bank integration, and fraud detection. Stripe handles all of it at 2.9 percent + $0.30 per transaction with no monthly fees.

Twilio API

Twilio provides communication APIs for SMS, voice, video, email (SendGrid), and webhook-based phone number management.

The SMS API sends messages globally with a single POST request. The Verify API implements phone-based two-factor authentication with one-time passcode templates. The Phone Numbers API provisions local, national, mobile, and toll-free numbers in 100-plus countries.

from twilio.rest import Client

# Initialize client with credentials from Twilio console
client = Client(account_sid, auth_token)

# Send an SMS
message = client.messages.create(
    body="Your verification code is 842916",
    from_='+15551234567',
    to='+15559876543'
)
print(f"Message sent: {message.sid}")

The Verify API provides a simpler pattern for authentication: create a verification service, send the code via SMS or voice, and check the code. Twilio handles Code Generation, rate limiting, and retry logic. The service includes automatic detection of phone type (mobile vs. landline) and spam likelihood.

Why it matters: SMS has 90+ percent open rates within 3 minutes, making it the most reliable user communication channel. Twilio abstracts carrier integrations, regulatory requirements (TCPA compliance), and global number provisioning. The free trial provides $15 of credit.

GitHub API

The GitHub REST and GraphQL APIs give programmatic access to repositories, issues, pull requests, actions, and user data.

The Issues API automates issue management: creating, labeling, assigning, and closing issues from CI/CD pipelines. The Pull Requests API integrates with deployment workflows by updating status checks and requesting reviews. The GraphQL endpoint (v4) fetches complex related data in a single query.

# List open issues labeled "bug"
curl -H "Authorization: token ghp_xxxxxxxxxxxx" \
  "https://api.github.com/repos/owner/repo/issues?labels=bug&state=open"

# Create a new issue
curl -X POST \
  -H "Authorization: token ghp_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"title": "Login page crashes on Edge","labels": ["bug","high-priority"]}' \
  "https://api.github.com/repos/owner/repo/issues"

The GraphQL API is preferred for complex queries. A single query can fetch all open issues with their labels, assignees, and comment counts — something the REST API requires multiple requests for. The rate limits are 5,000 requests per hour for authenticated users (REST) and 5,000 points per hour for GraphQL.

Why it matters: The GitHub API is essential for workflow automation: release scripts, changelog generation from PR descriptions, automatic issue labeling, and deployment status updates. For teams using TypeScript, the Octokit SDK provides typed clients with pagination and retry handling built in.

OpenWeather API

OpenWeather provides current weather, forecasts, historical data, and air pollution information for any location worldwide.

The One Call API returns current conditions, minute-by-minute forecasts for 1 hour, hourly forecasts for 48 hours, daily forecasts for 7 days, and air pollution data — all in one request. The data includes temperature (in Kelvin by default, specify units=imperial or metric), humidity, wind speed and direction, UV index, visibility, and weather condition codes.

import requests

response = requests.get(
    'https://api.openweathermap.org/data/3.0/onecall',
    params={
        'lat': 40.7128,
        'lon': -74.0060,
        'appid': API_KEY,
        'units': 'imperial',
        'exclude': 'minutely,hourly'  # exclude unneeded data
    }
)
data = response.json()

print(f"Current temperature: {data['current']['temp']}F")
print(f"Conditions: {data['current']['weather'][0]['description']}")
print(f"UV Index: {data['current']['uvi']}")

The free tier allows 1,000 API calls per day. For a weather dashboard, caching responses for 10-30 minutes reduces call volume significantly. The 5-day forecast endpoint (free tier, 3-hour intervals) provides more granular data with the same call limit.

Why it matters: Weather data powers applications across industries: logistics reroutes around storms, agriculture schedules irrigation, travel recommends packing, and smart homes adjust thermostats. OpenWeather's simple REST API adds weather context to any location-based application.

Mapbox API

Mapbox provides mapping, geocoding, navigation, and spatial data visualization with highly customizable rendering.

The Maps SDK renders interactive maps with custom styles defined in JSON — match map colors to your brand, hide unnecessary features, emphasize your data layers. The Geocoding API converts addresses to coordinates (forward) and coordinates to addresses (reverse). The Navigation API provides turn-by-turn directions for driving, walking, or cycling.

# Reverse geocode: coordinates to address
curl "https://api.mapbox.com/geocoding/v5/mapbox.places/-73.9857,40.7484.json?access_token=YOUR_TOKEN"

# Forward geocode: address to coordinates
curl "https://api.mapbox.com/geocoding/v5/mapbox.places/1600%20Pennsylvania%20Ave%20NW.json?access_token=YOUR_TOKEN"
// Initialize a Mapbox map with custom style
mapboxgl.accessToken = 'YOUR_TOKEN';
const map = new mapboxgl.Map({
  container: 'map',
  style: 'mapbox://styles/mapbox/light-v11',
  center: [-73.9857, 40.7484],
  zoom: 12
});

// Add a marker
new mapboxgl.Marker()
  .setLngLat([-73.9857, 40.7484])
  .setPopup(new mapboxgl.Popup().setHTML('<h3>Location</h3>'))
  .addTo(map);

Why it matters: Mapbox offers more customization than Google Maps at a lower price. The free tier includes 50,000 map loads and 100,000 geocoding requests per month. Vector tiles are significantly smaller than raster tiles, improving mobile performance. For applications where the map is a core interface, Mapbox provides the control needed for a polished experience.

Auth0 API

Auth0 provides authentication and authorization as a service, supporting social login, enterprise SSO, multi-factor authentication, and passwordless login.

The Authentication API handles user login, signup, and token exchange. The Management API provides programmatic user management. Auth0 supports OAuth 2.0, Openid Connect, and SAML. Universal Login provides a hosted, customizable login page handling all auth flows.

// React component using Auth0 React SDK
import { useAuth0 } from '@auth0/auth0-react';

function LoginButton() {
  const { loginWithRedirect, isAuthenticated, user, logout } = useAuth0();

  if (isAuthenticated) {
    return (
      <div>
        <p>Welcome, {user.name}!</p>
        <button onClick={() => logout()}>Log Out</button>
      </div>
    );
  }

  return <button onClick={() => loginWithRedirect()}>Log In</button>;
}

The Management API allows creating users, updating roles, resetting passwords, and querying user data. The Actions feature runs custom code during authentication flows — for example, adding custom claims to tokens based on user metadata or blocking login from specific IP ranges.

Why it matters: Authentication is deceptively hard to implement securely. Password reset flows, session management, token rotation, and MFA setup each have security pitfalls. Auth0 handles this behind a well-documented API. The free tier supports 7,000 active users and unlimited logins.

SendGrid API

SendGrid (Twilio) provides email delivery with analytics, templates, and list management.

The Mail Send API delivers transactional and marketing emails. Dynamic templates allow creating email designs in SendGrid UI and populating them via API with template variables. Suppression management handles bounces, blocks, and unsubscribes automatically.

from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import Mail

message = Mail(
    from_email='noreply@example.com',
    to_emails='user@example.com',
    subject='Your account has been created',
    html_content='''
        <h1>Welcome!</h1>
        <p>Click <a href="{{verification_link}}">here</a> to verify your email.</p>
    '''
)
sg = SendGridAPIClient(API_KEY)
response = sg.send(message)
print(response.status_code)

The free tier includes 100 emails per day indefinitely. For a side project with a few hundred users, this covers transactional emails (welcome, password reset, notification) without cost. The analytics dashboard shows delivery rates, open rates, click rates, and bounce reasons.

Why it matters: Sending email from your own server is unreliable. ISPs block port 25, shared IPs have poor reputation, and delivery to Gmail/Outlook requires SPF, DKIM, and DMARC configuration. SendGrid handles deliverability so your emails reach the inbox. 100 emails per day on the free tier covers most side projects.

Pexels API

Pexels provides free stock photos and videos licensed for commercial and personal use without attribution required.

The Photos API searches by keyword returning curated photos with multiple sizes. The Videos API provides similar functionality for video clips. The Popular and Curated endpoints return trending content without search parameters. All media comes from photographers under the Pexels license.

# Search for business photos
curl -H "Authorization: YOUR_API_KEY" \
  "https://api.pexels.com/v1/search?query=business&per_page=10"
// Fetch photos and display them
async function getPhotos(query) {
  const res = await fetch(
    `https://api.pexels.com/v1/search?query=${query}&per_page=5`,
    { headers: { Authorization: API_KEY } }
  );
  const data = await res.json();
  return data.photos.map(p => ({
    url: p.src.medium,
    photographer: p.photographer,
    alt: p.alt
  }));
}

The free tier allows 200 requests per hour and 20,000 requests per month. Each request returns up to 80 photos, so 20,000 monthly requests cover 1.6 million photo views.

Why it matters: High-quality visuals significantly improve user engagement, but stock photo licensing is expensive and legally complicated. Pexels removes both barriers. The 3-million-plus photo library is free for commercial use.

CoinGecko API

CoinGecko provides cryptocurrency data including prices, market cap, trading volume, exchange data, and developer statistics.

The Simple Price endpoint returns current prices for any crypto in any fiat currency. The Coins/Markets endpoint returns market data with pagination. The Global Data endpoint provides aggregate market metrics.

# Get current Bitcoin price in USD
curl "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd"

# Get top 10 coins by market cap
curl "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&order=market_cap_desc&per_page=10"

The free tier allows 30 calls per minute without an API key. For portfolio trackers, payment dashboards, or applications displaying crypto prices, CoinGecko is the standard source.

Why it matters: Cryptocurrency data is volatile and requires frequent polling. CoinGecko aggregates data from hundreds of exchanges, providing a consolidated view individual exchange APIs cannot match. The free tier is unusually generous.

REST Countries API

REST Countries provides comprehensive country data: names, capitals, populations, currencies, languages, timezones, and flags.

The API supports endpoints: all countries, single country by name, by capital, by currency, by language, by region. The v3.1 API includes independent status (sovereign vs. dependent territories).

# Get countries where Spanish is spoken
curl "https://restcountries.com/v3.1/lang/spanish"

# Get country by full name
curl "https://restcountries.com/v3.1/name/brazil?fullText=true"

No API key is required. The response includes ISO codes, calling codes, top-level domains, neighboring countries, and flag URLs. The data is updated regularly from United Nations and ISO sources.

Why it matters: Country data seems simple but is complex. Names change, currencies change, borders shift. Maintaining this data manually leads to stale information. REST Countries provides authoritative, updated data without authentication.

Do I need API keys for all of these?

Most require free registration. OpenWeather, CoinGecko, and REST Countries work without authentication for limited usage. Stripe, Twilio, GitHub, Mapbox, Auth0, SendGrid, and Pexels require API keys. Store them in environment variables — never hardcode in client-side code.

Which APIs work without a credit card?

GitHub, CoinGecko, and REST Countries have free tiers without credit cards. OpenWeather requests a card but does not charge unless you exceed limits. Mapbox and Auth0 also request cards but cap overages. Stripe and Twilio need payment info but provide free credits.

How do I handle API rate limits?

Implement exponential backoff with jitter for retries. Cache responses where freshness allows. Most SDKs (Stripe, Twilio, Octokit) handle rate limits automatically. For APIs without SDKs, wrap calls in a retry function handling 429 responses.

What is the difference between REST and GraphQL APIs?

REST APIs use multiple endpoints with fixed response structures. GraphQL uses a single endpoint where you specify exactly what data you want in the query. For the GitHub API, the REST API is simpler for single-resource operations, while GraphQL is better for fetching related data (issues, labels, comments, assignees) in one request.

Practice Questions

  1. Design the API integration architecture for an e-commerce app needing payments (Stripe), order confirmation emails (SendGrid), delivery tracking on a map (Mapbox), and user auth (Auth0). How do the APIs interact and what data flows between them?

  2. A weather dashboard needs current conditions, 7-day forecast, and air quality for three cities. Using OpenWeather One Call API, write a script that fetches all data in the minimum number of API calls.

  3. You are building a developer tool that creates a GitHub issue when an app error exceeds a threshold. Write the API call that creates an issue with title, body, label, and assignee.

  4. Compare authentication flows of Auth0 (social login) and Twilio Verify (phone-based 2FA). In what scenarios would you choose one over the other?

  5. A travel app needs country info, weather data, and geocoding for destination searches. Which three APIs would you combine, and how would you handle data aggregation on the frontend?

Brand Credit

Built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro. We use Stripe for DodaZIP Pro subscriptions, Twilio for Durga Antivirus Pro alert SMS notifications, and the GitHub API for release workflows across all three products.

In-Depth API Integration Patterns

Integrating multiple APIs into a single application requires handling authentication, rate limits, error responses, and data transformation. Here are patterns for combining the APIs covered in this guide.

Combining Stripe, SendGrid, and Auth0 for a SaaS application: When a user signs up via Auth0, you create a Stripe customer and send a welcome email via SendGrid. The flow is: Auth0 webhook triggers on user creation -> serverless function creates Stripe customer -> serverless function sends SendGrid welcome email. This three-API chain handles the entire user onboarding flow without custom backend logic.

// Serverless function triggered by Auth0 webhook
async function handleNewUser(user) {
  // Create Stripe customer
  const customer = await stripe.customers.create({
    email: user.email,
    name: user.name,
    metadata: { auth0Id: user.user_id }
  });

  // Send welcome email
  await sgMail.send({
    to: user.email,
    from: 'welcome@example.com',
    subject: 'Welcome to our platform!',
    text: `Your Stripe customer ID is ${customer.id}`
  });

  return { customerId: customer.id };
}

Webhook reliability patterns: Webhooks from Stripe, Twilio, and SendGrid can arrive at any time and may be retried if your endpoint does not respond with 200. Implement idempotency checks (process each webhook ID only once), store webhook events in a database for auditing, and use idempotency keys for webhook handler responses. Stripe webhooks include an idempotency key header that you should use to detect duplicates.

// Idempotent webhook handler
async function handleStripeWebhook(req, res) {
  const sig = req.headers['stripe-signature'];
  const event = stripe.webhooks.constructEvent(req.body, sig, webhookSecret);

  // Check for duplicate processing
  const processed = await db.get('processed_events', event.id);
  if (processed) {
    return res.json({ received: true, duplicate: true });
  }

  // Process the event
  switch (event.type) {
    case 'payment_intent.succeeded':
      await handlePaymentSuccess(event.data.object);
      break;
    case 'customer.subscription.updated':
      await handleSubscriptionUpdate(event.data.object);
      break;
  }

  // Mark as processed
  await db.set('processed_events', event.id, { processedAt: Date.now() });
  res.json({ received: true });
}

Rate limit handling: Each API on this list has different rate limits. Stripe allows 100 read operations per second and 100 write operations per second. GitHub allows 5,000 REST API requests per hour for authenticated users. OpenWeather allows 1,000 free calls per day. Mapbox allows 50,000 map loads per month.

Implement a queue with exponential backoff for API requests. Use the Retry-After header from 429 responses to determine wait time. Batch requests where possible (GitHub GraphQL allows complex queries in a single request). Cache API responses with appropriate TTLs based on data freshness requirements.

// Rate-limited API caller with retry
async function apiCallWithRetry(url, options, maxRetries = 3) {
  for (let attempt = 0; attempt < maxRetries; attempt++) {
    const response = await fetch(url, options);
    if (response.status === 429) {
      const retryAfter = response.headers.get('Retry-After') || 60;
      await new Promise(r => setTimeout(r, retryAfter * 1000));
      continue;
    }
    if (!response.ok) {
      throw new Error(`API error: ${response.status} ${response.statusText}`);
    }
    return response.json();
  }
  throw new Error('Max retries exceeded');
}

API key management: Store API keys in environment variables, never in code. Use a secrets manager (Vault, AWS Secrets Manager) for production. Rotate keys regularly. Use different keys for development, staging, and production environments. Limit key permissions to the minimum required (Stripe restricted API keys, GitHub fine-grained tokens, Auth0 machine-to-machine tokens with specific scopes).

API Selection Decision Matrix

Choosing the right API for a problem depends on your specific requirements. Here is a decision matrix for common scenarios.

Problem Primary API Alternative Why Primary
Accept payments Stripe PayPal, Square Best developer experience, webhooks, subscriptions
Send SMS notifications Twilio Vonage, Plivo Global coverage, Verify API, extensive docs
Version control automation GitHub GitLab, Bitbucket Largest community, Actions, GraphQL API
Weather data in app OpenWeather WeatherAPI, AccuWeather Generous free tier, One Call API simplicity
Interactive maps Mapbox Google Maps, Leafletjs Customization, lower price, vector tiles
User authentication Auth0 Firebase Auth, Clerk 7K free users, social login, enterprise SSO
Transactional email SendGrid Mailgun, Postmark 100/day free, templates, analytics
Stock photos in app Pexels Unsplash, Pixabay Commercial license, no attribution, video
Crypto price data CoinGecko CoinMarketCap, CoinCap No auth needed, 30 calls/min free
Country/location data REST Countries GeoNames, Teleport Free, no auth, comprehensive data

Security Considerations for API Integration

Integrating third-party APIs introduces security considerations that developers must address.

Never expose API keys on the client side: API keys in client-side JavaScript are visible to anyone who inspects your page source or network requests. Use a backend proxy or serverless function to make API calls on behalf of the client. For APIs that must be called from the client (like Stripe publishable key), use restricted keys with limited permissions.

Validate webhook signatures: Stripe, Twilio, and SendGrid sign webhook payloads. Always verify the signature before processing the webhook. Stripe uses the stripe-signature header with a timestamp and signature computed using HMAC-SHA256. Twilio uses the X-Twilio-Signature header. SendGrid uses the X-Twilio-Email-Event-<a href="/backend/webhooks/">Webhook</a>-Signature header (since SendGrid is part of Twilio).

// Verify Stripe webhook signature
const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY);

// In your Express route
app.post('/webhooks/stripe', express.raw({type: 'application/json'}), (req, res) => {
  const sig = req.headers['stripe-signature'];
  try {
    const event = stripe.webhooks.constructEvent(req.body, sig, webhookSecret);
    // Process event
    res.json({received: true});
  } catch (err) {
    res.status(400).send(`Webhook signature verification failed: ${err.message}`);
  }
});

Implement request validation: Validate all data received from webhooks before processing. Check that required fields exist, data types match expectations, and values are within acceptable ranges. Never trust webhook data blindly — a bug in the sending system could send malformed data that crashes your application.

API Testing Strategies

Testing API integrations requires different approaches than testing your own code.

Use sandbox/test environments: All major APIs provide test environments. Stripe test mode uses test card numbers. Twilio provides test credentials that do not send real messages. GitHub provides the GitHub API sandbox. Mapbox has a free development tier. Always test integration code against sandbox environments before switching to production.

Stripe test cards: 4242 4242 4242 4242 (success), 4000 0000 0000 0002 (decline), 4000 0025 0000 3155 (requires 3D Secure). Test these in the Stripe dashboard test mode to verify your payment flow handles all cases.

Mock API responses in tests: Use libraries like nock (Node.js), responses (Python), or WireMock (Java) to mock API responses in unit tests. Mock all API dependencies to make tests deterministic and fast. Integration tests against sandbox environments catch issues that mocks miss.

Webhook testing tools: Use Stripe CLI to forward webhooks to your local development server (stripe listen --forward-to localhost:3000/<a href="/backend/webhooks/">webhooks</a>/stripe). Use ngrok or Cloudflare Tunnel to expose your local server to the internet for receiving webhooks during development. This catches webhook handling issues before deploying to production.

Performance Optimization

APIs introduce network latency into your application. Optimize API usage for performance.

Caching strategies: Cache API responses aggressively when data freshness allows. OpenWeather data can be cached for 10-30 minutes. Mapbox tiles are cachable for hours. REST Countries data changes infrequently and can be cached for days. Use a cache layer (Redis, Memcached, or in-memory cache) with a TTL appropriate to each API data freshness requirements.

Connection pooling: Reuse HTTP connections across requests to avoid TLS handshake overhead. Stripe and Twilio SDKs pool connections by default. For APIs without SDKs, use connection-pooling HTTP clients (undici for Node.js, requests.Session for Python).

Reduce API calls through batching: GitHub GraphQL API allows querying multiple resources in a single request. CoinGecko allows querying multiple coin prices in one call. Mapbox tileset queries are batched automatically. When an API supports batching, use it.

Prefetch and lazy loading: Prefetch likely API data on page load while lazy-loading less critical data. For a dashboard, prefetch the main data set and lazy-load historical data and export endpoints. This balances initial load time with data completeness.

// Prefetch critical data, lazy load the rest
async function loadDashboard() {
  // Critical: load immediately
  const [revenue, users] = await Promise.all([
    fetchRevenue(),   // Stripe API
    fetchUserCount()  // Your backend API
  ]);

  // Non-critical: load after render
  requestIdleCallback(async () => {
    const [forecast, history] = await Promise.all([
      fetchForecast(),   // OpenWeather API
      fetchHistory()     // Your analytics API
    ]);
    renderHistory(history);
    renderForecast(forecast);
  });
}

Practice Questions (Continued)

  1. You are building a donation platform where users pay via Stripe, receive an SMS receipt via Twilio, and organizations display donor locations on a Mapbox map. Design the integration architecture showing data flow between all three APIs.

  2. A GitHub bot needs to watch for issues with the "bug" label, create a branch from the issue, and post a comment with the branch name. Write the sequence of GitHub API calls needed.

  3. Compare the authentication approaches of API key-based (OpenWeather, Pexels), OAuth 2.0-based (GitHub, Auth0), and webhook-signed (Stripe, Twilio) APIs. What security considerations apply to each?

  4. A weather app serves 50,000 daily active users but OpenWeather free tier allows only 1,000 calls per day. Design a caching strategy that stays within the free tier.

  5. You need to add payment processing to an existing application with 100,000 active users in 5 countries. Compare Stripe with alternative payment APIs based on regional support, currency handling, and fee structures.

Brand Credit

Built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro. We use Stripe for DodaZIP Pro subscriptions, Twilio for Durga Antivirus Pro alert SMS notifications, the GitHub API for automated release workflows, and Mapbox for location-based features in Doda Browser. Our integration patterns have evolved over years of production use and reflect lessons from real incidents involving webhook failures, rate limit exceedances, and API deprecations.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro