AP News Search
AP News Search is used to fetch AP News search results by keyword.
- Search AP News results by keyword
- Support region-based requests
- Support fetching multiple pages starting from a specific page
- Return result items, pagination data, and article metadata
Use XCrawl to Fetch AP News Search Results
Usage
curl -s -X POST 'https://run.xcrawl.com/v1/data' \
-H 'Authorization: Bearer $XCRAWL_API_KEY'\
-H 'Content-Type: application/json' \
-d '{
"engine": "apnews_search",
"keyword": "coffee",
"location": "US",
"start_page": 1,
"pages": 1
}'Request parameter notes:
enginemust beapnews_searchkeywordspecifies the search keywordlocationspecifies the target regionstart_pageandpagescontrol the page range to fetch
Response Example
{
"result": [
{
"content": {
"query": "coffee",
"base_url": "https://apnews.com",
"current_page": 1,
"total_pages": 20,
"page_size": 30,
"result_count": 30,
"total_results": 9517,
"next_page_url": "https://apnews.com/search?q=coffee&p=2",
"source_url": "https://apnews.com/search?q=coffee&p=1",
"result": [
{
"position": 1,
"title": "Soaring coffee prices rewrite some Americans' daily routines",
"summary": "Rising coffee prices are changing how some Americans get their caffeine.",
"url": "https://apnews.com/article/coffee-inflation-prices-starbucks-1a809b2d3e650d5e92e2c0f5a5f4f85b",
"article_id": "coffee-inflation-prices-starbucks-1a809b2d3e650d5e92e2c0f5a5f4f85b",
"published_at": "2026-02-14T14:00:07+00:00",
"updated_at": "2026-02-14T16:58:45+00:00",
"image_url": "https://dims.apnews.com/...",
"source": "AP News",
"content_type": "article"
}
]
}
}
]
}Parameters
Required Parameters
| Parameter | Type | Description |
|---|---|---|
location | string | Specifies the target region. |
keyword | string | Specifies the search keyword. |
start_page | number | Specifies the page number to start from. |
pages | number | Specifies how many pages to fetch. |
Parameter Notes
locationdefaults toUSlocationsupports multiple region values such asUS,HK,CA,GB, andJPkeyworddefaults tocoffeestart_pagedefaults to1pagesdefaults to1
Response Fields
Response data is returned under result[].content.
| Field | Type | Description |
|---|---|---|
query | string | Final normalized search keyword. |
base_url | string | Base site URL used to normalize relative links. |
current_page | number | Current result page number. |
total_pages | number | Total number of result pages. |
page_size | number | Number of result items on the current page. |
result_count | number | Number of parsed result items returned in the response. |
total_results | number | Total result count reported by AP News. |
next_page_url | string | URL for the next result page. |
source_url | string | Original search page URL fetched by the request. |
result | array | Search result item list. |
Result Item Fields
Each item in result[] typically includes:
| Field | Type | Description |
|---|---|---|
position | number | One-based position on the current page. |
title | string | News title. |
summary | string | Result summary text. |
content | string | Content summary field, usually aligned with the teaser text. |
url | string | Article detail URL. |
path | string | Path part of the article URL. |
article_id | string | Article identifier parsed from the URL. |
domain | string | Hostname of the result URL. |
display_date | string | Rendered date text from the page. |
timestamp_ms | string | Primary timestamp in Unix epoch milliseconds. |
published_timestamp_ms | string | Published timestamp in Unix epoch milliseconds. |
updated_timestamp_ms | string | Updated timestamp in Unix epoch milliseconds. |
published_at | string | Published time in ISO 8601 format. |
updated_at | string | Updated time in ISO 8601 format. |
image_url | string | Primary image URL. |
image_srcset | string | Responsive image srcset value. |
image_alt | string | Alternative text for the image. |
image_width | number | Image width. |
image_height | number | Image height. |
image_aspect_ratio | number | Image aspect ratio. |
has_image | boolean | Whether the result includes an image. |
has_media | boolean | Whether the result includes media. |
gtm_region | string | GTM region label from the result card. |
gtm_topic | string | GTM topic label from the result card. |
origin_template | string | Template name declared by the result card. |
mobile_alt_layout | boolean | Whether the mobile alternate layout flag is enabled. |
source | string | Source label. |
content_type | string | Normalized content type inferred from the result URL. |
