Guides Get started

Make your first request

Create a key, call the API and read what comes back.

3 steps3 min

  1. Create an API key

    Open API keys and create one. You see the full key once, so store it somewhere safe, like an environment variable.

    Shell
    export TW_API_KEY="tw_live_..."
  2. List the newest innovations

    Every request sends the key as a bearer token. Without a query, innovations come back newest first.

    curl
    curl "https://api.trendwatching.com/v1/innovations?limit=3" \
      -H "Authorization: Bearer $TW_API_KEY"
    Python
    import os
    
    from trendwatching import TrendWatching
    
    tw = TrendWatching(api_key=os.environ["TW_API_KEY"])
    for inno in tw.innovations.list(limit=3):
        print(inno.innovation_id, inno.name)
    TypeScript
    import { TrendWatching } from "@trendwatching/sdk";
    
    const tw = new TrendWatching(process.env.TW_API_KEY!);
    for (const inno of await tw.innovations.list({ limit: 3 })) {
      console.log(inno.innovation_id, inno.name);
    }
  3. Read the response

    Each row has a ready-to-show display card in markdown, the taxonomy it belongs to and an image_url. Fetch /v1/innovations/{id} for the full write-up. Response headers tell you how much of your rate limit and monthly quota is left.

    Headers
    X-RateLimit-Limit: 60
    X-RateLimit-Remaining: 59
    X-RateLimit-Reset: 60
    X-Quota-Remaining: 999