• APIs
  • Knowledge base
  • News
  • Cases
  • About
  • Status
  • Support
My account
  • APIs
    • GTFS Datasets
      • Overview
        • Static data
        • Static data extensions
        • Realtime data
      • GTFS Sverige 2
      • GTFS Regional
        • Static data specification
        • Realtime data specification
      • GTFS Sweden 3
        • GTFS Sweden 3 Static data specification
        • GTFS Sweden Realtime data specification
    • NeTEx Datasets
      • Overview
      • NeTEx Regional
        • NeTEx regional API specification
      • NeTEx Sweden
        • NeTEx Sweden API specification
      • Stops data
      • Samtrafiken Sales data
    • Our APIs
      • Trafiklab realtime APIs
        • Trafiklab Timetables
        • Trafiklab Stop Lookup
        • OpenAPI specification
      • ResRobot v2.1
        • ResRobot Timetables
        • ResRobot Route planner
        • ResRobot Stop lookup
        • ResRobot Nearby stops
        • ResRobot Deep Links
        • ResRobot error codes
        • ResRobot data types
        • License
        • OpenApi Specification
      • KoDa
        • OpenApi Specification
      • SL's APIs
        • SL Transport
        • SL Deviations
        • SL Journey-planner v2
        • Licence
      • 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
        • Conditional GET requests
        • Keeping API keys secret
        • Limiting requests
      • Combining data and APIs
        • Converting SWEREF99 to WGS84
      • Example solutions
        • Voice assistant
      • Our SDKs and libraries
        • PHP
      • The protobuf file format
      • The right data for your project
        • Departure boards
        • Obtaining stop ids
        • Route-planning
    • 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