Getting started overview

To begin developing with HERE Technologies, the initial steps involve setting up a developer account, obtaining API credentials, and making a foundational request. HERE provides a comprehensive suite of location services, including mapping, routing, and geocoding, accessible via REST APIs and platform-specific SDKs. The developer experience is designed to support a range of applications, from automotive navigation to logistics and geospatial data analysis, as outlined in the official HERE developer documentation. This guide focuses on the streamlined process of getting your first HERE-powered application operational.

A key aspect of the HERE ecosystem is its freemium model, which allows developers to access most services up to a generous transaction limit each month without incurring costs. This provides an opportunity to explore and prototype solutions before committing to a paid plan, which starts at $49/month for 500,000 transactions. Understanding the HERE pricing structure is important for managing usage and scaling applications.

The primary method of interaction with HERE services for web and backend applications is through RESTful APIs, which typically require an API key for authentication. Mobile and frontend web applications often leverage dedicated SDKs (Android SDK, iOS SDK, JavaScript API) that abstract much of the API interaction, simplifying development. Regardless of the chosen method, securing valid credentials is the first programmatic hurdle.

Quick Reference Table

Step What to Do Where
1. Sign Up Create a HERE developer account. HERE Developer Portal Sign-Up
2. Get API Key Generate your first API key for authentication. HERE Projects Dashboard
3. Choose Service Select the HERE API you want to use (e.g., Geocoding). HERE API Reference
4. Make Request Construct and execute your first API call. Code editor / Terminal
5. Explore SDKs Consider using an SDK for platform-specific development. HERE SDK Documentation

Create an account and get keys

Accessing HERE Technologies's services requires a developer account. This account serves as your central hub for managing projects, monitoring usage, and generating API credentials. The process is straightforward and typically takes only a few minutes.

Account Registration

  1. Navigate to the HERE Developer Portal sign-up page.
  2. Fill in the required information, including your email address and a strong password.
  3. Review and accept the terms of service.
  4. Complete any email verification steps to activate your account.

API Key Generation

Once your account is active, you can generate API keys. These keys are essential for authenticating your requests to HERE APIs. Each project you create within your developer account can have its own set of keys, allowing for better organization and security management.

  1. Log in to your HERE Developer Portal dashboard.
  2. Go to the 'Projects' section. If you don't have a project, create a new one. A project organizes your API keys and usage data.
  3. Within your project, locate the 'API Keys' section.
  4. Click the button to generate a new API key. The key will be displayed. Copy this key immediately and store it securely, as it may not be fully retrievable later.

It is recommended to generate separate API keys for different environments (e.g., development, staging, production) or for different applications to enhance security and simplify key rotation. For securing your API keys in client-side applications, consider using specific SDK methods or proxy servers, as direct exposure of keys in public client-side code is generally discouraged for any API provider, as noted in Google Maps API security best practices.

Your first request

With an API key in hand, you can now make your first request to a HERE API. A common starting point is the Geocoding and Search API, which converts a human-readable address into geographical coordinates (latitude and longitude) or vice-versa. This example uses the Geocoding endpoint.

Geocoding API Example

The Geocoding API is part of the HERE Geocoding & Search API v7. The base URL for the Geocoding endpoint is https://geocode.search.hereapi.com/v1/geocode.

Request Parameters

  • q: The address or query string to geocode (e.g., "200 S Mathilda Ave, Sunnyvale, CA").
  • apiKey: Your HERE API key.

Example cURL Request

Replace YOUR_API_KEY with the key you generated.

curl "https://geocode.search.hereapi.com/v1/geocode?q=200+S+Mathilda+Ave,+Sunnyvale,+CA&apiKey=YOUR_API_KEY"

Example JavaScript (Fetch) Request

const apiKey = 'YOUR_API_KEY';
const address = '200 S Mathilda Ave, Sunnyvale, CA';
const url = `https://geocode.search.hereapi.com/v1/geocode?q=${encodeURIComponent(address)}&apiKey=${apiKey}`; 

fetch(url)
  .then(response => {
    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`);
    }
    return response.json();
  })
  .then(data => {
    console.log('Geocoding Result:', data);
    // Example: Accessing latitude and longitude of the first item
    if (data.items && data.items.length > 0) {
      const position = data.items[0].position;
      console.log(`Latitude: ${position.lat}, Longitude: ${position.lng}`);
    }
  })
  .catch(error => {
    console.error('Error during geocoding request:', error);
  });

Expected Response (JSON)

A successful response will return a JSON object containing an array of items, each representing a geocoded result. Each item will include a position object with lat (latitude) and lng (longitude) values.

{
  "items": [
    {
      "title": "200 S Mathilda Ave, Sunnyvale, CA 94087, United States",
      "id": "here:cm:fid:21396x7c-0b81aa6646ce4615a6b7d484196c813a",
      "resultType": "houseNumber",
      "address": {
        "label": "200 S Mathilda Ave, Sunnyvale, CA 94087, United States",
        "countryCode": "USA",
        "countryName": "United States",
        "stateCode": "CA",
        "state": "California",
        "county": "Santa Clara",
        "city": "Sunnyvale",
        "district": "West Sunnyvale",
        "street": "S Mathilda Ave",
        "houseNumber": "200",
        "postalCode": "94087"
      },
      "position": {
        "lat": 37.38753,
        "lng": -122.03792
      },
      "access": [
        {
          "lat": 37.38752,
          "lng": -122.03797
        }
      ],
      "mapView": {
        "west": -122.03923,
        "south": 37.38663,
        "east": -122.03661,
        "north": 37.38843
      },
      "scoring": {
        "queryScore": 1.0,
        "fieldScore": {
          "city": 1.0,
          "state": 1.0,
          "street": 1.0,
          "houseNumber": 1.0
        }
      }
    }
  ]
}

Common next steps

After successfully making your first API call, you can explore the broader range of HERE Technologies's services and tools. Developers often proceed to integrate more advanced features or optimize their existing implementations.

Explore Other APIs and SDKs

  • Routing API: Calculate optimal routes for various modes of transport, considering real-time traffic, vehicle type, and other constraints. Refer to the HERE Routing API v7 documentation.
  • Map Display API: Embed interactive maps into your web or mobile applications using the HERE Map Display API or platform-specific SDKs (Android SDK, iOS SDK, JavaScript API).
  • Geospatial Data Processing: Utilize HERE Platform services for advanced spatial analysis and data visualization.

Implement Security Best Practices

Properly securing your API keys is critical. For server-side applications, store keys as environment variables or in secure configuration management systems. For client-side applications using JavaScript, consider implementing a proxy server to hide your API key from end-users, or leverage HERE's secure credentials management for specific SDKs, as detailed in the HERE Identity & Access Management guide.

Monitor Usage and Costs

Regularly check your API usage in the HERE Developer Portal to monitor transaction counts and manage costs, especially if you are operating on the freemium or a paid tier. Set up alerts if available to notify you when nearing usage limits.

Optimize Performance

Cache API responses where appropriate to reduce redundant calls and improve application responsiveness. Implement efficient query parameters to retrieve only the necessary data, minimizing bandwidth and processing overhead.

Troubleshooting the first call

Encountering issues during your initial API calls is common. Here's a guide to diagnosing and resolving typical problems with HERE Technologies's services:

Common Error Codes and Causes

  • 401 Unauthorized: This usually indicates an issue with your API key.
    • Cause: Missing apiKey parameter, incorrect key, or revoked key.
    • Solution: Double-check that your API key is correctly included in your request and matches the key in your HERE Projects dashboard. Ensure no extra spaces or characters are present.
  • 403 Forbidden: Your API key might not have the necessary permissions or there could be a restriction.
    • Cause: API key restricted to certain domains/IPs, or insufficient permissions for the requested service.
    • Solution: Verify that your API key's security settings (if configured) allow requests from your application's domain or IP address. Ensure the API key is associated with a project that has access to the specific HERE service you are trying to use.
  • 400 Bad Request: The request itself is malformed or missing required parameters.
    • Cause: Invalid request format, missing mandatory query parameters (e.g., q for geocoding), or incorrect parameter values.
    • Solution: Review the API reference documentation for the specific endpoint you are calling. Ensure all required parameters are present and correctly formatted.
  • 200 OK with empty or unexpected results: The request was successful, but the data returned is not what was anticipated.
    • Cause: The query string might be too vague, misspelled, or the location simply doesn't exist in the HERE database.
    • Solution: Refine your query string. Try a simpler or more specific address. Check for typos. Consult the API documentation for expected input formats for the q parameter.

General Troubleshooting Tips

  • Check Network Connectivity: Ensure your development environment has a stable internet connection.
  • Verify Endpoint URL: Confirm that the base URL for the API endpoint is correct as per the HERE API reference.
  • Inspect Response Body: Many APIs provide detailed error messages within the JSON response body. Always inspect this for specific guidance.
  • Consult Documentation: The HERE developer documentation provides extensive details on each API, including error codes and expected request/response formats.
  • Developer Console/Network Tab: Use your browser's developer tools (Network tab) or a tool like Postman to inspect the full request and response, including headers and status codes.