question

Upvotes
Accepted
5 0 0 3

TRKD get RetrieveHeadlineML_1 write query conditions

use java program language develop,get news headline。

use httpclient httpPost json request.but how do do write filter conditions; etc. code=GOL and language=English。

ths!

rkd-apirkd
1565773460.jpg (70.7 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
21.8k 57 14 21

Hello @895669342, In both SOAP or JSON version of API, you can include a Filter in your request to narrow down the search results.

See section 13.3.1.8 of the TRKD documentation to see the filter structure. For GOL and English you will use ```Value Text = GOL, Class = Any``` and ```Value Text = EN, class = language```

Samples filters:

JSON:
"Filter": [{
"And": {
"MetaDataConstraint_typehint": [
"MetaDataConstraint",
"MetaDataConstraint"
],
"MetaDataConstraint": [{
"Value": {
"Text": "ECI"
},
"class": "topics"
}, {
"Value": {
"Text": "EN"
},
"class": "language"
}
]
}
}
]

SOAP:
<Filter>
<And xmlns="http://schemas.reuters.com/ns/2006/04/14/rmds/webservices/news/filter">
<MetaDataConstraint class="Attribution">
<Value>Reuters</Value>
</MetaDataConstraint>
<MetaDataConstraint class="Companies">
<And>
<Value>MSFT.O</Value>
<Value>YHOO.O</Value>
</And>
</MetaDataConstraint>
<FreeTextConstraint where="headline">
<Value>Merger</Value>
</FreeTextConstraint>
</And>
</Filter>
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
5 0 0 3

ths @Gurpreet,I want this answer。

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
141 1 4 1

This question shows screenshot from overview tab in support portal. You can see xml or json for any sample shown there simply:

- go to develop tab (to right of "overview" in top right bar)

- select "load from" and choose same example you are interested (everything from overview tab should be listed)

- select "inspect" and it will show you soap/xml

- or select "json" option and reload example, select inspect and it will show all required headers and the json body

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.