Location detection methods
Understand how Local News API uses different methods to detect and validate location mentions in news articles, helping you filter and interpret location-specific content.
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:
- The system analyze articles using pattern-based detection methods (dedicated source, local section, regional source, standard format, and proximity mention).
- Detected locations go through AI validation to confirm their relevance to the article.
- If no locations are validated in step 2, the AI-based detection method analyzes the article content to extract locations.
- Articles are indexed with their validated locations and the detection methods that identified them.
- 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:
- It processes articles that failed validation in the pattern-based detection pipeline
- It analyzes the full article content without relying on predefined patterns
- 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:
The API response shows which methods were used to identify locations in each article:
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.
- 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.
- Use standard format detection for formal news articles.
- Consider proximity mention detection for feature articles.
- Enable AI detection for articles with complex location context.
- Combine multiple methods when source context is important.
- Start with more specific methods if precision is crucial.
- Add broader methods when recall is important.
- Use AI detection for comprehensive coverage.
- Consider your plan’s available methods.