Quick Start
Getting started with the Media Intelligence API takes just a few steps.
1. Get an API key
You'll need an API key to authenticate every request, passed in the apiKey header. If you're not yet an Agility client, book a demo to get started.
To provision a key yourself:
- You'll need the API Key Manager permission to see the API Keys section in the Agility Platform. Reach out to Agility Support at agilitysupport@agilitypr.com to get this set up for your user.
- Log in to the Agility Platform at app.agilitypr.com.
- Navigate to Account > Content Management > API Keys and provision your key from there.
2. Make your first request
Try the request below (swap in your API key and your brand's name) against the Ad-hoc search endpoint and verify you get a response. This runs an immediate search with no other setup required.
curl --location 'https://mediaintelligence.agilitypr.com/api/v1/search' \
--header 'apiKey: <replace with your API key>' \
--header 'Content-Type: application/json' \
--data '{
"query": {
"publicationDate": {
"relative": "LAST_7_DAYS"
},
"standardQuery": {
"areas": [
"HEADLINE",
"LEAD",
"BODY"
],
"anyTerms": [
"<replace with your brand name>"
]
}
}
}'
This searches for any mention of your brand name in the headline, lead, or body over the last 7 days. See Search Usage for the full set of query rules — this example uses a Standard query, but an Expert query works the same way.
Need this in a language other than curl? The Ad-hoc search reference has equivalent request snippets for several languages.
3. Check the response
A successful response looks like this (trimmed to one result):
{
"totalResults": 3,
"mentions": [
{
"outlet": {
"id": "76fbf5c4-e998-45a7-954f-6199a4f4bf4f",
"name": "Outlet Name"
},
"location": {
"continentCode": 11,
"countryCode": 417
},
"title": "Online news article title",
"body": "Partial text body",
"url": "https://outlet.com/link/to/article",
"mediaType": "ONLINE_NEWS",
"sentiment": "NEGATIVE",
"wordCount": 96,
"publishedDate": 1765302145000,
"harvestedDate": 1765302158000
}
]
}
totalResultsis the total number of mentions matching your search, across all pages.mentionsis the list of matches for the current page, one per article/post — up to the page size you requested (25 by default), so it may be shorter thantotalResults.
By default, results are sorted by publishedDate (most recent first) and returned 25 at a time; pass paginationParams in the request to change the page, page size, or sort order.
What's next
- Search Usage — the rules for both Standard and Expert search queries, with worked examples.
- Claude Integration — connect Claude.ai or Claude Code to search media coverage conversationally, without writing any code.
- API Definition — full reference for every endpoint, request/response schema, and error code.