The Scenario
You manage PR for a mid-size fintech company. Your team runs weekly brand mention searches through News API, and last week someone pointed out that your queries had been pulling irrelevant results from a lifestyle outlet that happened to share a domain keyword with a finance publication.
The fix is to query by source ID instead of keyword alone — but you don't have a reference sheet of the News API source IDs for the outlets you actually care about.
Your junior analyst offered to look them up manually. That took them ninety minutes and they still weren't sure they had the right IDs for three of the publications.
The bad version:
- Call the News API /sources endpoint in the browser with category=business, language=en, country=us
- Parse the JSON response to find source names that match your target outlets
- Copy source name, source ID, and URL for each one into a reference sheet by hand, row by row
The source directory is a lookup table you'll use in every subsequent query. Building it by hand once is annoying. Building it again when someone loses the sheet is a different kind of miserable.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Google Sheet. It reads the sheet, calls the News API sources endpoint with your filter parameters, and populates the reference table directly.
Fetch all News API sources in the business category with language English and country US and write each source's name, source ID, and URL into columns A, B, and C starting at row 2 in Sheet1
What You Get
- Column A: publication name (e.g. "The Wall Street Journal")
- Column B: News API source ID (e.g. "the-wall-street-journal") — ready to paste into future query parameters
- Column C: source URL
- One row per matching source, no duplicates
What If the Data Is Not Quite Ready
You also want technology sources in the same sheet
Fetch all News API sources in the technology category with language English and country US and append each source's name, ID, and URL into Sheet1 below the last existing row, adding a Category column in column D labeled "technology" for each new row
Some source names don't match what you call them internally
From the sources now in Sheet1 column A, check each name against this internal alias list in Sheet2 column A and flag any that don't match with "ALIAS NEEDED" in column D
You want to pull sources for multiple countries at once
Fetch News API business-category sources for country codes US, GB, and AU and write each source's name, ID, URL, and country into columns A through D in Sheet1, with country as a two-letter code in column D
One pass that builds the full reference and validates it
Fetch all News API English-language business and technology sources for the US, write name, ID, and URL into Sheet1 columns A through C, then check each source ID in column B for duplicates and flag any in column D with "DUPLICATE"
A clean source ID reference sheet means every future query goes to exactly the outlets you meant to target.
Try It
Get the 7-day free trial of SheetXAI and open a blank Google Sheet, then ask it to pull the News API source directory for your categories and populate the reference table. Once it's built, see how to use it for outlet-targeted brand monitoring or competitor mention tracking. Full overview: News API + Google Sheets.
