Overview

Local News API provides access to news articles that have been pre-processed to recognize and validate location mentions. The API uses six distinct ways to detect locations in articles, allowing you to filter results based on how confidently a location was identified.

When you search for location-specific news, you can specify which detection methods to include in your results. This gives you control over the precision-recall tradeoff in your location-based queries.

How location detection works

Location detection pipeline

Before being available through the API, articles go through a multi-stage processing pipeline:

  1. The system analyze articles using pattern-based detection methods (dedicated source, local section, regional source, standard format, and proximity mention).
  2. Detected locations go through AI validation to confirm their relevance to the article.
  3. If no locations are validated in step 2, the AI-based detection method analyzes the article content to extract locations.
  4. Articles are indexed with their validated locations and the detection methods that identified them.
  5. The API provides filtered access to this pre-processed dataset, allowing you to query by location and specific detection methods.

Detection methods

Default behavior

When making API requests, if you don’t specify detection methods, the API includes results from all methods available in your subscription plan. This means even if you only provide a location parameter, the API returns articles where that location was identified by any available method.

All detection methods undergo AI validation to ensure accuracy, regardless of which methods you choose to filter by.

Dedicated source detection

API method name: dedicated_source

The most precise method for identifying location-relevant content. This method tags articles from news sources that exclusively cover a specific location, such as city newspapers or local news websites.

For example, articles from the Fresno Bee are likely relevant to Fresno because that’s their primary coverage area. These sources may reference local landmarks or community events without explicitly naming the city, but the content is still reliably location-specific.

When to use: Choose this method when you need high-precision results and work with content from well-known local publications.

Example sources:

  • City newspapers (San Francisco Chronicle)
  • University news portals (Fresno State News)
  • Local government news sites

Local section detection

API method name: local_section

Identifies articles from location-specific sections within larger publications. This method is particularly effective for regional or state-level news outlets that maintain dedicated coverage areas for specific cities.

For example, an article from the “Huntington Beach” section of the Orange County Register is likely relevant to Huntington Beach, even if the city isn’t repeatedly mentioned in the text.

When to use: Effective when searching for location-specific content from larger regional publications with well-defined local sections.

Regional source detection

API method name: regional_source

This method leverages the context of regional news sources to properly interpret location mentions. It’s particularly useful for disambiguating location references in state-level publications.

For example, when a California news outlet mentions “Georgetown,” it typically refers to Georgetown, California, rather than Georgetown, Texas or other similarly named locations. This method helps resolve such ambiguities based on the publication’s regional context.

When to use: Valuable when working with state-level publications or when location names might be ambiguous without regional context.

Standard format detection

API method name: standard_format

Identifies location mentions that follow common journalistic formatting patterns. This method looks for locations written in standardized formats:

  • “City, State” (San Francisco, California)
  • “City, State Code” (San Francisco, CA)
  • “City, County” (San Francisco, San Francisco County)

When to use: Reliable for finding explicit location references, particularly in article headlines or opening paragraphs.

Proximity mention detection

API method name: proximity_mention

This method identifies cases where a city and its state appear within 15 words of each other, capturing more natural writing patterns.

For example, in the sentence “New development in San Francisco draws attention across California,” the proximity of “San Francisco” to “California” helps confirm the location reference.

When to use: Helpful for finding location mentions in naturally written content where formal city-state formats aren’t used.

AI-based detection

API method name: ai_extracted

This method serves as a secondary extraction layer for articles where traditional pattern-based detection methods don’t yield validated locations. It uses state-of-the-art large language models to analyze article content and extract location mentions, even when they’re implicit or contextual.

The AI-based detection process works differently from other methods:

  1. It processes articles that failed validation in the pattern-based detection pipeline
  2. It analyzes the full article content without relying on predefined patterns
  3. It can identify locations mentioned through landmarks, regional terms, or other indirect references

When to use: Particularly valuable for:

  • Articles with complex or implicit location references
  • Content mentioning local landmarks without explicitly naming cities
  • Regional coverage that assumes a local context
  • Comprehensive searches where maximum location coverage is important

The ai_extracted method is only available with the AI Extraction plan and provides additional coverage beyond what pattern-based methods can identify.

Using detection methods in API requests

When making API requests, you can specify which detection methods to filter your results by:

{
  "locations": ["San Francisco, California"],
  "detection_methods": ["dedicated_source", "standard_format"]
}

The API response shows which methods were used to identify locations in each article:

{
  "status": "ok",
  "total_hits": 13,
  "page": 1,
  "total_pages": 1,
  "page_size": 100,
  "articles": [
    {
      "id": "7d755d4db23a46a4d27e236d21498d24",
      "locations": [
        {
          "name": "San Francisco, California",
          "detection_methods": ["dedicated_source"]
        }
      ],
      "title": "Lyzr Launches 2nd AI Agent under Banking suite: Teller Assistance Agent",
      "author": "Anirudh Narayan",
      "link": "https://apnews.com/press-release/ein-presswire-newsmatics/new-jersey-artificial-intelligence-78f4c6ccd15ca77a2b467fd8e996c450",
      "published_date": "2025-02-23T12:16:19",
      "domain_url": "apnews.com"
    }
  ]
}

If you don’t specify detection methods in your request, the response includes articles found using any available method for your subscription plan. Locations are provided along with detection methods, helping you understand how the particular location was identified.

Choosing detection methods

When deciding which detection methods to use, consider the following criteria:

  • Dedicated source and local section detection provide the highest confidence.
  • Standard format detection offers good precision for explicit mentions.
  • Proximity mention detection works well for natural writing styles.
  • AI-based detection helps with complex or implicit references.

See also