Town association methods
Learn how Local News API connects articles with specific locations using five distinct association methods.
Overview
Town association methods help you accurately connect news articles with specific locations in your searches. These methods use different matching strategies to identify location references in articles, from analyzing news sources to processing natural language patterns.
Understanding town association
News articles can mention locations in several ways:
- City names (“San Francisco”)
- Regional terms (“Bay Area”)
- Local landmarks (“Golden Gate Bridge”)
- Contextual references (“the city”)
The Local News API uses five association methods to capture these different reference patterns.
Available methods
HYPERLOCAL_SOURCES_EXCLUDE_QUERY
Identifies articles from dedicated local news sources that don’t mention other locations.
Query pattern:
Use this method when working with:
- City-specific newspapers
- University news portals
- Local government sites
- Regional sections of larger publications
For example:
HYPERLOCAL_SOURCES_INCLUDE_QUERY
Finds exact matches of city names in article titles or content.
Query pattern:
Use this method for:
- Finding explicit city mentions
- Analyzing headlines
- Matching specific location names
LOCAL_SOURCES_EXCLUDE_QUERY
Searches state-level sources while excluding mentions of other states.
Query pattern:
Use this method with:
- Regional news outlets
- State-wide publications
- Multi-city coverage sources
CITY_STATE_COUNTY_QUERY
Searches for standard location format patterns used in journalism.
Query pattern:
This method matches formats like:
- “San Francisco, CA"
- "San Francisco, California"
- "San Francisco, San Francisco County”
NEAR_CITY_STATE_QUERY
Finds articles where city and state names appear close to each other.
Query pattern:
This method matches phrases like:
- “New development in San Francisco draws attention across California"
- "California’s tech hub San Francisco sees startup growth”
Implementation guide
Choose your methods
Select association methods based on your sources:
Combine methods
Use multiple methods for better coverage:
Add AI capabilities
Enable AI-powered town extraction:
This feature requires the v3_local_news_ai_extraction_nlp
plan.
Best practices
See also
Was this page helpful?