QUICKSTART · ABOUT 5 MINUTES

Your first API call

Get a free key, search the news for "climate" and print the headlines. You need a terminal, nothing else.

  1. Get a free API key

    Sign in, open API keys in the console and create a key. Copy it right away: the full key is only shown once. Keys start with gna_live_.

    The Free plan needs no card. See Plans for the credits and capabilities each plan includes.

  2. Store it in an environment variable

    Keep the key out of your code so it never ends up in Git.

    export NEWSSEARCHAPI_API_KEY="gna_live_your_key_here"
  3. Make a request

    Search English-language articles that mention "climate", newest first:

    curl "https://apis.newssearchapi.com/v1/articles?q=climate&language=en&page_size=5" \
      -H "X-Api-Key: $NEWSSEARCHAPI_API_KEY"

    For a quick browser test, add &apiKey=YOUR_API_KEY to the URL. Both methods are supported; use the X-Api-Key header on servers to keep keys out of URLs and logs.

    q matches every word (case-insensitive) in the title or description. Add filters such as country, category, source or from; the article search reference lists them all and lets you run them live.

  4. Read the response

    Successful responses have "status": "ok", the results in articles, and totalResults, page and pageSize for paging:

    200 OK
    {
      "status": "ok",
      "totalResults": 1342,
      "page": 1,
      "pageSize": 10,
      "articles": [
        {
          "id": "-4210765838120375291",
          "title": "Central bank holds rates steady amid cooling inflation",
          "description": "Policymakers voted 7–2 to keep the benchmark rate unchanged.",
          "content": "Policymakers voted 7–2 on Thursday to keep the benchmark rate unchanged, citing a steady decline in core inflation over the past quarter. The decision was widely expected by markets. …",
          "contentTruncated": true,
          "url": "https://www.dailyledger.example/business/rates-hold",
          "imageUrl": "https://cdn.dailyledger.example/img/rates.jpg",
          "author": "Jane Smith",
          "publishedAt": "2026-10-31T09:15:00Z",
          "language": "en",
          "country": "gb",
          "region": "Europe",
          "categories": [
            "business",
            "economy"
          ],
          "source": {
            "name": "The Daily Ledger",
            "domain": "dailyledger.example"
          },
          "indexedAt": "2026-10-31T09:15:02Z",
          "storyId": "story-2026-10-31-001",
          "trustScore": 0.94,
          "corroboratedBy": 8
        }
      ]
    }
    Something went wrong?

    401 apiKeyMissing or apiKeyInvalid means neither the header nor query key arrived or the key was mistyped; check the variable is set in the same terminal. 429 means you hit a rate limit or your daily quota. See error codes.

Next steps

Stuck or found a mistake?Email developer support

Esc to close · ↑↓ Tab to move through results