• Trafiklab
  • APIs
  • Knowledge base
  • News
  • Cases
  • About
  • Status
  • Support
My account
  • APIs
    • GTFS Datasets
      • Overview
      • GTFS Sverige 2
      • GTFS Regional
      • GTFS Sweden 3
    • NeTEx Datasets
      • Overview
      • NeTEx Regional
      • NeTEx Sweden
      • Stops data
      • Samtrafiken Sales data
    • Our APIs
      • Trafiklab realtime APIs
      • ResRobot v2.1
      • KoDa
      • SL's APIs
      • Oxyfi-Realtidspositionering
    • Related data and APIs
      • Public transport data in Europe
      • Västtrafiks API-portal
      • Trafikverket Open API
      • Stockholm open data
      • Göteborg open data
      • Emmission Quality
      • Skjutsgruppen
  • Knowledge base
    • Getting started
      • Using Trafiklab.se
      • Frequently Asked Questions
    • Developing with Trafiklab
      • Best practices
      • Combining data and APIs
      • Example solutions
      • Our SDKs and libraries
      • The protobuf file format
      • The right data for your project
    • Other
      • Improving Trafiklab
  • News
  • Cases
  • About
  • Status
  • Support
  • My account
    Knowledge base
  • Getting started
    • Using Trafiklab.se
    • Frequently Asked Questions
  • Developing with Trafiklab
    • Best practices
      • Conditional GET requests
      • Keeping API keys secret
      • Limiting requests
    • Combining data and APIs
      • Converting SWEREF99 to WGS84
    • Example solutions
      • Voice assistant
        • Creating a DialogFlow agent
        • Creating a fulfillment API
        • Importing our demo project
        • Putting it all online
        • Testing and deploying your app
    • Our SDKs and libraries
      • PHP
        • ResRobot PHP SDK
    • The protobuf file format
    • The right data for your project
      • Departure boards
      • Obtaining stop ids
      • Route-planning
  • Other
    • Improving Trafiklab

Best practices

Conditional GET requests

Conditional requests are a part of the HTTP specification. They define a condition, determining when the server should send a response. They can define the condition that the resource must have been modified since a given timestamp (if-modified-since) or that the resource should not match with a given checksum (if-none-match).

Read more
Theme image

Keeping API keys secret

Your API keys are personal, and you should try to keep them secret. You shouldn’t try hard, but just, you know, don’t post them in plain text on the internet.

Read more
Theme image

Limiting requests

Our departures/arrivals APIs are commonly used for digital signage, both in public spaces (digital signage in stores, malls, appartment blocks, …) and private spaces (magic mirror, hobby projects, …).

Read more
Theme image